Browse Source

Merge "Update KubeadmConfigTemplate reference to use airshipctl"

changes/94/793194/9
Zuul 2 weeks ago
committed by Gerrit Code Review
parent
commit
6b349afb94
  1. 4
      manifests/site/reference-airship-core/target/workers/kustomization.yaml
  2. 20
      manifests/site/reference-airship-core/target/workers/replacements/generated-secrets.yaml
  3. 41
      manifests/site/reference-airship-core/target/workers/replacements/workers-env-vars.yaml
  4. 4
      manifests/site/reference-multi-tenant/target/workers/kustomization.yaml
  5. 31
      manifests/site/reference-multi-tenant/target/workers/provision/kubeadmconfigtemplate.yaml
  6. 10
      manifests/site/reference-multi-tenant/target/workers/provision/kustomization.yaml
  7. 30
      manifests/site/reference-multi-tenant/target/workers/provision/machinedeployment.yaml
  8. 17
      manifests/site/reference-multi-tenant/target/workers/provision/metal3machinetemplate.yaml
  9. 20
      manifests/site/reference-multi-tenant/target/workers/replacements/generated-secrets.yaml
  10. 5
      manifests/site/reference-multi-tenant/target/workers/replacements/kustomization.yaml
  11. 41
      manifests/site/reference-multi-tenant/target/workers/replacements/workers-env-vars.yaml
  12. 3
      manifests/site/virtual-network-cloud/target/workers/kustomization.yaml
  13. 3
      manifests/type/multi-tenant/target/workers/kustomization.yaml
  14. 5
      manifests/type/multi-tenant/target/workers/replacements/kustomization.yaml

4
manifests/site/reference-airship-core/target/workers/kustomization.yaml

@ -2,3 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- nodes
- ../../../../type/airship-core/target/workers
- ../catalogues
transformers:
- ../../../../type/airship-core/target/workers/replacements

20
manifests/site/reference-airship-core/target/workers/replacements/generated-secrets.yaml

@ -1,20 +0,0 @@
# These rules inject env vars into the workers.
apiVersion: airshipit.org/v1alpha1
kind: ReplacementTransformer
metadata:
name: workers-generated-secret-replacements
annotations:
config.kubernetes.io/function: |-
container:
image: localhost/replacement-transformer
replacements:
- source:
objref:
name: generated-secrets
fieldref: "{.sshKeys.publicKey}"
target:
objref:
kind: KubeadmConfigTemplate
name: worker-1
fieldrefs:
- "spec.template.spec.users[name=deployer].sshAuthorizedKeys[0]%REPLACE_HOST_SSH_KEY%"

41
manifests/site/reference-airship-core/target/workers/replacements/workers-env-vars.yaml

@ -1,41 +0,0 @@
# These rules inject env vars into the workers.
apiVersion: airshipit.org/v1alpha1
kind: ReplacementTransformer
metadata:
name: workers-env-vars-replacements
annotations:
config.kubernetes.io/function: |-
container:
image: localhost/replacement-transformer
replacements:
# Replace the proxy vars
- source:
objref:
name: env-vars-catalogue
fieldref: env.HTTP_PROXY
target:
objref:
kind: KubeadmConfigTemplate
name: worker-1
fieldrefs:
- "spec.template.spec.files[path=/etc/systemd/system/docker.service.d/http-proxy.conf].content%REPLACEMENT_HTTP_PROXY%"
- source:
objref:
name: env-vars-catalogue
fieldref: env.HTTPS_PROXY
target:
objref:
kind: KubeadmConfigTemplate
name: worker-1
fieldrefs:
- "spec.template.spec.files[path=/etc/systemd/system/docker.service.d/http-proxy.conf].content%REPLACEMENT_HTTPS_PROXY%"
- source:
objref:
name: env-vars-catalogue
fieldref: env.NO_PROXY
target:
objref:
kind: KubeadmConfigTemplate
name: worker-1
fieldrefs:
- "spec.template.spec.files[path=/etc/systemd/system/docker.service.d/http-proxy.conf].content%REPLACEMENT_NO_PROXY%"

4
manifests/site/reference-multi-tenant/target/workers/kustomization.yaml

@ -2,3 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- nodes
- ../../../../type/multi-tenant/target/workers
- ../catalogues
transformers:
- ../../../../type/airship-core/target/workers/replacements

31
manifests/site/reference-multi-tenant/target/workers/provision/kubeadmconfigtemplate.yaml

@ -1,31 +0,0 @@
apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3
kind: KubeadmConfigTemplate
metadata:
name: worker-1
spec:
template:
spec:
joinConfiguration:
nodeRegistration:
name: '{{ ds.meta_data.name }}'
kubeletExtraArgs:
node-labels: 'metal3.io/uuid={{ ds.meta_data.uuid }},node-type=worker'
provider-id: 'metal3://{{ ds.meta_data.uuid }}'
feature-gates: "IPv6DualStack=true"
files:
- path: "/etc/systemd/system/docker.service.d/http-proxy.conf"
content: |
[Service]
Environment="HTTP_PROXY=REPLACEMENT_HTTP_PROXY"
Environment="HTTPS_PROXY=REPLACEMENT_HTTPS_PROXY"
Environment="NO_PROXY=REPLACEMENT_NO_PROXY"
preKubeadmCommands:
# Restart docker to apply any proxy settings
- export HOME=/root
- systemctl daemon-reload
- systemctl restart docker
users:
- name: deployer
sshAuthorizedKeys:
- REPLACE_HOST_SSH_KEY
sudo: ALL=(ALL) NOPASSWD:ALL

10
manifests/site/reference-multi-tenant/target/workers/provision/kustomization.yaml

@ -1,10 +0,0 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../catalogues
- kubeadmconfigtemplate.yaml
- metal3machinetemplate.yaml
- machinedeployment.yaml
transformers:
- ../replacements

30
manifests/site/reference-multi-tenant/target/workers/provision/machinedeployment.yaml

@ -1,30 +0,0 @@
apiVersion: cluster.x-k8s.io/v1alpha3
kind: MachineDeployment
metadata:
name: worker-1
labels:
cluster.x-k8s.io/cluster-name: target-cluster
spec:
clusterName: target-cluster
## NEWSITE_CHANGEME: update the below with the total number of worker nodes
replicas: 2
selector:
matchLabels:
cluster.x-k8s.io/cluster-name: target-cluster
template:
metadata:
labels:
cluster.x-k8s.io/cluster-name: target-cluster
spec:
clusterName: target-cluster
version: v1.18.3
bootstrap:
configRef:
name: worker-1
apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3
kind: KubeadmConfigTemplate
infrastructureRef:
name: worker-1
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
kind: Metal3MachineTemplate
---

17
manifests/site/reference-multi-tenant/target/workers/provision/metal3machinetemplate.yaml

@ -1,17 +0,0 @@
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
kind: Metal3MachineTemplate
metadata:
name: worker-1
spec:
template:
spec:
hostSelector:
matchLabels:
airshipit.org/k8s-role: worker
image:
## NEWSITE_CHANGEME: update the below ips with the first target node pxe ip
url: http://172.63.0.11/images/control-plane.qcow2
checksum: http://172.63.0.11/images/control-plane.qcow2.md5sum

20
manifests/site/reference-multi-tenant/target/workers/replacements/generated-secrets.yaml

@ -1,20 +0,0 @@
# These rules inject env vars into the workers.
apiVersion: airshipit.org/v1alpha1
kind: ReplacementTransformer
metadata:
name: workers-generated-secret-replacements
annotations:
config.kubernetes.io/function: |-
container:
image: localhost/replacement-transformer
replacements:
- source:
objref:
name: generated-secrets
fieldref: "{.sshKeys.publicKey}"
target:
objref:
kind: KubeadmConfigTemplate
name: worker-1
fieldrefs:
- "spec.template.spec.users[name=deployer].sshAuthorizedKeys[0]%REPLACE_HOST_SSH_KEY%"

5
manifests/site/reference-multi-tenant/target/workers/replacements/kustomization.yaml

@ -1,5 +0,0 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- workers-env-vars.yaml
- generated-secrets.yaml

41
manifests/site/reference-multi-tenant/target/workers/replacements/workers-env-vars.yaml

@ -1,41 +0,0 @@
# These rules inject env vars into the workers.
apiVersion: airshipit.org/v1alpha1
kind: ReplacementTransformer
metadata:
name: workers-env-vars-replacements
annotations:
config.kubernetes.io/function: |-
container:
image: localhost/replacement-transformer
replacements:
# Replace the proxy vars
- source:
objref:
name: env-vars-catalogue
fieldref: env.HTTP_PROXY
target:
objref:
kind: KubeadmConfigTemplate
name: worker-1
fieldrefs:
- "spec.template.spec.files[path=/etc/systemd/system/docker.service.d/http-proxy.conf].content%REPLACEMENT_HTTP_PROXY%"
- source:
objref:
name: env-vars-catalogue
fieldref: env.HTTPS_PROXY
target:
objref:
kind: KubeadmConfigTemplate
name: worker-1
fieldrefs:
- "spec.template.spec.files[path=/etc/systemd/system/docker.service.d/http-proxy.conf].content%REPLACEMENT_HTTPS_PROXY%"
- source:
objref:
name: env-vars-catalogue
fieldref: env.NO_PROXY
target:
objref:
kind: KubeadmConfigTemplate
name: worker-1
fieldrefs:
- "spec.template.spec.files[path=/etc/systemd/system/docker.service.d/http-proxy.conf].content%REPLACEMENT_NO_PROXY%"

3
manifests/site/virtual-network-cloud/target/workers/kustomization.yaml

@ -2,3 +2,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- nodes
- ../../../../type/multi-tenant/target/workers
transformers:
- ../../../../type/multi-tenant/target/workers/replacements

3
manifests/site/reference-airship-core/target/workers/replacements/kustomization.yaml → manifests/type/multi-tenant/target/workers/kustomization.yaml

@ -1,5 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- workers-env-vars.yaml
- generated-secrets.yaml
- ../../../../../../airshipctl/manifests/function/workers-capm3

5
manifests/type/multi-tenant/target/workers/replacements/kustomization.yaml

@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../../../../../../airshipctl/manifests/function/workers-capm3/replacements
- ../../../../../../../airshipctl/manifests/function/workers-capm3/replacements-secrets
Loading…
Cancel
Save