Skip to content

Commit 4052587

Browse files
committed
fix: updates items with new namespace
1 parent 3396a26 commit 4052587

File tree

15 files changed

+51
-41
lines changed

15 files changed

+51
-41
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export KUBERNETES_VERSION=v1.28.7
5151
clusterctl generate cluster ${CLUSTER_NAME} \
5252
--from ${CLUSTER_FILE} \
5353
--kubernetes-version ${KUBERNETES_VERSION} \
54+
-n caren-system \
5455
--worker-machine-count 1 | \
5556
kubectl apply --server-side -f -
5657
```

charts/cluster-api-runtime-extensions-nutanix/crds/crd-trust.cert-manager.io_bundles.yaml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
1-
# Copyright 2024 Nutanix. All rights reserved.
2-
# SPDX-License-Identifier: Apache-2.0
3-
4-
# Copyright 2023 D2iQ, Inc. All rights reserved.
5-
# SPDX-License-Identifier: Apache-2.0
6-
71
apiVersion: apiextensions.k8s.io/v1
82
kind: CustomResourceDefinition
93
metadata:
104
name: "bundles.trust.cert-manager.io"
115
annotations:
12-
helm.sh/resource-policy: keep
136
meta.helm.sh/release-name: cluster-api-runtime-extensions-nutanix
14-
meta.helm.sh/release-namespace: default
7+
meta.helm.sh/release-namespace: caren-system
158
labels:
169
app.kubernetes.io/managed-by: Helm
1710
spec:

charts/cluster-api-runtime-extensions-nutanix/defaultclusterclasses/aws-cluster-class.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ metadata:
44
labels:
55
cluster.x-k8s.io/provider: aws
66
name: aws-quick-start
7+
namespace: caren-system
78
spec:
89
controlPlane:
910
machineInfrastructure:
@@ -64,6 +65,7 @@ metadata:
6465
labels:
6566
cluster.x-k8s.io/provider: aws
6667
name: aws-quick-start
68+
namespace: caren-system
6769
spec:
6870
template:
6971
spec: {}
@@ -74,6 +76,7 @@ metadata:
7476
labels:
7577
cluster.x-k8s.io/provider: aws
7678
name: aws-quick-start-control-plane
79+
namespace: caren-system
7780
spec:
7881
template:
7982
spec:
@@ -102,6 +105,7 @@ metadata:
102105
labels:
103106
cluster.x-k8s.io/provider: aws
104107
name: aws-quick-start-control-plane
108+
namespace: caren-system
105109
spec:
106110
template:
107111
spec:
@@ -114,6 +118,7 @@ metadata:
114118
labels:
115119
cluster.x-k8s.io/provider: aws
116120
name: aws-quick-start-worker-machinetemplate
121+
namespace: caren-system
117122
spec:
118123
template:
119124
spec:
@@ -126,6 +131,7 @@ metadata:
126131
labels:
127132
cluster.x-k8s.io/provider: aws
128133
name: aws-quick-start-worker-bootstraptemplate
134+
namespace: caren-system
129135
spec:
130136
template:
131137
spec:

charts/cluster-api-runtime-extensions-nutanix/defaultclusterclasses/docker-cluster-class.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ metadata:
44
labels:
55
cluster.x-k8s.io/provider: docker
66
name: docker-quick-start
7+
namespace: caren-system
78
spec:
89
controlPlane:
910
machineInfrastructure:
@@ -50,6 +51,7 @@ metadata:
5051
labels:
5152
cluster.x-k8s.io/provider: docker
5253
name: docker-quick-start-cluster
54+
namespace: caren-system
5355
spec:
5456
template:
5557
spec: {}
@@ -60,6 +62,7 @@ metadata:
6062
labels:
6163
cluster.x-k8s.io/provider: docker
6264
name: docker-quick-start-control-plane
65+
namespace: caren-system
6366
spec:
6467
template:
6568
spec:
@@ -76,6 +79,7 @@ metadata:
7679
labels:
7780
cluster.x-k8s.io/provider: docker
7881
name: docker-quick-start-control-plane
82+
namespace: caren-system
7983
spec:
8084
template:
8185
spec:
@@ -89,6 +93,7 @@ metadata:
8993
labels:
9094
cluster.x-k8s.io/provider: docker
9195
name: docker-quick-start-default-worker-machinetemplate
96+
namespace: caren-system
9297
spec:
9398
template:
9499
spec:
@@ -102,6 +107,7 @@ metadata:
102107
labels:
103108
cluster.x-k8s.io/provider: docker
104109
name: docker-quick-start-default-worker-bootstraptemplate
110+
namespace: caren-system
105111
spec:
106112
template:
107113
spec:

charts/cluster-api-runtime-extensions-nutanix/defaultclusterclasses/nutanix-cluster-class.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ metadata:
44
labels:
55
cluster.x-k8s.io/provider: nutanix
66
name: nutanix-quick-start-kcfg-0
7+
namespace: caren-system
78
spec:
89
template:
910
spec:
@@ -26,6 +27,7 @@ metadata:
2627
labels:
2728
cluster.x-k8s.io/provider: nutanix
2829
name: nutanix-quick-start
30+
namespace: caren-system
2931
spec:
3032
controlPlane:
3133
machineHealthCheck:
@@ -116,6 +118,7 @@ metadata:
116118
labels:
117119
cluster.x-k8s.io/provider: nutanix
118120
name: nutanix-quick-start-kcpt
121+
namespace: caren-system
119122
spec:
120123
template:
121124
spec:
@@ -164,6 +167,7 @@ metadata:
164167
labels:
165168
cluster.x-k8s.io/provider: nutanix
166169
name: nutanix-quick-start-nct
170+
namespace: caren-system
167171
spec:
168172
template:
169173
spec:
@@ -185,6 +189,7 @@ metadata:
185189
labels:
186190
cluster.x-k8s.io/provider: nutanix
187191
name: nutanix-quick-start-cp-nmt
192+
namespace: caren-system
188193
spec:
189194
template:
190195
spec:
@@ -210,6 +215,7 @@ metadata:
210215
labels:
211216
cluster.x-k8s.io/provider: nutanix
212217
name: nutanix-quick-start-md-nmt
218+
namespace: caren-system
213219
spec:
214220
template:
215221
spec:

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

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,36 +10,37 @@ data:
1010
cilium: |
1111
ChartName: cilium
1212
ChartVersion: 1.15.0
13-
RepositoryURL: oci://mindthegap.mindthegap.svc/charts
13+
RepositoryURL: oci://mindthegap.caren-system.svc/charts
1414
cluster-autoscaler: |
1515
ChartName: cluster-autoscaler
1616
ChartVersion: 9.35.0
17-
RepositoryURL: oci://mindthegap.mindthegap.svc/charts
17+
RepositoryURL: oci://mindthegap.caren-system.svc/charts
1818
metallb: |
1919
ChartName: metallb
2020
ChartVersion: v0.14.5
21-
RepositoryURL: oci://mindthegap.mindthegap.svc/charts
21+
RepositoryURL: oci://mindthegap.caren-system.svc/charts
2222
nfd: |
2323
ChartName: node-feature-discovery
2424
ChartVersion: 0.15.2
25-
RepositoryURL: oci://mindthegap.mindthegap.svc/charts
25+
RepositoryURL: oci://mindthegap.caren-system.svc/charts
2626
nutanix-ccm: |
2727
ChartName: nutanix-cloud-provider
2828
ChartVersion: 0.3.3
29-
RepositoryURL: oci://mindthegap.mindthegap.svc/charts
29+
RepositoryURL: oci://mindthegap.caren-system.svc/charts
3030
nutanix-snapshot-csi: |
3131
ChartName: nutanix-csi-snapshot
3232
ChartVersion: 6.3.2
33-
RepositoryURL: oci://mindthegap.mindthegap.svc/charts
33+
RepositoryURL: oci://mindthegap.caren-system.svc/charts
3434
nutanix-storage-csi: |
3535
ChartName: nutanix-csi-storage
3636
ChartVersion: 3.0.0-beta.1912
37-
RepositoryURL: oci://mindthegap.mindthegap.svc/charts
37+
RepositoryURL: oci://mindthegap.caren-system.svc/charts
3838
tigera-operator: |
3939
ChartName: tigera-operator
4040
ChartVersion: v3.26.4
41-
RepositoryURL: oci://mindthegap.mindthegap.svc/charts
41+
RepositoryURL: oci://mindthegap.caren-system.svc/charts
4242
kind: ConfigMap
4343
metadata:
4444
creationTimestamp: null
4545
name: {{ .Values.helmAddonsConfigMap }}
46+
namespace: caren-system

charts/cluster-api-runtime-extensions-nutanix/templates/mindthegap.yaml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,23 @@
33
# This file contains the manifests to run a mindthegap deployment which contains helm charts for our addons.
44
# The pod is built via goreleaser with configuration from hack/addons.
55
#
6-
# NOTE: We use a hard code namespace here because trust-manager
7-
# need to set app.trust.namespace to be able to read secrets
8-
# from this namespace. We then distribute the certificates
9-
# to CAAPH system, which is the primary user of this service.
10-
apiVersion: v1
11-
kind: Namespace
12-
metadata:
13-
name: mindthegap
14-
---
156
apiVersion: cert-manager.io/v1
167
kind: Issuer
178
metadata:
189
name: mindthegap-selfsigned
19-
namespace: mindthegap
10+
namespace: {{ .Release.Namespace }}
2011
spec:
2112
selfSigned: {}
2213
---
2314
apiVersion: cert-manager.io/v1
2415
kind: Certificate
2516
metadata:
2617
name: mindthegap-tls
27-
namespace: mindthegap
18+
namespace: {{ .Release.Namespace }}
2819
spec:
2920
dnsNames:
30-
- mindthegap.mindthegap.svc
31-
- mindthegap.mindthegap.svc.cluster.local
21+
- mindthegap.{{ .Release.Namespace }}.svc
22+
- mindthegap.{{ .Release.Namespace }}.svc.cluster.local
3223
issuerRef:
3324
name: mindthegap-selfsigned
3425
kind: Issuer
@@ -38,7 +29,7 @@ apiVersion: apps/v1
3829
kind: Deployment
3930
metadata:
4031
name: mindthegap
41-
namespace: mindthegap
32+
namespace: {{ .Release.Namespace }}
4233
labels:
4334
app: mindthegap
4435
spec:
@@ -75,7 +66,7 @@ apiVersion: v1
7566
kind: Service
7667
metadata:
7768
name: mindthegap
78-
namespace: mindthegap
69+
namespace: {{ .Release.Namespace }}
7970
spec:
8071
selector:
8172
app: mindthegap

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
trust-manager:
55
app:
66
trust:
7-
namespace: mindthegap
8-
7+
namespace: caren-system
98
hooks:
109
cni:
1110
calico:

hack/addons/fetch-helm-crds.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ CRD_FILE="${CRD_PATH}/crd-trust.cert-manager.io_bundles.yaml"
2020
curl -l -o "${CRD_FILE}" "${RAW_URL}/${VERSION}/${CRD_URL_PATH}"
2121
#shellcheck disable=SC1083 # this is supposed to be literal values
2222
sed -i s/{{\.*}}//g "${CRD_FILE}"
23+
sed -i '/helm.sh\/resource-policy: keep/d' "${CRD_FILE}"
2324
yq -Y '.metadata.annotations["meta.helm.sh/release-name"] = "cluster-api-runtime-extensions-nutanix" |
24-
.metadata.annotations["meta.helm.sh/release-namespace"] = "default" |
25+
.metadata.annotations["meta.helm.sh/release-namespace"] = "caren-system" |
2526
.metadata.labels["app.kubernetes.io/managed-by"] = "Helm"' <./charts/cluster-api-runtime-extensions-nutanix/crds/crd-trust.cert-manager.io_bundles.yaml >>tmp.yaml
2627

2728
mv tmp.yaml "${CRD_FILE}"

hack/examples/overlays/clusterclasses/aws/kustomization.yaml.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
apiVersion: kustomize.config.k8s.io/v1beta1
55
kind: Kustomization
6+
namespace: caren-system
67

78
resources:
89
- ../../../bases/aws/clusterclass

hack/examples/overlays/clusterclasses/docker/kustomization.yaml.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
apiVersion: kustomize.config.k8s.io/v1beta1
55
kind: Kustomization
6+
namespace: caren-system
67

78
resources:
89
- ../../../bases/docker/clusterclass

hack/examples/overlays/clusterclasses/nutanix/kustomization.yaml.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
apiVersion: kustomize.config.k8s.io/v1beta1
55
kind: Kustomization
6+
namespace: caren-system
67

78
resources:
89
- ../../../bases/nutanix/clusterclass

hack/tools/helm-cm/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ func createConfigMapFromDir(kustomizeDir string) (*corev1.ConfigMap, error) {
134134

135135
finalCM := corev1.ConfigMap{
136136
ObjectMeta: metav1.ObjectMeta{
137-
Name: "placeholder",
137+
Name: "placeholder",
138+
Namespace: "caren-system",
138139
},
139140
TypeMeta: metav1.TypeMeta{
140141
APIVersion: corev1.SchemeGroupVersion.String(),

make/addons.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@ generate-mindthegap-repofile: generate-helm-configmap ; $(info $(M) generating h
6565

6666
.PHONY: replace-with-mindthegap
6767
replace-with-mindthegap: generate-mindthegap-repofile ## this is used by gorealeaser to set the helm value to this.
68-
sed -i 's/RepositoryURL:.*/RepositoryURL: oci:\/\/mindthegap.mindthegap.svc\/charts/g' "./charts/cluster-api-runtime-extensions-nutanix/templates/helm-config.yaml"
68+
sed -i 's/RepositoryURL:.*/RepositoryURL: oci:\/\/mindthegap.caren-system.svc\/charts/g' "./charts/cluster-api-runtime-extensions-nutanix/templates/helm-config.yaml"

make/dev.mk

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@ endif
1313
ko.local/cluster-api-runtime-extensions-nutanix:$$(gojq -r .version dist/metadata.json)
1414
kind load docker-image --name $(KIND_CLUSTER_NAME) \
1515
ghcr.io/nutanix-cloud-native/caren-helm-reg:$$(gojq -r .version dist/metadata.json)
16+
kubectl create namespace caren-system || true
1617
helm upgrade --install cluster-api-runtime-extensions-nutanix ./charts/cluster-api-runtime-extensions-nutanix \
18+
--namespace caren-system \
1719
--set-string image.repository=ko.local/cluster-api-runtime-extensions-nutanix \
1820
--set-string image.tag=$$(gojq -r .version dist/metadata.json) \
1921
--set-string mindthegapImage.tag=$$(gojq -r .version dist/metadata.json) \
2022
--wait --wait-for-jobs
21-
kubectl rollout restart deployment cluster-api-runtime-extensions-nutanix
22-
kubectl rollout status deployment cluster-api-runtime-extensions-nutanix
23+
kubectl rollout restart deployment cluster-api-runtime-extensions-nutanix -n caren-system
24+
kubectl rollout status deployment cluster-api-runtime-extensions-nutanix -n caren-system
2325

2426
.PHONY: dev.update-webhook-image-on-kind
2527
dev.update-webhook-image-on-kind: export KUBECONFIG := $(KIND_KUBECONFIG)
@@ -29,9 +31,9 @@ ifndef SKIP_BUILD
2931
endif
3032
kind load docker-image --name $(KIND_CLUSTER_NAME) \
3133
ko.local/cluster-api-runtime-extensions-nutanix:$$(gojq -r .version dist/metadata.json)
32-
kubectl set image deployment cluster-api-runtime-extensions-nutanix webhook=ko.local/cluster-api-runtime-extensions-nutanix:$$(gojq -r .version dist/metadata.json)
33-
kubectl rollout restart deployment cluster-api-runtime-extensions-nutanix
34-
kubectl rollout status deployment cluster-api-runtime-extensions-nutanix
34+
kubectl set image deployment -n caren-system cluster-api-runtime-extensions-nutanix webhook=ko.local/cluster-api-runtime-extensions-nutanix:$$(gojq -r .version dist/metadata.json)
35+
kubectl rollout restart deployment cluster-api-runtime-extensions-nutanix -n caren-system
36+
kubectl rollout status deployment cluster-api-runtime-extensions-nutanix -n caren-system
3537

3638

3739
.PHONY: dev.update-bootstrap-credentials-aws

0 commit comments

Comments
 (0)