Skip to content

Commit

Permalink
ci: updating Helm templates to include release metadata (#304)
Browse files Browse the repository at this point in the history
* ci: updating Helm templates to include release metadata

Signed-off-by: SRIKUMAR VENUGOPAL <srikumarv@ie.ibm.com>

* chore: update Makefile to separate plugin from component tags

Signed-off-by: SRIKUMAR VENUGOPAL <srikumarv@ie.ibm.com>

* fix: update main Makefile to create namespace

Signed-off-by: SRIKUMAR VENUGOPAL <srikumarv@ie.ibm.com>

---------

Signed-off-by: SRIKUMAR VENUGOPAL <srikumarv@ie.ibm.com>
  • Loading branch information
srikumar003 authored Aug 24, 2023
1 parent 8ec79a3 commit 4ea7e88
Show file tree
Hide file tree
Showing 9 changed files with 1,098 additions and 614 deletions.
16 changes: 10 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
DATASET_OPERATOR_NAMESPACE=dlf

COMMON_IMAGE_TAG ?= latest
COMPONENT_TAG ?= latest
CSI_PLUGIN_TAG ?= latest

HELM_IMAGE_TAGS = --set global.namespaceYaml="true" --set csi-nfs-chart.csinfs.tag=$(COMMON_IMAGE_TAG) --set csi-s3-chart.csis3.tag=$(COMMON_IMAGE_TAG) --set dataset-operator-chart.generatekeys.tag=$(COMMON_IMAGE_TAG) --set dataset-operator-chart.datasetoperator.tag=$(COMMON_IMAGE_TAG)
HELM_CSI_OPTIONS = --set csi-nfs-chart.csinfs.tag=$(CSI_PLUGIN_TAG) --set csi-s3-chart.csis3.tag=$(CSI_PLUGIN_TAG)
HELM_OPERATOR_OPTIONS = --set dataset-operator-chart.generatekeys.tag=$(COMPONENT_TAG) --set dataset-operator-chart.datasetoperator.tag=$(COMPONENT_TAG)

manifests:
helm template $(HELM_IMAGE_TAGS) --namespace=$(DATASET_OPERATOR_NAMESPACE) --name-template=default --set csi-h3-chart.enabled="false" chart/ > release-tools/manifests/dlf.yaml
helm template $(HELM_IMAGE_TAGS) --set global.sidecars.kubeletPath="/var/data/kubelet" --set global.sidecars.kubeletPath="/var/data/kubelet" --namespace=$(DATASET_OPERATOR_NAMESPACE) --name-template=default chart/ > release-tools/manifests/dlf-ibm-k8s.yaml
helm template $(HELM_IMAGE_TAGS) --set global.type="oc" --set csi-h3-chart.enabled="false" --set global.sidecars.kubeletPath="/var/data/kubelet" --namespace=$(DATASET_OPERATOR_NAMESPACE) --name-template=default chart/ > release-tools/manifests/dlf-ibm-oc.yaml
helm template $(HELM_IMAGE_TAGS) --set global.type="oc" --set csi-h3-chart.enabled="false" --namespace=$(DATASET_OPERATOR_NAMESPACE) --name-template=default chart/ > release-tools/manifests/dlf-oc.yaml
helm template $(HELM_CSI_OPTIONS) $(HELM_OPERATOR_OPTIONS) --namespace=$(DATASET_OPERATOR_NAMESPACE) --name-template=default --set csi-h3-chart.enabled="false" chart/ > release-tools/manifests/dlf.yaml
helm template $(HELM_CSI_OPTIONS) $(HELM_OPERATOR_OPTIONS) --set global.sidecars.kubeletPath="/var/data/kubelet" --set global.sidecars.kubeletPath="/var/data/kubelet" --set csi-h3-chart.enabled="false" --namespace=$(DATASET_OPERATOR_NAMESPACE) --name-template=default chart/ > release-tools/manifests/dlf-ibm-k8s.yaml
helm template $(HELM_CSI_OPTIONS) $(HELM_OPERATOR_OPTIONS) --set global.type="oc" --set csi-h3-chart.enabled="false" --set global.sidecars.kubeletPath="/var/data/kubelet" --namespace=$(DATASET_OPERATOR_NAMESPACE) --name-template=default chart/ > release-tools/manifests/dlf-ibm-oc.yaml
helm template $(HELM_CSI_OPTIONS) $(HELM_OPERATOR_OPTIONS) --set global.type="oc" --set csi-h3-chart.enabled="false" --namespace=$(DATASET_OPERATOR_NAMESPACE) --name-template=default chart/ > release-tools/manifests/dlf-oc.yaml
undeployment:
kubectl delete -f ./release-tools/manifests/dlf.yaml
kubectl delete ns $(DATASET_OPERATOR_NAMESPACE)
kubectl label namespace default monitor-pods-datasets-
deployment:
kubectl create ns $(DATASET_OPERATOR_NAMESPACE)
kubectl apply -f ./release-tools/manifests/dlf.yaml
kubectl label namespace default monitor-pods-datasets=enabled
4 changes: 4 additions & 0 deletions chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ description: Datashim chart
type: application
version: 0.1.0
appVersion: 0.1.0
icon: https://raw.githubusercontent.com/datashim-io/artwork/main/SVG/datashim-horizontal-color.svg
maintainers:
- name: Srikumar Venugopal


dependencies:
- name: csi-sidecars-rbac
Expand Down
7 changes: 6 additions & 1 deletion chart/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{{- define "common.labels" -}}
app.kubernetes.io/name: "dlf"
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }}
app.kubernetes.io/name: datashim
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
meta.helm.sh/release-name: {{ .Release.Name }}
meta.helm.sh/release-namespace: {{ .Release.Namespace }}
{{- end -}}
8 changes: 0 additions & 8 deletions chart/templates/namespace.yaml

This file was deleted.

20 changes: 12 additions & 8 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ global:
baseRepo: "quay.io/datashim-io"
arch: "amd64"
type: "k8s"
namespaceYaml: false
namespaceYaml: true

sidecars:
kubeletPath: "/var/lib/kubelet"
Expand All @@ -22,6 +22,7 @@ global:
csi-nfs-chart:
# baseRepo: "anotherrepo"
# dockerRegistrySecret: "anothersecret"
enabled: true
csinfs:
image: "csi-nfs"
tag: "latest"
Expand All @@ -31,18 +32,21 @@ csi-s3-chart:
# baseRepo: "anotherrepo"
# dockerRegistrySecret: "anothersecret"
# mounter: "goofys"
enabled: true
csis3:
image: "csi-s3"
tag: "latest"
sidecars: {} # in case you want to force override regardless of the csi-s3-chart/values.yaml

#csi-h3-chart:
# baseRepo: "carvicsforth"
## dockerRegistrySecret: "anothersecret"
# csih3:
# image: "csi-h3"
# tag: "v1.2.0"
# sidecars: {}
csi-h3-chart:
# baseRepo: "carvicsforth"
## dockerRegistrySecret: "anothersecret"
enabled: false
csih3:
image: "csi-h3"
tag: "v1.2.0"
sidecars: {}

dataset-operator-chart:
# baseRepo: "quay.io/datashim"
# dockerRegistrySecret: "anothersecret"
Expand Down
Loading

0 comments on commit 4ea7e88

Please sign in to comment.