Skip to content

Commit

Permalink
pre-commit autocorrected files (#9750)
Browse files Browse the repository at this point in the history
  • Loading branch information
bbaassssiiee authored Feb 6, 2023
1 parent 10337f2 commit 2c93c99
Show file tree
Hide file tree
Showing 89 changed files with 148 additions and 102 deletions.
7 changes: 7 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,14 @@ skip_list:
# (Disabled in June 2021)
- 'role-name'

- 'experimental'
# [var-naming] "defaults/main.yml" File defines variable 'apiVersion' that violates variable naming standards
# In Kubespray we use variables that use camelCase to match their k8s counterparts
# (Disabled in June 2021)
- 'var-naming'
- 'var-spacing'

# [fqcn-builtins]
# Roles in kubespray don't need fully qualified collection names
# (Disabled in Feb 2023)
- 'fqcn-builtins'
15 changes: 15 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
---
repos:

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-xml
- id: check-merge-conflict
- id: detect-private-key
- id: end-of-file-fixer
- id: forbid-new-submodules
- id: requirements-txt-fixer
- id: trailing-whitespace

- repo: https://github.com/adrienverge/yamllint.git
rev: v1.27.1
hooks:
Expand Down
2 changes: 1 addition & 1 deletion CNAME
Original file line number Diff line number Diff line change
@@ -1 +1 @@
kubespray.io
kubespray.io
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
identification within third-party archives.

Copyright 2016 Kubespray

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion OWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ approvers:
reviewers:
- kubespray-reviewers
emeritus_approvers:
- kubespray-emeritus_approvers
- kubespray-emeritus_approvers
2 changes: 1 addition & 1 deletion contrib/aws_inventory/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
boto3 # Apache-2.0
boto3 # Apache-2.0
2 changes: 1 addition & 1 deletion contrib/azurerm/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
.generated
/inventory
/inventory
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,3 @@
[k8s_cluster:children]
kube_node
kube_control_plane

Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@
}
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,4 @@
}
{% endif %}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
"variables": {},
"resources": [],
"outputs": {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
}
}
]
}
}
2 changes: 1 addition & 1 deletion contrib/inventory_builder/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
configparser>=3.3.0
ruamel.yaml>=0.15.88
ipaddress
ruamel.yaml>=0.15.88
2 changes: 1 addition & 1 deletion contrib/inventory_builder/test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
hacking>=0.10.2
pytest>=2.8.0
mock>=1.3.0
pytest>=2.8.0
1 change: 0 additions & 1 deletion contrib/kvm-setup/group_vars/all
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
#k8s_deployment_user: kubespray
#k8s_deployment_user_pkey_path: /tmp/ssh_rsa

1 change: 0 additions & 1 deletion contrib/network-storage/glusterfs/inventory.example
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,3 @@

# [network-storage:children]
# gfs-cluster

Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@
{% endfor %}
]
}

1 change: 0 additions & 1 deletion contrib/terraform/equinix/output.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ output "k8s_etcds" {
output "k8s_nodes" {
value = equinix_metal_device.k8s_node.*.access_public_ipv4
}

1 change: 0 additions & 1 deletion contrib/terraform/equinix/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,3 @@ variable "number_of_etcd" {
variable "number_of_k8s_nodes" {
default = 1
}

2 changes: 1 addition & 1 deletion contrib/terraform/hetzner/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ resource "null_resource" "inventories" {
triggers = {
template = data.template_file.inventory.rendered
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ output "cluster_private_network_cidr" {

output "network_id" {
value = hcloud_network.kubernetes.id
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ storage:
#!/bin/bash
set -euo pipefail
hostname="$(hostname)"
echo My name is ${name} and the hostname is $${hostname}
echo My name is ${name} and the hostname is $${hostname}
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ terraform {
source = "hashicorp/null"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ output "cluster_private_network_cidr" {

output "network_id" {
value = hcloud_network.kubernetes.id
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ ssh_authorized_keys:
%{ for ssh_public_key in ssh_public_keys ~}
- ${ssh_public_key}
%{ endfor ~}

1 change: 0 additions & 1 deletion contrib/terraform/openstack/modules/ips/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,3 @@ resource "openstack_networking_floatingip_v2" "k8s_nodes" {
pool = var.floatingip_pool
depends_on = [null_resource.dummy_dependency]
}

Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@ floatingip_pool = "<pool>"
bastion_allowed_remote_ips = ["0.0.0.0/0"]

# Force port security to be null. Some cloud providers do not allow to set port security.
# force_null_port_security = false
# force_null_port_security = false
6 changes: 3 additions & 3 deletions contrib/terraform/upcloud/modules/kubernetes-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ resource "upcloud_server" "master" {
lifecycle {
ignore_changes = [storage_devices]
}

firewall = var.firewall_enabled

dynamic "storage_devices" {
Expand Down Expand Up @@ -525,7 +525,7 @@ resource "upcloud_loadbalancer_backend" "lb_backend" {

resource "upcloud_loadbalancer_frontend" "lb_frontend" {
for_each = var.loadbalancer_enabled ? var.loadbalancers : {}

loadbalancer = upcloud_loadbalancer.lb[0].id
name = "lb-frontend-${each.key}"
mode = "tcp"
Expand All @@ -535,7 +535,7 @@ resource "upcloud_loadbalancer_frontend" "lb_frontend" {

resource "upcloud_loadbalancer_static_backend_member" "lb_backend_member" {
for_each = {
for be_server in local.lb_backend_servers:
for be_server in local.lb_backend_servers:
"${be_server.server_name}-lb-backend-${be_server.lb_name}" => be_server
if var.loadbalancer_enabled
}
Expand Down
6 changes: 3 additions & 3 deletions docs/vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ Stack](https://github.com/kubernetes-sigs/kubespray/blob/master/docs/dns-stack.m
* *http_proxy/https_proxy/no_proxy/no_proxy_exclude_workers/additional_no_proxy* - Proxy variables for deploying behind a
proxy. Note that no_proxy defaults to all internal cluster IPs and hostnames
that correspond to each node.

* *kubelet_cgroup_driver* - Allows manual override of the cgroup-driver option for Kubelet.
By default autodetection is used to match container manager configuration.
`systemd` is the preferred driver for `containerd` though it can have issues with `cgroups v1` and `kata-containers` in which case you may want to change to `cgroupfs`.
Expand All @@ -213,9 +213,9 @@ Stack](https://github.com/kubernetes-sigs/kubespray/blob/master/docs/dns-stack.m

* *kubelet_secure_addresses* - By default *kubelet_systemd_hardening* set the **control plane** `ansible_host` IPs as the `kubelet_secure_addresses`. In case you have multiple interfaces in your control plane nodes and the `kube-apiserver` is not bound to the default interface, you can override them with this variable.
Example:

The **control plane** node may have 2 interfaces with the following IP addresses: `eth0:10.0.0.110`, `eth1:192.168.1.110`.

By default the `kubelet_secure_addresses` is set with the `10.0.0.110` the ansible control host uses `eth0` to connect to the machine. In case you want to use `eth1` as the outgoing interface on which `kube-apiserver` connects to the `kubelet`s, you should override the variable in this way: `kubelet_secure_addresses: "192.168.1.110"`.

* *node_labels* - Labels applied to nodes via `kubectl label node`.
Expand Down
2 changes: 1 addition & 1 deletion inventory/sample/group_vars/all/etcd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ etcd_data_dir: /var/lib/etcd

## Settings for etcd deployment type
# Set this to docker if you are using container_manager: docker
etcd_deployment_type: host
etcd_deployment_type: host
2 changes: 1 addition & 1 deletion inventory/sample/group_vars/all/upcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
# is_default: false
# expand_persistent_volumes: true
# parameters:
# tier: hdd
# tier: hdd
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ metadata:
name: kube-controller-manager
annotations:
prometheus.io/scrape: 'true'
prometheus.io/port: '10257'
prometheus.io/port: '10257'
2 changes: 1 addition & 1 deletion inventory/sample/patches/kube-scheduler+merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ metadata:
name: kube-scheduler
annotations:
prometheus.io/scrape: 'true'
prometheus.io/port: '10259'
prometheus.io/port: '10259'
2 changes: 1 addition & 1 deletion logo/logo-clear.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion logo/logo-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion logo/logo-text-clear.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion logo/logo-text-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion logo/logo-text-mixed.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion pipeline.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ RUN wget https://releases.hashicorp.com/vagrant/${VAGRANT_VERSION}/vagrant_${VAG

# Install Kubernetes collections
RUN pip3 install kubernetes \
&& ansible-galaxy collection install kubernetes.core
&& ansible-galaxy collection install kubernetes.core
4 changes: 2 additions & 2 deletions requirements-2.11.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ ansible==4.10.0
ansible-core==2.11.11
cryptography==3.4.8
jinja2==2.11.3
jmespath==0.9.5
MarkupSafe==1.1.1
netaddr==0.7.19
pbr==5.4.4
jmespath==0.9.5
ruamel.yaml==0.16.10
ruamel.yaml.clib==0.2.7
MarkupSafe==1.1.1
4 changes: 2 additions & 2 deletions requirements-2.12.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ ansible==5.7.1
ansible-core==2.12.5
cryptography==3.4.8
jinja2==2.11.3
jmespath==0.9.5
MarkupSafe==1.1.1
netaddr==0.7.19
pbr==5.4.4
jmespath==0.9.5
ruamel.yaml==0.16.10
ruamel.yaml.clib==0.2.7
MarkupSafe==1.1.1
2 changes: 1 addition & 1 deletion roles/bastion-ssh-config/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
ssh_bastion_confing__name: ssh-bastion.conf
ssh_bastion_confing__name: ssh-bastion.conf
2 changes: 1 addition & 1 deletion roles/container-engine/containerd-common/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
allow_duplicates: true
allow_duplicates: true
2 changes: 1 addition & 1 deletion roles/container-engine/cri-o/templates/config.json.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% if crio_registry_auth is defined and crio_registry_auth|length %}
{
{
{% for reg in crio_registry_auth %}
"auths": {
"{{ reg.registry }}": {
Expand Down
2 changes: 1 addition & 1 deletion roles/container-engine/docker/templates/docker-dns.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ Environment="DOCKER_DNS_OPTIONS=\
{% for d in docker_dns_servers %}--dns {{ d }} {% endfor %} \
{% for d in docker_dns_search_domains %}--dns-search {{ d }} {% endfor %} \
{% for o in docker_dns_options %}--dns-opt {{ o }} {% endfor %} \
"
"
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[Service]
ExecStartPost=-{{ bin_dir }}/cleanup-docker-orphans.sh
ExecStartPost=-{{ bin_dir }}/cleanup-docker-orphans.sh
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ valid_entropy_sources = ["/dev/urandom","/dev/random",""]
# When enable_guest_swap is enabled, insert a raw file to the guest as the swap device
# if the swappiness of a container (set by annotation "io.katacontainers.container.resource.swappiness")
# is bigger than 0.
# The size of the swap device should be
# The size of the swap device should be
# swap_in_bytes (set by annotation "io.katacontainers.container.resource.swap_in_bytes") - memory_limit_in_bytes.
# If swap_in_bytes is not set, the size should be memory_limit_in_bytes.
# If swap_in_bytes and memory_limit_in_bytes is not set, the size should
Expand Down
2 changes: 1 addition & 1 deletion roles/etcd/templates/etcd.env.j2
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ ETCDCTL_CERT={{ etcd_cert_dir }}/admin-{{ inventory_hostname }}.pem

# ETCD 3.5.x issue
# https://groups.google.com/a/kubernetes.io/g/dev/c/B7gJs88XtQc/m/rSgNOzV2BwAJ?utm_medium=email&utm_source=footer
ETCD_EXPERIMENTAL_INITIAL_CORRUPT_CHECK={{ etcd_experimental_initial_corrupt_check }}
ETCD_EXPERIMENTAL_INITIAL_CORRUPT_CHECK={{ etcd_experimental_initial_corrupt_check }}
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,3 @@ rateLimiter:
rateLimitBucketWrite: {{ oci_rate_limit.rate_limit_bucket_write }}
{% endif %}
{% endif %}

Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,3 @@ spec:
- name: kubernetes
mountPath: /etc/kubernetes
readOnly: true

Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,3 @@ spec:
volumes:
- name: socket-dir
emptyDir: {}

Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ node-volume-attach-limit="{{ node_volume_attach_limit }}"
{% endif %}
{% if cinder_csi_rescan_on_resize is defined %}
rescan-on-resize={{ cinder_csi_rescan_on_resize | bool }}
{% endif %}
{% endif %}
2 changes: 1 addition & 1 deletion roles/kubernetes-apps/csi_driver/upcloud/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ upcloud_csi_snapshot_controller_replicas: 2
upcloud_csi_snapshotter_image_tag: "v4.2.1"
upcloud_csi_snapshot_controller_image_tag: "v4.2.1"
upcloud_csi_snapshot_validation_webhook_image_tag: "v4.2.1"
upcloud_cacert: "{{ lookup('env','OS_CACERT') }}"
upcloud_cacert: "{{ lookup('env','OS_CACERT') }}"
Loading

0 comments on commit 2c93c99

Please sign in to comment.