Skip to content

Commit

Permalink
Add support for customizing image and extension chart repoURL across …
Browse files Browse the repository at this point in the history
…templates (#493)
  • Loading branch information
squizzi authored Nov 8, 2024
1 parent 70419b1 commit fb83d23
Show file tree
Hide file tree
Showing 12 changed files with 206 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,27 @@ spec:
helm:
repositories:
- name: aws-cloud-controller-manager
{{- if .Values.extensions.chartRepository }}
url: {{ .Values.extensions.chartRepository }}
{{- else }}
url: https://kubernetes.github.io/cloud-provider-aws
{{- end }}
- name: aws-ebs-csi-driver
{{- if .Values.extensions.chartRepository }}
url: {{ .Values.extensions.chartRepository }}
{{- else }}
url: https://kubernetes-sigs.github.io/aws-ebs-csi-driver
{{- end }}
charts:
- name: aws-cloud-controller-manager
namespace: kube-system
chartname: aws-cloud-controller-manager/aws-cloud-controller-manager
version: "0.0.8"
values: |
image:
{{- if .Values.extensions.imageRepository }}
repository: {{ .Values.extensions.imageRepository }}
{{- end }}
tag: v1.30.3
args:
- --v=2
Expand All @@ -53,6 +64,32 @@ spec:
chartname: aws-ebs-csi-driver/aws-ebs-csi-driver
version: 2.33.0
values: |
{{- if .Values.extensions.imageRepository }}
image:
repository: {{ .Values.extensions.imageRepository }}
sidecars:
provisioner:
image:
repository: {{ .Values.extensions.imageRepository }}
attacher:
image:
repository: {{ .Values.extensions.imageRepository }}
snapshotter:
image:
repository: {{ .Values.extensions.imageRepository }}
livenessProbe:
image:
repository: {{ .Values.extensions.imageRepository }}
resizer:
image:
repository: {{ .Values.extensions.imageRepository }}
nodeDriverRegistrar:
image:
repository: {{ .Values.extensions.imageRepository }}
volumemodifier:
image:
repository: {{ .Values.extensions.imageRepository }}
{{- end }}
defaultStorageClass:
enabled: true
node:
Expand Down
6 changes: 6 additions & 0 deletions templates/cluster/aws-hosted-cp/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,9 @@ k0smotron:
# K0s parameters
k0s:
version: v1.31.1+k0s.1

# extensions defines custom Helm and image repositories to use for pulling
# k0s extensions.
extensions:
chartRepository: ""
imageRepository: ""
37 changes: 37 additions & 0 deletions templates/cluster/aws-standalone-cp/templates/k0scontrolplane.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,17 @@ spec:
helm:
repositories:
- name: aws-cloud-controller-manager
{{- if .Values.extensions.chartRepository }}
url: {{ .Values.extensions.chartRepository }}
{{- else }}
url: https://kubernetes.github.io/cloud-provider-aws
{{- end }}
- name: aws-ebs-csi-driver
{{- if .Values.extensions.chartRepository }}
url: {{ .Values.extensions.chartRepository}}
{{- else }}
url: https://kubernetes-sigs.github.io/aws-ebs-csi-driver
{{- end }}
charts:
- name: aws-cloud-controller-manager
namespace: kube-system
Expand All @@ -40,6 +48,9 @@ spec:
nodeSelector:
node-role.kubernetes.io/control-plane: "true"
image:
{{- if .Values.extensions.imageRepository }}
repository: {{ .Values.extensions.imageRepository }}
{{- end }}
tag: v1.30.3
args:
- --v=2
Expand All @@ -52,6 +63,32 @@ spec:
chartname: aws-ebs-csi-driver/aws-ebs-csi-driver
version: 2.33.0
values: |
{{- if .Values.extensions.imageRepository }}
image:
repository: {{ .Values.extensions.imageRepository }}
sidecars:
provisioner:
image:
repository: {{ .Values.extensions.imageRepository }}
attacher:
image:
repository: {{ .Values.extensions.imageRepository }}
snapshotter:
image:
repository: {{ .Values.extensions.imageRepository }}
livenessProbe:
image:
repository: {{ .Values.extensions.imageRepository }}
resizer:
image:
repository: {{ .Values.extensions.imageRepository }}
nodeDriverRegistrar:
image:
repository: {{ .Values.extensions.imageRepository }}
volumemodifier:
image:
repository: {{ .Values.extensions.imageRepository }}
{{- end }}
defaultStorageClass:
enabled: true
node:
Expand Down
6 changes: 6 additions & 0 deletions templates/cluster/aws-standalone-cp/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,9 @@ worker:
# K0s parameters
k0s:
version: v1.31.1+k0s.1

# extensions defines custom Helm and image repositories to use for pulling
# k0s extensions.
extensions:
chartRepository: ""
imageRepository: ""
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,17 @@ spec:
helm:
repositories:
- name: mirantis
{{- if .Values.extensions.chartRepository }}
url: {{ .Values.extensions.chartRepository }}
{{- else }}
url: https://charts.mirantis.com
{{- end }}
- name: azuredisk-csi-driver
{{- if .Values.extensions.chartRepository }}
url: {{ .Values.extensions.chartRepository }}
{{- else }}
url: https://raw.githubusercontent.com/kubernetes-sigs/azuredisk-csi-driver/master/charts
{{- end }}
charts:
- name: cloud-provider-azure
namespace: kube-system
Expand All @@ -40,12 +48,23 @@ spec:
cloudConfigSecretName: azure-cloud-provider
nodeSelector:
node-role.kubernetes.io/control-plane: null
{{- if .Values.extensions.imageRepository }}
imageRepository: {{ .Values.extensions.imageRepository }}
{{- end }}
{{- if .Values.extensions.imageRepository }}
cloudNodeManager:
imageRepository: {{ .Values.extensions.imageRepository }}
{{- end }}
- name: azuredisk-csi-driver
namespace: kube-system
chartname: azuredisk-csi-driver/azuredisk-csi-driver
version: 1.30.3
order: 2
values: |
{{- if .Values.extensions.imageRepository }}
image:
baseRepo: {{ .Values.extensions.imageRepository }}
{{- end }}
controller:
cloudConfigSecretName: azure-cloud-provider
node:
Expand Down
6 changes: 6 additions & 0 deletions templates/cluster/azure-hosted-cp/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,9 @@ k0smotron:
# K0s parameters
k0s:
version: v1.31.1+k0s.1

# extensions defines custom Helm and image repositories to use for pulling
# k0s extensions.
extensions:
chartRepository: ""
imageRepository: ""
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,17 @@ spec:
helm:
repositories:
- name: mirantis
{{- if .Values.extensions.chartRepository }}
url: {{ .Values.extensions.chartRepository }}
{{- else }}
url: https://charts.mirantis.com
{{- end }}
- name: azuredisk-csi-driver
{{- if .Values.extensions.chartRepository }}
url: {{ .Values.extensions.chartRepository }}
{{- else }}
url: https://raw.githubusercontent.com/kubernetes-sigs/azuredisk-csi-driver/master/charts
{{- end }}
charts:
- name: cloud-provider-azure
namespace: kube-system
Expand All @@ -42,12 +50,23 @@ spec:
cloudConfigSecretName: azure-cloud-provider
nodeSelector:
node-role.kubernetes.io/control-plane: "true"
{{- if .Values.extensions.imageRepository }}
imageRepository: {{ .Values.extensions.imageRepository }}
{{- end }}
{{- if .Values.extensions.imageRepository }}
cloudNodeManager:
imageRepository: {{ .Values.extensions.imageRepository }}
{{- end }}
- name: azuredisk-csi-driver
namespace: kube-system
chartname: azuredisk-csi-driver/azuredisk-csi-driver
version: 1.30.3
order: 2
values: |
{{- if .Values.extensions.imageRepository }}
image:
baseRepo: {{ .Values.extensions.imageRepository }}
{{- end }}
controller:
cloudConfigSecretName: azure-cloud-provider
node:
Expand Down
6 changes: 6 additions & 0 deletions templates/cluster/azure-standalone-cp/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,9 @@ worker:
# K0s parameters
k0s:
version: v1.31.1+k0s.1

# extensions defines custom Helm and image repositories to use for pulling
# k0s extensions.
extensions:
chartRepository: ""
imageRepository: ""
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,17 @@ spec:
helm:
repositories:
- name: vsphere-cpi
{{- if .Values.extensions.chartRepository }}
url: {{ .Values.extensions.chartRepository }}
{{- else }}
url: https://kubernetes.github.io/cloud-provider-vsphere
{{- end }}
- name: mirantis
{{- if .Values.extensions.chartRepository }}
url: {{ .Values.extensions.chartRepository }}
{{- else }}
url: https://charts.mirantis.com
{{- end }}
charts:
- name: vsphere-cpi
chartname: vsphere-cpi/vsphere-cpi
Expand All @@ -40,6 +48,9 @@ spec:
enabled: false
daemonset:
affinity: null
{{- if .Values.extensions.imageRepository }}
image: {{ .Values.extensions.imageRepository }}/cloud-provider-vsphere
{{- end }}
tolerations:
- effect: NoSchedule
key: node.cloudprovider.kubernetes.io/uninitialized
Expand Down Expand Up @@ -72,6 +83,26 @@ spec:
enabled: true
images:
driver:
{{- if .Values.extensions.imageRepository }}
repo: {{ .Values.extensions.imageRepository }}/csi-vsphere/driver
{{- end }}
tag: v3.1.2
syncer:
{{- if .Values.extensions.imageRepository }}
repo: {{ .Values.extensions.imageRepository }}/csi-vsphere/syncer
{{- end }}
tag: v3.1.2
{{- if .Values.extensions.imageRepository }}
nodeDriverRegistrar:
repo: {{ .Values.extensions.imageRepository }}/sig-storage/csi-node-driver-registrar
csiAttacher:
repo: {{ .Values.extensions.imageRepository }}/sig-storage/csi-attacher
csiResizer:
repo: {{ .Values.extensions.imageRepository }}/sig-storage/csi-resizer
csiProvisioner:
repo: {{ .Values.extensions.imageRepository }}/sig-storage/csi-provisioner
csiSnapshotter:
repo: {{ .Values.extensions.imageRepository }}/sig-storage/csi-snapshotter
livenessProbe:
repo: {{ .Values.extensions.imageRepository }}/csi-vsphere/livenessprobe
{{- end }}
6 changes: 6 additions & 0 deletions templates/cluster/vsphere-hosted-cp/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,9 @@ k0smotron:
# K0s parameters
k0s:
version: v1.31.1+k0s.1

# extensions defines custom Helm and image repositories to use for pulling
# k0s extensions.
extensions:
chartRepository: ""
imageRepository: ""
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ spec:
order: 1
namespace: kube-system
values: |
{{- if .Values.extensions.imageRepository }}
image:
repository: {{ .Values.extensions.imageRepository }}/kube-vip
{{- end }}
config:
address: {{ .Values.controlPlaneEndpointIP }}
env:
Expand Down Expand Up @@ -74,6 +78,9 @@ spec:
config:
enabled: false
daemonset:
{{- if .Values.extensions.imageRepository }}
image: {{ .Values.extensions.imageRepository }}/cloud-provider-vsphere
{{- end }}
tolerations:
- effect: NoSchedule
key: node.cloudprovider.kubernetes.io/uninitialized
Expand Down Expand Up @@ -104,9 +111,29 @@ spec:
enabled: true
images:
driver:
{{- if .Values.extensions.imageRepository }}
repo: {{ .Values.extensions.imageRepository }}/csi-vsphere/driver
{{- end }}
tag: v3.1.2
syncer:
{{- if .Values.extensions.imageRepository }}
repo: {{ .Values.extensions.imageRepository }}/csi-vsphere/syncer
{{- end }}
tag: v3.1.2
{{- if .Values.extensions.imageRepository }}
nodeDriverRegistrar:
repo: {{ .Values.extensions.imageRepository }}/sig-storage/csi-node-driver-registrar
csiAttacher:
repo: {{ .Values.extensions.imageRepository }}/sig-storage/csi-attacher
csiResizer:
repo: {{ .Values.extensions.imageRepository }}/sig-storage/csi-resizer
csiProvisioner:
repo: {{ .Values.extensions.imageRepository }}/sig-storage/csi-provisioner
csiSnapshotter:
repo: {{ .Values.extensions.imageRepository }}/sig-storage/csi-snapshotter
livenessProbe:
repo: {{ .Values.extensions.imageRepository }}/csi-vsphere/livenessprobe
{{- end }}
machineTemplate:
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
Expand Down
6 changes: 6 additions & 0 deletions templates/cluster/vsphere-standalone-cp/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,9 @@ worker:
# K0s parameters
k0s:
version: v1.31.1+k0s.1

# extensions defines custom Helm and image repositories to use for pulling
# k0s extensions.
extensions:
chartRepository: ""
imageRepository: ""

0 comments on commit fb83d23

Please sign in to comment.