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
|
||||
|
||||
kubernetes: v1.18.6
|
||||
|
||||
image_repositories: k8s.gcr.io
|
||||
|
@ -227,6 +227,10 @@ spec:
|
||||
description: Allows for the specification of the kubernetes version
|
||||
being used.
|
||||
type: string
|
||||
image_repositories:
|
||||
description: Allows for the specification of the image repositories
|
||||
being used.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
|
@ -3,6 +3,7 @@ kind: Kustomization
|
||||
resources:
|
||||
- ephemeral-env-vars.yaml
|
||||
- networking.yaml
|
||||
- versions.yaml
|
||||
- generated-secrets.yaml
|
||||
- stringData-encode.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:
|
||||
certSANs: REPLACEMENT_CERT_SANS
|
||||
imageRepository: REPLACEMENT_IMAGE_REPOSITORY
|
||||
apiVersion: kubeadm.k8s.io/v1beta2
|
||||
controllerManager: {}
|
||||
dns:
|
||||
|
@ -13,6 +13,7 @@ spec:
|
||||
clusterConfiguration:
|
||||
apiServer:
|
||||
timeoutForControlPlane: 1000s
|
||||
imageRepository: k8s.gcr.io
|
||||
files:
|
||||
- path: "/etc/systemd/system/containerd.service.d/http-proxy.conf"
|
||||
content: |
|
||||
|
@ -30,4 +30,14 @@ replacements:
|
||||
kind: Metal3MachineTemplate
|
||||
name: cluster-controlplane
|
||||
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