Skip to content
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

Use release namespace in CDI #67

Merged
merged 2 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified assets/cdi/cdi-0.2.0.tgz
Binary file not shown.
2 changes: 1 addition & 1 deletion charts/cdi/0.2.0/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Verify that all CDI components are installed correctly:
kubectl get all -n cdi
kubectl get all -n {{ .Release.Namespace }}
19 changes: 6 additions & 13 deletions charts/cdi/0.2.0/templates/cdi-operator.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
apiVersion: v1
kind: Namespace
metadata:
labels:
cdi.kubevirt.io: ""
name: cdi
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
Expand Down Expand Up @@ -277,15 +270,15 @@ roleRef:
subjects:
- kind: ServiceAccount
name: cdi-operator
namespace: cdi
namespace: {{ .Release.Namespace }}
---
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
operator.cdi.kubevirt.io: ""
name: cdi-operator
namespace: cdi
namespace: {{ .Release.Namespace }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
Expand All @@ -295,7 +288,7 @@ metadata:
app.kubernetes.io/managed-by: cdi-operator
cdi.kubevirt.io: ""
name: cdi-operator
namespace: cdi
namespace: {{ .Release.Namespace }}
rules:
- apiGroups:
- rbac.authorization.k8s.io
Expand Down Expand Up @@ -364,15 +357,15 @@ metadata:
app.kubernetes.io/managed-by: cdi-operator
cdi.kubevirt.io: ""
name: cdi-operator
namespace: cdi
namespace: {{ .Release.Namespace }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: cdi-operator
subjects:
- kind: ServiceAccount
name: cdi-operator
namespace: cdi
namespace: {{ .Release.Namespace }}
---
apiVersion: apps/v1
kind: Deployment
Expand All @@ -382,7 +375,7 @@ metadata:
operator.cdi.kubevirt.io: ""
prometheus.cdi.kubevirt.io: "true"
name: cdi-operator
namespace: cdi
namespace: {{ .Release.Namespace }}
spec:
replicas: 1
selector:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: ServiceAccount
metadata:
namespace: cdi
namespace: {{ .Release.Namespace }}
name: cdi-cr-uninstaller
annotations:
"helm.sh/hook": pre-delete
Expand Down Expand Up @@ -33,7 +33,7 @@ metadata:
"helm.sh/hook-weight": "2"
subjects:
- kind: ServiceAccount
namespace: cdi
namespace: {{ .Release.Namespace }}
name: cdi-cr-uninstaller
roleRef:
kind: ClusterRole
Expand All @@ -43,7 +43,7 @@ roleRef:
apiVersion: batch/v1
kind: Job
metadata:
namespace: cdi
namespace: {{ .Release.Namespace }}
name: cdi-cr-uninstaller
annotations:
"helm.sh/hook": pre-delete
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
apiVersion: v1
kind: Namespace
metadata:
name: cdi-crd-uninstall
annotations:
"helm.sh/hook": post-delete
"helm.sh/hook-delete-policy": hook-succeeded
"helm.sh/hook-weight": "1"
---
apiVersion: v1
kind: ServiceAccount
metadata:
namespace: cdi-crd-uninstall
namespace: {{ .Release.Namespace }}
name: cdi-crd-uninstaller
annotations:
"helm.sh/hook": post-delete
"helm.sh/hook-delete-policy": hook-succeeded
"helm.sh/hook-weight": "2"
"helm.sh/hook-weight": "1"
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand All @@ -24,7 +15,7 @@ metadata:
annotations:
"helm.sh/hook": post-delete
"helm.sh/hook-delete-policy": hook-succeeded
"helm.sh/hook-weight": "2"
"helm.sh/hook-weight": "1"
rules:
- apiGroups: [ "apiextensions.k8s.io" ]
resources: [ "customresourcedefinitions" ]
Expand All @@ -39,10 +30,10 @@ metadata:
annotations:
"helm.sh/hook": post-delete
"helm.sh/hook-delete-policy": hook-succeeded
"helm.sh/hook-weight": "3"
"helm.sh/hook-weight": "2"
subjects:
- kind: ServiceAccount
namespace: cdi-crd-uninstall
namespace: {{ .Release.Namespace }}
name: cdi-crd-uninstaller
roleRef:
kind: ClusterRole
Expand All @@ -52,12 +43,12 @@ roleRef:
apiVersion: batch/v1
kind: Job
metadata:
namespace: cdi-crd-uninstall
namespace: {{ .Release.Namespace }}
name: cdi-crd-uninstaller
annotations:
"helm.sh/hook": post-delete
"helm.sh/hook-delete-policy": hook-succeeded
"helm.sh/hook-weight": "4"
"helm.sh/hook-weight": "3"
spec:
template:
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,34 +1,25 @@
apiVersion: v1
kind: Namespace
metadata:
name: cdi-crd-upgrade
annotations:
"helm.sh/hook": pre-upgrade
"helm.sh/hook-delete-policy": hook-succeeded
"helm.sh/hook-weight": "1"
---
apiVersion: v1
kind: ConfigMap
metadata:
namespace: cdi-crd-upgrade
namespace: {{ .Release.Namespace }}
name: cdi-crd-manifest
annotations:
"helm.sh/hook": pre-upgrade
"helm.sh/hook-delete-policy": hook-succeeded
"helm.sh/hook-weight": "2"
"helm.sh/hook-weight": "1"
data:
crd: |-
{{ $.Files.Get "crds/cdi.yaml" | nindent 4 }}
---
apiVersion: v1
kind: ServiceAccount
metadata:
namespace: cdi-crd-upgrade
namespace: {{ .Release.Namespace }}
name: cdi-crd-upgrader
annotations:
"helm.sh/hook": pre-upgrade
"helm.sh/hook-delete-policy": hook-succeeded
"helm.sh/hook-weight": "3"
"helm.sh/hook-weight": "2"
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand All @@ -37,7 +28,7 @@ metadata:
annotations:
"helm.sh/hook": pre-upgrade
"helm.sh/hook-delete-policy": hook-succeeded
"helm.sh/hook-weight": "3"
"helm.sh/hook-weight": "2"
rules:
- apiGroups: [ "" ]
resources: [ "configmaps" ]
Expand All @@ -57,10 +48,10 @@ metadata:
annotations:
"helm.sh/hook": pre-upgrade
"helm.sh/hook-delete-policy": hook-succeeded
"helm.sh/hook-weight": "4"
"helm.sh/hook-weight": "3"
subjects:
- kind: ServiceAccount
namespace: cdi-crd-upgrade
namespace: {{ .Release.Namespace }}
name: cdi-crd-upgrader
roleRef:
kind: ClusterRole
Expand All @@ -70,12 +61,12 @@ roleRef:
apiVersion: batch/v1
kind: Job
metadata:
namespace: cdi-crd-upgrade
namespace: {{ .Release.Namespace }}
name: cdi-crd-upgrader
annotations:
"helm.sh/hook": pre-upgrade
"helm.sh/hook-delete-policy": hook-succeeded
"helm.sh/hook-weight": "5"
"helm.sh/hook-weight": "4"
spec:
template:
metadata:
Expand Down
4 changes: 2 additions & 2 deletions index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ entries:
cdi:
- apiVersion: v2
appVersion: 1.57.0
created: "2023-12-06T17:40:36.160396+02:00"
created: "2023-12-15T18:50:03.149872+02:00"
description: A Helm chart for Containerized-Data-Importer (CDI)
digest: 90f31de768ef55729dccb75aab892181f9faf522fc15f5bde11186dd622d5aaf
digest: 4c49e19f27778126f991f9eab01bdd80e6839272d66af928667d32f21342556b
icon: https://raw.githubusercontent.com/cncf/artwork/main/projects/kubevirt/icon/color/kubevirt-icon-color.svg
name: cdi
type: application
Expand Down
2 changes: 1 addition & 1 deletion packages/cdi/charts/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Verify that all CDI components are installed correctly:
kubectl get all -n cdi
kubectl get all -n {{ .Release.Namespace }}
19 changes: 6 additions & 13 deletions packages/cdi/charts/templates/cdi-operator.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
apiVersion: v1
kind: Namespace
metadata:
labels:
cdi.kubevirt.io: ""
name: cdi
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
Expand Down Expand Up @@ -277,15 +270,15 @@ roleRef:
subjects:
- kind: ServiceAccount
name: cdi-operator
namespace: cdi
namespace: {{ .Release.Namespace }}
---
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
operator.cdi.kubevirt.io: ""
name: cdi-operator
namespace: cdi
namespace: {{ .Release.Namespace }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
Expand All @@ -295,7 +288,7 @@ metadata:
app.kubernetes.io/managed-by: cdi-operator
cdi.kubevirt.io: ""
name: cdi-operator
namespace: cdi
namespace: {{ .Release.Namespace }}
rules:
- apiGroups:
- rbac.authorization.k8s.io
Expand Down Expand Up @@ -364,15 +357,15 @@ metadata:
app.kubernetes.io/managed-by: cdi-operator
cdi.kubevirt.io: ""
name: cdi-operator
namespace: cdi
namespace: {{ .Release.Namespace }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: cdi-operator
subjects:
- kind: ServiceAccount
name: cdi-operator
namespace: cdi
namespace: {{ .Release.Namespace }}
---
apiVersion: apps/v1
kind: Deployment
Expand All @@ -382,7 +375,7 @@ metadata:
operator.cdi.kubevirt.io: ""
prometheus.cdi.kubevirt.io: "true"
name: cdi-operator
namespace: cdi
namespace: {{ .Release.Namespace }}
spec:
replicas: 1
selector:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: ServiceAccount
metadata:
namespace: cdi
namespace: {{ .Release.Namespace }}
name: cdi-cr-uninstaller
annotations:
"helm.sh/hook": pre-delete
Expand Down Expand Up @@ -33,7 +33,7 @@ metadata:
"helm.sh/hook-weight": "2"
subjects:
- kind: ServiceAccount
namespace: cdi
namespace: {{ .Release.Namespace }}
name: cdi-cr-uninstaller
roleRef:
kind: ClusterRole
Expand All @@ -43,7 +43,7 @@ roleRef:
apiVersion: batch/v1
kind: Job
metadata:
namespace: cdi
namespace: {{ .Release.Namespace }}
name: cdi-cr-uninstaller
annotations:
"helm.sh/hook": pre-delete
Expand Down
Loading