Added Image Repositories replacement for KCP
Change-Id: I454f5e9b92290d0c5b24830621a396f07354f90b
This commit is contained in:
parent
f74f4af7a9
commit
30691affe8
@ -161,3 +161,5 @@ spec:
|
|||||||
image: quay.io/airshipit/image-builder:latest-ubuntu_focal
|
image: quay.io/airshipit/image-builder:latest-ubuntu_focal
|
||||||
|
|
||||||
kubernetes: v1.18.6
|
kubernetes: v1.18.6
|
||||||
|
|
||||||
|
image_repositories: k8s.gcr.io
|
||||||
|
@ -227,6 +227,10 @@ spec:
|
|||||||
description: Allows for the specification of the kubernetes version
|
description: Allows for the specification of the kubernetes version
|
||||||
being used.
|
being used.
|
||||||
type: string
|
type: string
|
||||||
|
image_repositories:
|
||||||
|
description: Allows for the specification of the image repositories
|
||||||
|
being used.
|
||||||
|
type: string
|
||||||
type: object
|
type: object
|
||||||
type: object
|
type: object
|
||||||
served: true
|
served: true
|
||||||
|
@ -3,6 +3,7 @@ kind: Kustomization
|
|||||||
resources:
|
resources:
|
||||||
- ephemeral-env-vars.yaml
|
- ephemeral-env-vars.yaml
|
||||||
- networking.yaml
|
- networking.yaml
|
||||||
|
- versions.yaml
|
||||||
- generated-secrets.yaml
|
- generated-secrets.yaml
|
||||||
- stringData-encode.yaml
|
- stringData-encode.yaml
|
||||||
- cleanup.yaml
|
- cleanup.yaml
|
||||||
|
21
manifests/function/ephemeral/replacements/versions.yaml
Normal file
21
manifests/function/ephemeral/replacements/versions.yaml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# These rules inject versioned artifacts into the ephemeral function.
|
||||||
|
apiVersion: airshipit.org/v1alpha1
|
||||||
|
kind: ReplacementTransformer
|
||||||
|
metadata:
|
||||||
|
name: ephemeral-versions-replacements
|
||||||
|
annotations:
|
||||||
|
config.kubernetes.io/function: |-
|
||||||
|
container:
|
||||||
|
image: localhost/replacement-transformer
|
||||||
|
replacements:
|
||||||
|
# Replace the imageRepository in the KubeadmEphemeral
|
||||||
|
- source:
|
||||||
|
objref:
|
||||||
|
kind: VersionsCatalogue
|
||||||
|
name: versions-airshipctl
|
||||||
|
fieldref: "{.spec.image_repositories}"
|
||||||
|
target:
|
||||||
|
objref:
|
||||||
|
name: ephemeral-bmc-secret
|
||||||
|
kind: Secret
|
||||||
|
fieldrefs: ["stringData.userData%REPLACEMENT_IMAGE_REPOSITORY%"]
|
@ -81,6 +81,7 @@ stringData:
|
|||||||
---
|
---
|
||||||
apiServer:
|
apiServer:
|
||||||
certSANs: REPLACEMENT_CERT_SANS
|
certSANs: REPLACEMENT_CERT_SANS
|
||||||
|
imageRepository: REPLACEMENT_IMAGE_REPOSITORY
|
||||||
apiVersion: kubeadm.k8s.io/v1beta2
|
apiVersion: kubeadm.k8s.io/v1beta2
|
||||||
controllerManager: {}
|
controllerManager: {}
|
||||||
dns:
|
dns:
|
||||||
|
@ -13,6 +13,7 @@ spec:
|
|||||||
clusterConfiguration:
|
clusterConfiguration:
|
||||||
apiServer:
|
apiServer:
|
||||||
timeoutForControlPlane: 1000s
|
timeoutForControlPlane: 1000s
|
||||||
|
imageRepository: k8s.gcr.io
|
||||||
files:
|
files:
|
||||||
- path: "/etc/systemd/system/containerd.service.d/http-proxy.conf"
|
- path: "/etc/systemd/system/containerd.service.d/http-proxy.conf"
|
||||||
content: |
|
content: |
|
||||||
|
@ -30,4 +30,14 @@ replacements:
|
|||||||
kind: Metal3MachineTemplate
|
kind: Metal3MachineTemplate
|
||||||
name: cluster-controlplane
|
name: cluster-controlplane
|
||||||
fieldrefs: ["{.spec.template.spec.image}"]
|
fieldrefs: ["{.spec.template.spec.image}"]
|
||||||
|
# Replace the imageRepository in the KubeadmControlPlane
|
||||||
|
- source:
|
||||||
|
objref:
|
||||||
|
kind: VersionsCatalogue
|
||||||
|
name: versions-airshipctl
|
||||||
|
fieldref: "{.spec.image_repositories}"
|
||||||
|
target:
|
||||||
|
objref:
|
||||||
|
kind: KubeadmControlPlane
|
||||||
|
name: cluster-controlplane
|
||||||
|
fieldrefs: ["{.spec.kubeadmConfigSpec.clusterConfiguration.imageRepository}"]
|
||||||
|
Loading…
Reference in New Issue
Block a user