Skip to content

Commit

Permalink
format yaml so it passes yamllint
Browse files Browse the repository at this point in the history
  • Loading branch information
AshleyDumaine committed May 23, 2024
1 parent 48968dd commit 3f2f5f5
Show file tree
Hide file tree
Showing 14 changed files with 75 additions and 81 deletions.
1 change: 1 addition & 0 deletions .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ extends: default
rules:
line-length: disable
document-start: disable
new-line-at-end-of-file: disable
65 changes: 29 additions & 36 deletions templates/addons/cluster-autoscaler/cluster-autoscaler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,26 @@ spec:
app: ${CLUSTER_NAME}-cluster-autoscaler
spec:
containers:
- image: registry.k8s.io/autoscaling/cluster-autoscaler:${CLUSTER_AUTOSCALER_VERSION}
name: cluster-autoscaler
command:
- /cluster-autoscaler
args:
- --cloud-provider=clusterapi
- --kubeconfig=/mnt/kubeconfig/value
- --clusterapi-cloud-config-authoritative
- --node-group-auto-discovery=clusterapi:namespace=${NAMESPACE},clusterName=${CLUSTER_NAME}
# See: https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#my-cluster-is-below-minimum--above-maximum-number-of-nodes-but-ca-did-not-fix-that-why
- --enforce-node-group-min-size
volumeMounts:
- name: kubeconfig
readOnly: true
mountPath: /mnt/kubeconfig/
- image: registry.k8s.io/autoscaling/cluster-autoscaler:${CLUSTER_AUTOSCALER_VERSION}
name: cluster-autoscaler
command: [/cluster-autoscaler]
args:
- --cloud-provider=clusterapi
- --kubeconfig=/mnt/kubeconfig/value
- --clusterapi-cloud-config-authoritative
- --node-group-auto-discovery=clusterapi:namespace=${NAMESPACE},clusterName=${CLUSTER_NAME}
# See: https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#my-cluster-is-below-minimum--above-maximum-number-of-nodes-but-ca-did-not-fix-that-why
- --enforce-node-group-min-size
volumeMounts:
- name: kubeconfig
readOnly: true
mountPath: /mnt/kubeconfig/
serviceAccountName: ${CLUSTER_NAME}-cluster-autoscaler
terminationGracePeriodSeconds: 10
volumes:
- name: kubeconfig
secret:
secretName: ${CLUSTER_NAME}-kubeconfig
- name: kubeconfig
secret:
secretName: ${CLUSTER_NAME}-kubeconfig
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
Expand All @@ -47,8 +46,8 @@ roleRef:
kind: Role
name: ${CLUSTER_NAME}-cluster-autoscaler
subjects:
- kind: ServiceAccount
name: ${CLUSTER_NAME}-cluster-autoscaler
- kind: ServiceAccount
name: ${CLUSTER_NAME}-cluster-autoscaler
---
apiVersion: v1
kind: ServiceAccount
Expand All @@ -60,19 +59,13 @@ apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: ${CLUSTER_NAME}-cluster-autoscaler
rules:
- apiGroups:
- cluster.x-k8s.io
- infrastructure.cluster.x-k8s.io
resources:
- machinedeployments
- machinedeployments/scale
- machines
- machinesets
- machinepools
- linodemachinetemplates
- linodemachines
verbs:
- get
- list
- update
- watch
- apiGroups: [cluster.x-k8s.io, infrastructure.cluster.x-k8s.io]
resources:
- machinedeployments
- machinedeployments/scale
- machines
- machinesets
- machinepools
- linodemachinetemplates
- linodemachines
verbs: [get, list, update, watch]
4 changes: 2 additions & 2 deletions templates/addons/cluster-resource-set/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
matchLabels:
crs: ${CLUSTER_NAME}-crs
resources:
- kind: Secret
name: linode-${CLUSTER_NAME}-crs-0
- kind: Secret
name: linode-${CLUSTER_NAME}-crs-0
strategy: ApplyOnce
---
6 changes: 3 additions & 3 deletions templates/addons/etcd-backup-restore/etcd-backup-restore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ data:
- --etcd-connection-timeout=30s
- --delta-snapshot-period=60s
- --delta-snapshot-memory-limit=104857600
- --compress-snapshots=true
- --compress-snapshots=true
- --compression-policy=gzip
- --cacert=/etc/kubernetes/pki/etcd/ca.crt
- --cert=/etc/kubernetes/pki/etcd/healthcheck-client.crt
Expand Down Expand Up @@ -147,6 +147,6 @@ spec:
etcd-backup: "true"
cluster: ${CLUSTER_NAME}
resources:
- kind: ConfigMap
name: ${CLUSTER_NAME}-etcd-backup-restore-addon
- kind: ConfigMap
name: ${CLUSTER_NAME}-etcd-backup-restore-addon
strategy: ApplyOnce
4 changes: 2 additions & 2 deletions templates/addons/etcd-backup-restore/linode-obj.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ spec:
etcd-backup: "true"
cluster: ${CLUSTER_NAME}
resources:
- kind: Secret
name: ${CLUSTER_NAME}-etcd-backup-bucket-details
- kind: Secret
name: ${CLUSTER_NAME}-etcd-backup-bucket-details
strategy: ApplyOnce
4 changes: 2 additions & 2 deletions templates/addons/etcd-backup-restore/sse-key-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ spec:
etcd-backup: "true"
cluster: ${CLUSTER_NAME}
resources:
- kind: Secret
name: ${CLUSTER_NAME}-ssekey
- kind: Secret
name: ${CLUSTER_NAME}-ssekey
strategy: ApplyOnce
12 changes: 6 additions & 6 deletions templates/addons/machine-health-check/machinehealthcheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ spec:
matchLabels:
cluster.x-k8s.io/deployment-name: ${CLUSTER_NAME}-md-0
unhealthyConditions:
- type: Ready
status: Unknown
timeout: 300s
- type: Ready
status: "False"
timeout: 300s
- type: Ready
status: Unknown
timeout: 300s
- type: Ready
status: "False"
timeout: 300s
---
apiVersion: cluster.x-k8s.io/v1beta1
kind: MachineHealthCheck
Expand Down
18 changes: 9 additions & 9 deletions templates/flavors/clusterclass-kubeadm/cluster-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ spec:
class: kubeadm
version: ${KUBERNETES_VERSION}
variables:
- name: region
value: ${LINODE_REGION}
- name: controlPlaneMachineType
value: ${LINODE_CONTROL_PLANE_MACHINE_TYPE}
- name: workerMachineType
value: ${LINODE_MACHINE_TYPE}
- name: region
value: ${LINODE_REGION}
- name: controlPlaneMachineType
value: ${LINODE_CONTROL_PLANE_MACHINE_TYPE}
- name: workerMachineType
value: ${LINODE_MACHINE_TYPE}
controlPlane:
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
workers:
machineDeployments:
- class: default-worker
name: md-0
replicas: ${WORKER_MACHINE_COUNT}
- class: default-worker
name: md-0
replicas: ${WORKER_MACHINE_COUNT}
24 changes: 12 additions & 12 deletions templates/flavors/clusterclass-kubeadm/clusterClass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ spec:
name: kubeadm
workers:
machineDeployments:
- class: default-worker
template:
bootstrap:
ref:
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
kind: KubeadmConfigTemplate
name: kubeadm-worker
infrastructure:
ref:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
kind: LinodeMachineTemplate
name: kubeadm-worker
- class: default-worker
template:
bootstrap:
ref:
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
kind: KubeadmConfigTemplate
name: kubeadm-worker
infrastructure:
ref:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
kind: LinodeMachineTemplate
name: kubeadm-worker
variables:
- name: region
required: true
Expand Down
4 changes: 2 additions & 2 deletions templates/flavors/clusterclass-kubeadm/deleteTransformer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ patch: |-
- op: remove
path: /spec/template/spec/version
value:
#patch: |-
# patch: |-
# $patch: delete
# apiVersion: controlplane.cluster.x-k8s.io/v1beta1
# kind: KubeadmControlPlaneTemplate
Expand All @@ -77,4 +77,4 @@ patch: |-
# kind: LinodeMachineTemplate
# name: ${CLUSTER_NAME}-control-plane
# replicas: ${CONTROL_PLANE_MACHINE_COUNT}
# version: ${KUBERNETES_VERSION}
# version: ${KUBERNETES_VERSION}
2 changes: 1 addition & 1 deletion templates/flavors/k3s/default/k3sControlPlane.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ spec:
owner: root:root
contentFrom:
secret:
key: linode-token-region.yaml
key: linode-token-region.yaml
name: linode-${CLUSTER_NAME}-crs-0
serverConfig:
disableComponents:
Expand Down
2 changes: 1 addition & 1 deletion templates/flavors/rke2/default/rke2ControlPlane.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
node-role.kubernetes.io/control-plane: "true"
- contentFrom:
secret:
key: linode-token-region.yaml
key: linode-token-region.yaml
name: linode-${CLUSTER_NAME}-crs-0
owner: root:root
path: /var/lib/rancher/rke2/server/manifests/linode-token-region.yaml
Expand Down
8 changes: 4 additions & 4 deletions templates/infra/linodeMachineTemplate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ spec:
type: ${LINODE_CONTROL_PLANE_MACHINE_TYPE}
region: ${LINODE_REGION}
interfaces:
- purpose: public
primary: true
- purpose: public
primary: true
authorizedKeys:
# uncomment to include your ssh key in linode provisioning
# - $LINODE_SSH_PUBKEY
Expand All @@ -27,8 +27,8 @@ spec:
type: ${LINODE_MACHINE_TYPE}
region: ${LINODE_REGION}
interfaces:
- purpose: public
primary: true
- purpose: public
primary: true
authorizedKeys:
# uncomment to include your ssh key in linode provisioning
# - $LINODE_SSH_PUBKEY
2 changes: 1 addition & 1 deletion templates/infra/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ kind: Secret
metadata:
name: ${CLUSTER_NAME}-credentials
labels:
clusterctl.cluster.x-k8s.io/move: "true"
clusterctl.cluster.x-k8s.io/move: "true"
stringData:
apiToken: ${LINODE_TOKEN}

0 comments on commit 3f2f5f5

Please sign in to comment.