pre-commit autocorrected files (#9750)

pull/9687/head
Bas 2023-02-06 10:35:16 +01:00 committed by GitHub
parent 10337f2fcb
commit 2c93c997cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
89 changed files with 150 additions and 104 deletions

View File

@ -24,7 +24,14 @@ skip_list:
# (Disabled in June 2021) # (Disabled in June 2021)
- 'role-name' - 'role-name'
- 'experimental'
# [var-naming] "defaults/main.yml" File defines variable 'apiVersion' that violates variable naming standards # [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 # In Kubespray we use variables that use camelCase to match their k8s counterparts
# (Disabled in June 2021) # (Disabled in June 2021)
- 'var-naming' - 'var-naming'
- 'var-spacing'
# [fqcn-builtins]
# Roles in kubespray don't need fully qualified collection names
# (Disabled in Feb 2023)
- 'fqcn-builtins'

View File

@ -1,5 +1,20 @@
--- ---
repos: 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 - repo: https://github.com/adrienverge/yamllint.git
rev: v1.27.1 rev: v1.27.1
hooks: hooks:

View File

@ -31,4 +31,3 @@
[k8s_cluster:children] [k8s_cluster:children]
kube_node kube_node
kube_control_plane kube_control_plane

View File

@ -1,3 +1,3 @@
configparser>=3.3.0 configparser>=3.3.0
ruamel.yaml>=0.15.88
ipaddress ipaddress
ruamel.yaml>=0.15.88

View File

@ -1,3 +1,3 @@
hacking>=0.10.2 hacking>=0.10.2
pytest>=2.8.0
mock>=1.3.0 mock>=1.3.0
pytest>=2.8.0

View File

@ -1,3 +1,2 @@
#k8s_deployment_user: kubespray #k8s_deployment_user: kubespray
#k8s_deployment_user_pkey_path: /tmp/ssh_rsa #k8s_deployment_user_pkey_path: /tmp/ssh_rsa

View File

@ -41,4 +41,3 @@
# [network-storage:children] # [network-storage:children]
# gfs-cluster # gfs-cluster

View File

@ -13,4 +13,3 @@ output "k8s_etcds" {
output "k8s_nodes" { output "k8s_nodes" {
value = equinix_metal_device.k8s_node.*.access_public_ipv4 value = equinix_metal_device.k8s_node.*.access_public_ipv4
} }

View File

@ -54,4 +54,3 @@ variable "number_of_etcd" {
variable "number_of_k8s_nodes" { variable "number_of_k8s_nodes" {
default = 1 default = 1
} }

View File

@ -14,4 +14,3 @@ ssh_authorized_keys:
%{ for ssh_public_key in ssh_public_keys ~} %{ for ssh_public_key in ssh_public_keys ~}
- ${ssh_public_key} - ${ssh_public_key}
%{ endfor ~} %{ endfor ~}

View File

@ -44,4 +44,3 @@ resource "openstack_networking_floatingip_v2" "k8s_nodes" {
pool = var.floatingip_pool pool = var.floatingip_pool
depends_on = [null_resource.dummy_dependency] depends_on = [null_resource.dummy_dependency]
} }

View File

@ -2,9 +2,9 @@ ansible==4.10.0
ansible-core==2.11.11 ansible-core==2.11.11
cryptography==3.4.8 cryptography==3.4.8
jinja2==2.11.3 jinja2==2.11.3
jmespath==0.9.5
MarkupSafe==1.1.1
netaddr==0.7.19 netaddr==0.7.19
pbr==5.4.4 pbr==5.4.4
jmespath==0.9.5
ruamel.yaml==0.16.10 ruamel.yaml==0.16.10
ruamel.yaml.clib==0.2.7 ruamel.yaml.clib==0.2.7
MarkupSafe==1.1.1

View File

@ -2,9 +2,9 @@ ansible==5.7.1
ansible-core==2.12.5 ansible-core==2.12.5
cryptography==3.4.8 cryptography==3.4.8
jinja2==2.11.3 jinja2==2.11.3
jmespath==0.9.5
MarkupSafe==1.1.1
netaddr==0.7.19 netaddr==0.7.19
pbr==5.4.4 pbr==5.4.4
jmespath==0.9.5
ruamel.yaml==0.16.10 ruamel.yaml==0.16.10
ruamel.yaml.clib==0.2.7 ruamel.yaml.clib==0.2.7
MarkupSafe==1.1.1

View File

@ -87,4 +87,3 @@ rateLimiter:
rateLimitBucketWrite: {{ oci_rate_limit.rate_limit_bucket_write }} rateLimitBucketWrite: {{ oci_rate_limit.rate_limit_bucket_write }}
{% endif %} {% endif %}
{% endif %} {% endif %}

View File

@ -70,4 +70,3 @@ spec:
- name: kubernetes - name: kubernetes
mountPath: /etc/kubernetes mountPath: /etc/kubernetes
readOnly: true readOnly: true

View File

@ -129,4 +129,3 @@ spec:
volumes: volumes:
- name: socket-dir - name: socket-dir
emptyDir: {} emptyDir: {}

View File

@ -1,3 +1,2 @@
[global] [global]
node-tags = {{ gce_node_tags }} node-tags = {{ gce_node_tags }}

View File

@ -94,4 +94,3 @@ spec:
path: /etc/kubernetes/admin.conf path: /etc/kubernetes/admin.conf
name: kubeconfig name: kubeconfig
status: {} status: {}

View File

@ -77,4 +77,3 @@ data:
"Type": "vxlan" "Type": "vxlan"
} }
} }

View File

@ -38,4 +38,3 @@ fi
${OTHERSCRIPT} ${CONFIG} ${OTHERSCRIPT} ${CONFIG}
ip link del ${DEVICE} type ${TYPE:-macvlan} ip link del ${DEVICE} type ${TYPE:-macvlan}

View File

@ -41,4 +41,3 @@ ip link add \
type ${TYPE:-macvlan} mode ${MACVLAN_MODE:-private} type ${TYPE:-macvlan} mode ${MACVLAN_MODE:-private}
${OTHERSCRIPT} ${CONFIG} ${OTHERSCRIPT} ${CONFIG}

View File

@ -11,4 +11,3 @@ MACVLAN_MODE=bridge
IPADDR={{ node_pod_cidr|ipaddr('net')|ipaddr(1)|ipaddr('address') }} IPADDR={{ node_pod_cidr|ipaddr('net')|ipaddr(1)|ipaddr('address') }}
NETMASK={{ node_pod_cidr|ipaddr('netmask') }} NETMASK={{ node_pod_cidr|ipaddr('netmask') }}
NETWORK={{ node_pod_cidr|ipaddr('network') }} NETWORK={{ node_pod_cidr|ipaddr('network') }}

View File

@ -1,4 +1,3 @@
{% if enable_nat_default_gateway %} {% if enable_nat_default_gateway %}
iptables -t nat -D POSTROUTING -s {{ node_pod_cidr|ipaddr('net') }} -o {{ node_default_gateway_interface }} -j MASQUERADE iptables -t nat -D POSTROUTING -s {{ node_pod_cidr|ipaddr('net') }} -o {{ node_default_gateway_interface }} -j MASQUERADE
{% endif %} {% endif %}

View File

@ -1,4 +1,3 @@
{% if enable_nat_default_gateway %} {% if enable_nat_default_gateway %}
iptables -t nat -I POSTROUTING -s {{ node_pod_cidr|ipaddr('net') }} -o {{ node_default_gateway_interface }} -j MASQUERADE iptables -t nat -I POSTROUTING -s {{ node_pod_cidr|ipaddr('net') }} -o {{ node_default_gateway_interface }} -j MASQUERADE
{% endif %} {% endif %}

View File

@ -15,4 +15,3 @@ GatewayOnlink=yes
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endfor %} {% endfor %}

View File

@ -24,4 +24,3 @@ iface mac0 inet static
{% endfor %} {% endfor %}
post-down iptables -t nat -D POSTROUTING -s {{ node_pod_cidr|ipaddr('net') }} -o {{ node_default_gateway_interface }} -j MASQUERADE post-down iptables -t nat -D POSTROUTING -s {{ node_pod_cidr|ipaddr('net') }} -o {{ node_default_gateway_interface }} -j MASQUERADE
post-down ip link delete mac0 post-down ip link delete mac0

45
run.rc 100644
View File

@ -0,0 +1,45 @@
# use virtualenv to install all python requirements
VENVDIR=venv
python3 -m venv $VENVDIR
source $VENVDIR/bin/activate
pip install --upgrade pip
pip install wheel
pip install --upgrade setuptools
pip install -r requirements.txt
pip install -r tests/requirements.txt
pre-commit install
# prepare an inventory to test with
INV=inventory/lab
rm -rf ${INV}.bak &> /dev/null
mv ${INV} ${INV}.bak &> /dev/null
cp -a inventory/sample ${INV}
rm -f ${INV}/hosts.ini
# customize the vagrant environment
mkdir vagrant
cat << EOF > vagrant/config.rb
\$instance_name_prefix = kub"
\$vm_cpus = 2
\$num_instances = 3
\$os = "almalinux8"
\$subnet = "192.168.56"
\$network_plugin = "calico"
\$inventory = "$INV"
\$shared_folders = { 'temp/docker_rpms' => "/var/cache/yum/x86_64/7/docker-ce/packages" }
EOF
# make the rpm cache
mkdir -p temp/docker_rpms
vagrant up
# make a copy of the downloaded docker rpm, to speed up the next provisioning run
scp kub-1:/var/cache/yum/x86_64/7/docker-ce/packages/* temp/docker_rpms/
# copy kubectl access configuration in place
mkdir $HOME/.kube/ &> /dev/null
ln -s $PWD/$INV/artifacts/admin.conf $HOME/.kube/config
# make the kubectl binary available
sudo ln -s $PWD/$INV/artifacts/kubectl /usr/local/bin/kubectl
#or
export PATH=$PATH:$PWD/$INV/artifacts

View File

@ -1,11 +1,11 @@
-r ../requirements-2.11.txt -r ../requirements-2.11.txt
yamllint==1.19.0
apache-libcloud==2.2.1
tox==3.11.1
dopy==0.3.7
ansible-lint==5.4.0 ansible-lint==5.4.0
apache-libcloud==2.2.1
ara[server]==1.6.1
dopy==0.3.7
molecule==3.0.6 molecule==3.0.6
molecule-vagrant==0.3 molecule-vagrant==0.3
testinfra==5.2.2
python-vagrant==0.5.15 python-vagrant==0.5.15
ara[server]==1.6.1 testinfra==5.2.2
tox==3.11.1
yamllint==1.19.0

View File

@ -1,11 +1,11 @@
-r ../requirements-2.12.txt -r ../requirements-2.12.txt
yamllint==1.19.0
apache-libcloud==2.2.1
tox==3.11.1
dopy==0.3.7
ansible-lint==5.4.0 ansible-lint==5.4.0
apache-libcloud==2.2.1
ara[server]==1.6.1
dopy==0.3.7
molecule==3.0.6 molecule==3.0.6
molecule-vagrant==0.3 molecule-vagrant==0.3
testinfra==5.2.2
python-vagrant==0.5.15 python-vagrant==0.5.15
ara[server]==1.6.1 testinfra==5.2.2
tox==3.11.1
yamllint==1.19.0

View File

@ -1,4 +1,4 @@
pyaml
jinja2 jinja2
pathlib ; python_version < '3.10' pathlib ; python_version < '3.10'
pyaml
pydblite pydblite