Skip to content

Commit 2c3e4f3

Browse files
committed
fix: more changes from review
1 parent 2fc959f commit 2c3e4f3

File tree

10 files changed

+39
-39
lines changed

10 files changed

+39
-39
lines changed

.github/workflows/checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ jobs:
239239
devbox run -- \
240240
ct install \
241241
--config charts/ct-config.yaml \
242-
--helm-extra-set-args "--set-string image.repository=ko.local/cluster-api-runtime-extensions-nutanix --set-string image.tag=$(devbox run -- gojq -r .version dist/metadata.json) --set-string mindthegapImage.tag=$(devbox run -- gojq -r .version dist/metadata.json)"
242+
--helm-extra-set-args "--set-string image.repository=ko.local/cluster-api-runtime-extensions-nutanix --set-string image.tag=$(devbox run -- gojq -r .version dist/metadata.json) --set-string helmRepositoryImage.tag=$(devbox run -- gojq -r .version dist/metadata.json)"
243243
env:
244244
KUBECONFIG: ct-kind-kubeconfig
245245

.goreleaser.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ before:
4242
$(helm template {{ .ProjectName }} ./charts/{{ .ProjectName }} \
4343
--namespace caren-system \
4444
--set-string image.tag=v{{ trimprefix .Version "v" }} \
45-
--set-string mindthgapImage.tag=v{{ trimprefix .Version "v" }} \
45+
--set-string helmRepositoryImage.tag=v{{ trimprefix .Version "v" }} \
4646
{{ if .IsSnapshot }}--set-string image.repository=ko.local/{{ .ProjectName }}{{ end }} \
4747
)
4848
EOF'
@@ -51,7 +51,7 @@ before:
5151
sh -ec 'gojq --yaml-input --yaml-output \
5252
".releaseSeries |= (. + [{contract: \"v1beta1\", major: {{ .Major }}, minor: {{ .Minor }}}] | unique)" \
5353
metadata.yaml >release-metadata.yaml'
54-
- make template-mindthegap
54+
- make template-helm-repository
5555

5656

5757
builds:

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ repos:
3636
pass_filenames: false
3737
- id: addons-repo-yaml
3838
name: addons-repo-yaml
39-
entry: make template-mindthegap
39+
entry: make template-helm-repository
4040
language: system
4141
files: "hack/addons/mindthegap-helm-registry/repos.yaml"
4242
pass_filenames: false

charts/cluster-api-runtime-extensions-nutanix/templates/helm-config.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,39 +10,39 @@ data:
1010
cilium: |
1111
ChartName: cilium
1212
ChartVersion: 1.15.5
13-
RepositoryURL: {{ if .Values.selfHostedRegistry }}oci://mindthegap.{{ .Release.Namespace }}.svc/charts{{ else }}https://helm.cilium.io/{{ end }}
13+
RepositoryURL: {{ if .Values.selfHostedRegistry }}oci://helm-repository.{{ .Release.Namespace }}.svc/charts{{ else }}https://helm.cilium.io/{{ end }}
1414
cluster-autoscaler: |
1515
ChartName: cluster-autoscaler
1616
ChartVersion: 9.37.0
17-
RepositoryURL: {{ if .Values.selfHostedRegistry }}oci://mindthegap.{{ .Release.Namespace }}.svc/charts{{ else }}https://kubernetes.github.io/autoscaler{{ end }}
17+
RepositoryURL: {{ if .Values.selfHostedRegistry }}oci://helm-repository.{{ .Release.Namespace }}.svc/charts{{ else }}https://kubernetes.github.io/autoscaler{{ end }}
1818
local-path-provisioner-csi: |
1919
ChartName: local-path-provisioner
2020
ChartVersion: 0.0.29
21-
RepositoryURL: {{ if .Values.selfHostedRegistry }}oci://mindthegap.{{ .Release.Namespace }}.svc/charts{{ else }}https://charts.containeroo.ch{{ end }}
21+
RepositoryURL: {{ if .Values.selfHostedRegistry }}oci://helm-repository.{{ .Release.Namespace }}.svc/charts{{ else }}https://charts.containeroo.ch{{ end }}
2222
metallb: |
2323
ChartName: metallb
24-
ChartVersion: v0.14.5
25-
RepositoryURL: {{ if .Values.selfHostedRegistry }}oci://mindthegap.{{ .Release.Namespace }}.svc/charts{{ else }}https://metallb.github.io/metallb{{ end }}
24+
ChartVersion: 0.14.5
25+
RepositoryURL: {{ if .Values.selfHostedRegistry }}oci://helm-repository.{{ .Release.Namespace }}.svc/charts{{ else }}https://metallb.github.io/metallb{{ end }}
2626
nfd: |
2727
ChartName: node-feature-discovery
2828
ChartVersion: 0.15.2
29-
RepositoryURL: {{ if .Values.selfHostedRegistry }}oci://mindthegap.{{ .Release.Namespace }}.svc/charts{{ else }}https://kubernetes-sigs.github.io/node-feature-discovery/charts{{ end }}
29+
RepositoryURL: {{ if .Values.selfHostedRegistry }}oci://helm-repository.{{ .Release.Namespace }}.svc/charts{{ else }}https://kubernetes-sigs.github.io/node-feature-discovery/charts{{ end }}
3030
nutanix-ccm: |
3131
ChartName: nutanix-cloud-provider
3232
ChartVersion: 0.3.3
33-
RepositoryURL: {{ if .Values.selfHostedRegistry }}oci://mindthegap.{{ .Release.Namespace }}.svc/charts{{ else }}https://nutanix.github.io/helm/{{ end }}
33+
RepositoryURL: {{ if .Values.selfHostedRegistry }}oci://helm-repository.{{ .Release.Namespace }}.svc/charts{{ else }}https://nutanix.github.io/helm/{{ end }}
3434
nutanix-snapshot-csi: |
3535
ChartName: nutanix-csi-snapshot
3636
ChartVersion: 6.3.2
37-
RepositoryURL: {{ if .Values.selfHostedRegistry }}oci://mindthegap.{{ .Release.Namespace }}.svc/charts{{ else }}https://nutanix.github.io/helm/{{ end }}
37+
RepositoryURL: {{ if .Values.selfHostedRegistry }}oci://helm-repository.{{ .Release.Namespace }}.svc/charts{{ else }}https://nutanix.github.io/helm/{{ end }}
3838
nutanix-storage-csi: |
3939
ChartName: nutanix-csi-storage
4040
ChartVersion: 3.0.0-beta.1912
41-
RepositoryURL: {{ if .Values.selfHostedRegistry }}oci://mindthegap.{{ .Release.Namespace }}.svc/charts{{ else }}https://nutanix.github.io/helm-releases/{{ end }}
41+
RepositoryURL: {{ if .Values.selfHostedRegistry }}oci://helm-repository.{{ .Release.Namespace }}.svc/charts{{ else }}https://nutanix.github.io/helm-releases/{{ end }}
4242
tigera-operator: |
4343
ChartName: tigera-operator
4444
ChartVersion: v3.28.0
45-
RepositoryURL: {{ if .Values.selfHostedRegistry }}oci://mindthegap.{{ .Release.Namespace }}.svc/charts{{ else }}https://docs.tigera.io/calico/charts{{ end }}
45+
RepositoryURL: {{ if .Values.selfHostedRegistry }}oci://helm-repository.{{ .Release.Namespace }}.svc/charts{{ else }}https://docs.tigera.io/calico/charts{{ end }}
4646
kind: ConfigMap
4747
metadata:
4848
creationTimestamp: null

charts/cluster-api-runtime-extensions-nutanix/templates/mindthegap.yaml renamed to charts/cluster-api-runtime-extensions-nutanix/templates/helm-repository.yaml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,57 @@
11
# Copyright 2024 Nutanix. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
3-
# This file contains the manifests to run a mindthegap deployment which contains helm charts for our addons.
3+
# This file contains the manifests to run a helmRepository deployment which contains helm charts for our addons.
44
# The pod is built via goreleaser with configuration from hack/addons.
55
#
66
{{ if .Values.selfHostedRegistry }}
77
apiVersion: cert-manager.io/v1
88
kind: Issuer
99
metadata:
10-
name: mindthegap-selfsigned
10+
name: helm-repository-selfsigned
1111
namespace: {{ .Release.Namespace }}
1212
spec:
1313
selfSigned: {}
1414
---
1515
apiVersion: cert-manager.io/v1
1616
kind: Certificate
1717
metadata:
18-
name: mindthegap-tls
18+
name: helm-repository-tls
1919
namespace: {{ .Release.Namespace }}
2020
spec:
2121
dnsNames:
22-
- mindthegap.{{ .Release.Namespace }}.svc
23-
- mindthegap.{{ .Release.Namespace }}.svc.cluster.local
22+
- helm-repository.{{ .Release.Namespace }}.svc
23+
- helm-repository.{{ .Release.Namespace }}.svc.cluster.local
2424
issuerRef:
25-
name: mindthegap-selfsigned
25+
name: helm-repository-selfsigned
2626
kind: Issuer
27-
secretName: mindthegap-tls
27+
secretName: helm-repository-tls
2828
---
2929
apiVersion: apps/v1
3030
kind: Deployment
3131
metadata:
32-
name: mindthegap
32+
name: helm-repository
3333
namespace: {{ .Release.Namespace }}
3434
labels:
35-
app: mindthegap
35+
app: helm-repository
3636
spec:
3737
replicas: 1
3838
strategy:
3939
type: Recreate
4040
selector:
4141
matchLabels:
42-
app: mindthegap # deployment will track pods it generates because of this
42+
app: helm-repository # deployment will track pods it generates because of this
4343
template:
4444
metadata:
4545
labels:
46-
app: mindthegap # pods have this label, and Service and Deployment depend on it
46+
app: helm-repository # pods have this label, and Service and Deployment depend on it
4747
spec:
4848
containers:
49-
- name: mindthegap
49+
- name: helm-repository
5050
ports:
5151
- name: serve
5252
protocol: TCP
5353
containerPort: 5000
54-
image: "{{ .Values.mindthegapImage.repository }}:{{ .Values.mindthegapImage.tag | default $.Chart.AppVersion }}"
54+
image: "{{ .Values.helmRepositoryImage.repository }}:{{ .Values.helmRepositoryImage.tag | default $.Chart.AppVersion }}"
5555
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
5656
volumeMounts:
5757
- name: certs-vol
@@ -61,16 +61,16 @@ spec:
6161
volumes:
6262
- name: certs-vol
6363
secret:
64-
secretName: mindthegap-tls
64+
secretName: helm-repository-tls
6565
---
6666
apiVersion: v1
6767
kind: Service
6868
metadata:
69-
name: mindthegap
69+
name: helm-repository
7070
namespace: {{ .Release.Namespace }}
7171
spec:
7272
selector:
73-
app: mindthegap
73+
app: helm-repository
7474
ports:
7575
- port: 443
7676
targetPort: 5000

charts/cluster-api-runtime-extensions-nutanix/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ image:
9797
tag: ""
9898
pullPolicy: IfNotPresent
9999

100-
mindthegapImage:
100+
helmRepositoryImage:
101101
repository: ghcr.io/nutanix-cloud-native/caren-helm-reg
102102
tag: ""
103103
pullPolicy: IfNotPresent

hack/addons/mindthegap-helm-registry/repos.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ repositories:
2525
repoURL: https://metallb.github.io/metallb
2626
charts:
2727
metallb:
28-
- v0.14.5
28+
- 0.14.5
2929
node-feature-discovery:
3030
repoURL: https://kubernetes-sigs.github.io/node-feature-discovery/charts
3131
charts:

make/addons.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export NUTANIX_CCM_CHART_VERSION := 0.3.3
2222

2323
export KUBE_VIP_VERSION := v0.8.0
2424

25-
export METALLB_CHART_VERSION := v0.14.5
25+
export METALLB_CHART_VERSION := 0.14.5
2626

2727
# Below are the lists of CSI Providers allowed for a specific infrastructure.
2828
# - When we support a new infrastructure, we need to a create a new list using the same convention.
@@ -76,6 +76,6 @@ configure-csi-providers: ; $(info $(M) configuring supported csi providers)
7676
generate-mindthegap-repofile: generate-helm-configmap ; $(info $(M) generating helm repofile for mindthgap)
7777
./hack/addons/generate-mindthegap-repofile.sh
7878

79-
.PHONY: template-mindthegap
80-
template-mindthegap: generate-mindthegap-repofile ## this is used by gorealeaser to set the helm value to this.
81-
sed -i '/RepositoryURL:/s#\(RepositoryURL: *\)\(.*\)#\1{{ if .Values.selfHostedRegistry }}oci://mindthegap.{{ .Release.Namespace }}.svc/charts{{ else }}\2{{ end }}#' "./charts/cluster-api-runtime-extensions-nutanix/templates/helm-config.yaml"
79+
.PHONY: template-helm-repository
80+
template-helm-repository: generate-mindthegap-repofile ## this is used by gorealeaser to set the helm value to this.
81+
sed -i '/RepositoryURL:/s#\(RepositoryURL: *\)\(.*\)#\1{{ if .Values.selfHostedRegistry }}oci://helm-repository.{{ .Release.Namespace }}.svc/charts{{ else }}\2{{ end }}#' "./charts/cluster-api-runtime-extensions-nutanix/templates/helm-config.yaml"

make/dev.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ endif
1414
helm upgrade --install cluster-api-runtime-extensions-nutanix ./charts/cluster-api-runtime-extensions-nutanix \
1515
--set-string image.repository=ko.local/cluster-api-runtime-extensions-nutanix \
1616
--set-string image.tag=$$(gojq -r .version dist/metadata.json) \
17-
--set-string mindthegapImage.tag=$$(gojq -r .version dist/metadata.json) \
17+
--set-string helmRepositoryImage.tag=$$(gojq -r .version dist/metadata.json) \
1818
--wait --wait-for-jobs
1919
kubectl rollout restart deployment cluster-api-runtime-extensions-nutanix
2020
kubectl rollout status deployment cluster-api-runtime-extensions-nutanix

pkg/handlers/generic/lifecycle/utils/utils.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,10 @@ func SetTLSConfigForHelmChartProxyIfNeeded(hcp *caaphv1.HelmChartProxy) {
230230
if deploymentNS == "" {
231231
deploymentNS = v1alpha1.CarenNamespace
232232
}
233-
if strings.Contains(hcp.Spec.RepoURL, "mindthegap") {
233+
if strings.Contains(hcp.Spec.RepoURL, "helm-repository") {
234234
hcp.Spec.TLSConfig = &caaphv1.TLSConfig{
235235
CASecretRef: &corev1.SecretReference{
236-
Name: "mindthegap-tls",
236+
Name: "helm-repository-tls",
237237
Namespace: deploymentNS,
238238
},
239239
}

0 commit comments

Comments
 (0)