-
Notifications
You must be signed in to change notification settings - Fork 7
fix: issues with mindthegap deplotment #660
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 9 commits
823cb9b
dc5f0ca
92f5dbd
79428c5
051e0c7
3396a26
4052587
c222806
40853b8
254dacf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
dependencies: | ||
- name: trust-manager | ||
repository: https://charts.jetstack.io | ||
version: v0.10.0 | ||
digest: sha256:58f4f9fd7f71f972e9344c62c1f61978ab19cc174d8854c9d5de7da83eee2049 | ||
generated: "2024-05-13T12:35:00.623992598-06:00" |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright 2024 Nutanix. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
apiVersion: trust.cert-manager.io/v1alpha1 | ||
kind: Bundle | ||
metadata: | ||
name: caren-bundle | ||
spec: | ||
sources: | ||
- useDefaultCAs: true | ||
- secret: | ||
key: tls.crt | ||
name: mindthegap-tls | ||
target: | ||
configMap: | ||
key: ca-certificates.crt | ||
namespaceSelector: | ||
matchLabels: | ||
clusterctl.cluster.x-k8s.io: "" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,36 +10,37 @@ data: | |
cilium: | | ||
ChartName: cilium | ||
ChartVersion: 1.15.0 | ||
RepositoryURL: oci://mindthegap.{{ .Release.Namespace }}.svc | ||
RepositoryURL: oci://mindthegap.caren-system.svc/charts | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This won't work if deployed in a different namespace? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that is correct. it needs to be deployed in that namespace, this is a limitation of trust-manager needing trust namespace set. this comment explains it cert-manager/trust-manager#120 (comment) if helm was able to use templating in values.yaml we could get around this |
||
cluster-autoscaler: | | ||
ChartName: cluster-autoscaler | ||
ChartVersion: 9.35.0 | ||
RepositoryURL: oci://mindthegap.{{ .Release.Namespace }}.svc | ||
RepositoryURL: oci://mindthegap.caren-system.svc/charts | ||
metallb: | | ||
ChartName: metallb | ||
ChartVersion: v0.14.5 | ||
RepositoryURL: oci://mindthegap.{{ .Release.Namespace }}.svc | ||
RepositoryURL: oci://mindthegap.caren-system.svc/charts | ||
nfd: | | ||
ChartName: node-feature-discovery | ||
ChartVersion: v0.15.2 | ||
RepositoryURL: oci://mindthegap.{{ .Release.Namespace }}.svc | ||
ChartVersion: 0.15.2 | ||
RepositoryURL: oci://mindthegap.caren-system.svc/charts | ||
nutanix-ccm: | | ||
ChartName: nutanix-cloud-provider | ||
ChartVersion: 0.3.3 | ||
RepositoryURL: oci://mindthegap.{{ .Release.Namespace }}.svc | ||
RepositoryURL: oci://mindthegap.caren-system.svc/charts | ||
nutanix-snapshot-csi: | | ||
ChartName: nutanix-csi-snapshot | ||
ChartVersion: 6.3.2 | ||
RepositoryURL: oci://mindthegap.{{ .Release.Namespace }}.svc | ||
RepositoryURL: oci://mindthegap.caren-system.svc/charts | ||
nutanix-storage-csi: | | ||
ChartName: nutanix-csi-storage | ||
ChartVersion: v3.0.0-beta.1912 | ||
RepositoryURL: oci://mindthegap.{{ .Release.Namespace }}.svc | ||
ChartVersion: 3.0.0-beta.1912 | ||
RepositoryURL: oci://mindthegap.caren-system.svc/charts | ||
tigera-operator: | | ||
ChartName: tigera-operator | ||
ChartVersion: v3.26.4 | ||
RepositoryURL: oci://mindthegap.{{ .Release.Namespace }}.svc | ||
RepositoryURL: oci://mindthegap.caren-system.svc/charts | ||
kind: ConfigMap | ||
metadata: | ||
creationTimestamp: null | ||
name: {{ .Values.helmAddonsConfigMap }} | ||
namespace: caren-system |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Copyright 2024 Nutanix. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
name: helm-hook-role | ||
namespace: caaph-system | ||
rules: | ||
- apiGroups: | ||
- apps | ||
resources: | ||
- deployments | ||
verbs: | ||
- get | ||
- list | ||
- patch | ||
- update |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Copyright 2024 Nutanix. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
name: helm-hook-binding | ||
namespace: caaph-system | ||
subjects: | ||
- kind: ServiceAccount | ||
name: helm-hook-sa | ||
namespace: caaph-system | ||
roleRef: | ||
kind: Role | ||
name: helm-hook-role | ||
apiGroup: rbac.authorization.k8s.io |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Copyright 2024 Nutanix. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: helm-hook-sa | ||
namespace: caaph-system |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# Copyright 2024 Nutanix. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: update-trust-manager-namespace | ||
namespace: caaph-system | ||
spec: | ||
template: | ||
spec: | ||
serviceAccountName: helm-hook-sa | ||
containers: | ||
- name: kubectl | ||
image: bitnami/kubectl:latest | ||
command: | ||
- /bin/sh | ||
- -c | ||
- | | ||
set -e | ||
# Check if volume already exists | ||
if kubectl get deployment caaph-controller-manager -n caaph-system -o jsonpath='{.spec.template.spec.volumes[?(@.name=="ca-certificate-only")]}' | grep -q "ca-certificate-only"; then | ||
echo "Volume already exists. Skipping addition." | ||
else | ||
kubectl patch deployment caaph-controller-manager \ | ||
-n caaph-system \ | ||
--type=json \ | ||
-p='[ | ||
{ | ||
"op": "add", | ||
"path": "/spec/template/spec/volumes/-", | ||
"value": { | ||
"name": "ca-certificate-only", | ||
"configMap": { | ||
"name": "caren-bundle", | ||
"defaultMode": 420, | ||
"optional": false, | ||
"items": [ | ||
{ | ||
"key": "ca-certificates.crt", | ||
"path": "ca-certificates.crt" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
]' | ||
fi | ||
if kubectl get deployment caaph-controller-manager -n caaph-system -o jsonpath='{.spec.template.spec.containers[0].volumeMounts[?(@.mountPath=="/etc/ssl/certs/")]}' | grep -q "ca-certificate-only"; then | ||
echo "VolumeMount already exists. Skipping addition." | ||
else | ||
kubectl patch deployment caaph-controller-manager \ | ||
-n caaph-system \ | ||
--type=json \ | ||
-p='[ | ||
{ | ||
"op": "add", | ||
"path": "/spec/template/spec/containers/0/volumeMounts/-", | ||
"value": { | ||
"mountPath": "/etc/ssl/certs/", | ||
"name": "ca-certificate-only", | ||
"readOnly": true | ||
} | ||
} | ||
]' | ||
fi | ||
restartPolicy: Never |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not keen on trust-manager being a requirement for CAREN - shouldn't this be a user deployment configuration rather than a strict requirement? It could conflict with existing trust-manager deployment for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can keep this functionality until we implement #497
We might be able to then set this behind a boolean gate. If that is the case, i'm not sure what the implication for konvoy would be. How should we template it?
On the other hand, CAREN is already a highly opinionated and has a ton of dependencies adding another isn't that big of a deal IMO