Skip to content

Commit 5df6cef

Browse files
pengzhoumlPeng Zhou
andauthored
MLE-16542 Update Github action and Helm Chart name for GA release (#71)
* MLE-16542: update release action for public chart release * update Helm Chart for new repo name --------- Co-authored-by: Peng Zhou <[email protected]>
1 parent a6fba1b commit 5df6cef

File tree

15 files changed

+36
-66
lines changed

15 files changed

+36
-66
lines changed

.github/workflows/release.yaml

Lines changed: 7 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
name: Release Charts
2-
3-
concurrency: release-helm
4-
52
on:
63
push:
74
branches:
85
- main
9-
106
jobs:
117
release:
128
permissions:
@@ -16,41 +12,15 @@ jobs:
1612
- name: Checkout
1713
uses: actions/checkout@v3
1814
with:
19-
path: 'src'
20-
ref: 'main'
2115
fetch-depth: 0
22-
23-
- name: Checkout
24-
uses: actions/checkout@v3
25-
with:
26-
path: 'dest'
27-
ref: 'gh-pages'
28-
fetch-depth: 0
29-
3016
- name: Configure Git
3117
run: |
32-
cd dest
3318
git config user.name "$GITHUB_ACTOR"
3419
git config user.email "[email protected]"
35-
36-
- name: Install Helm
37-
uses: azure/setup-helm@v4
38-
39-
- name: Package Helm Charts
40-
shell: bash
41-
run: |
42-
find src/charts/ -type f -name 'Chart.yaml' | sed -r 's|/[^/]+$||' | sort | uniq | xargs -L 1 helm dep up
43-
for d in src/charts/*/ ; do
44-
echo "$d"
45-
helm package "$d" -u -d dest
46-
done
47-
48-
- name: Push New Files
49-
shell: bash
50-
working-directory: dest
51-
run: |
52-
helm repo index . --url https://raw.githubusercontent.com/marklogic/marklogic-operator-kubernetes/gh-pages/
53-
git add $(git ls-files -o --exclude-standard)
54-
git add index.yaml
55-
git commit -m "Updated from ref: $GITHUB_SHA"
56-
git push
20+
- name: Run chart-releaser
21+
uses: helm/[email protected]
22+
with:
23+
charts_dir: 'charts'
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
CR_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ $(HELMIFY): $(LOCALBIN)
363363
test -s $(LOCALBIN)/helmify || GOBIN=$(LOCALBIN) go install github.com/arttor/helmify/cmd/helmify@latest
364364

365365
helm: manifests kustomize helmify
366-
$(KUSTOMIZE) build config/default | $(HELMIFY) -image-pull-secrets -original-name charts/marklogic-operator
366+
$(KUSTOMIZE) build config/default | $(HELMIFY) -image-pull-secrets -original-name charts/marklogic-operator-kubernetes
367367

368368
.PHONY: image-scan
369369
image-scan: docker-build

charts/marklogic-operator/Chart.yaml renamed to charts/marklogic-operator-kubernetes/Chart.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
2-
name: marklogic-operator
3-
description: A Helm chart for MarkLogic Operator
2+
name: marklogic-operator-kubernetes
3+
description: A Helm chart for MarkLogic Operator for Kubernetes
44
# A chart can be either an 'application' or a 'library' chart.
55
#
66
# Application charts are a collection of templates that can be packaged into versioned archives
@@ -18,4 +18,4 @@ version: 1.0.0
1818
# incremented each time you make changes to the application. Versions are not expected to
1919
# follow Semantic Versioning. They should reflect the version the application is using.
2020
# It is recommended to use it with quotes.
21-
appVersion: 1.0.0
21+
appVersion: "1.0.0"

charts/marklogic-operator/templates/_helpers.tpl renamed to charts/marklogic-operator-kubernetes/templates/_helpers.tpl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{{/*
22
Expand the name of the chart.
33
*/}}
4-
{{- define "marklogic-operator.name" -}}
4+
{{- define "marklogic-operator-kubernetes.name" -}}
55
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
66
{{- end }}
77

@@ -10,7 +10,7 @@ Create a default fully qualified app name.
1010
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
1111
If release name contains chart name it will be used as a full name.
1212
*/}}
13-
{{- define "marklogic-operator.fullname" -}}
13+
{{- define "marklogic-operator-kubernetes.fullname" -}}
1414
{{- if .Values.fullnameOverride }}
1515
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
1616
{{- else }}
@@ -26,16 +26,16 @@ If release name contains chart name it will be used as a full name.
2626
{{/*
2727
Create chart name and version as used by the chart label.
2828
*/}}
29-
{{- define "marklogic-operator.chart" -}}
29+
{{- define "marklogic-operator-kubernetes.chart" -}}
3030
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
3131
{{- end }}
3232

3333
{{/*
3434
Common labels
3535
*/}}
36-
{{- define "marklogic-operator.labels" -}}
37-
helm.sh/chart: {{ include "marklogic-operator.chart" . }}
38-
{{ include "marklogic-operator.selectorLabels" . }}
36+
{{- define "marklogic-operator-kubernetes.labels" -}}
37+
helm.sh/chart: {{ include "marklogic-operator-kubernetes.chart" . }}
38+
{{ include "marklogic-operator-kubernetes.selectorLabels" . }}
3939
{{- if .Chart.AppVersion }}
4040
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
4141
{{- end }}
@@ -45,17 +45,17 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
4545
{{/*
4646
Selector labels
4747
*/}}
48-
{{- define "marklogic-operator.selectorLabels" -}}
49-
app.kubernetes.io/name: {{ include "marklogic-operator.name" . }}
48+
{{- define "marklogic-operator-kubernetes.selectorLabels" -}}
49+
app.kubernetes.io/name: {{ include "marklogic-operator-kubernetes.name" . }}
5050
app.kubernetes.io/instance: {{ .Release.Name }}
5151
{{- end }}
5252

5353
{{/*
5454
Create the name of the service account to use
5555
*/}}
56-
{{- define "marklogic-operator.serviceAccountName" -}}
56+
{{- define "marklogic-operator-kubernetes.serviceAccountName" -}}
5757
{{- if .Values.serviceAccount.create }}
58-
{{- default (include "marklogic-operator.fullname" .) .Values.serviceAccount.name }}
58+
{{- default (include "marklogic-operator-kubernetes.fullname" .) .Values.serviceAccount.name }}
5959
{{- else }}
6060
{{- default "default" .Values.serviceAccount.name }}
6161
{{- end }}

charts/marklogic-operator/templates/deployment.yaml renamed to charts/marklogic-operator-kubernetes/templates/deployment.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ metadata:
77
app.kubernetes.io/created-by: marklogic-operator-kubernetes
88
app.kubernetes.io/part-of: marklogic-operator-kubernetes
99
control-plane: controller-manager
10-
{{- include "marklogic-operator.labels" . | nindent 4 }}
10+
{{- include "marklogic-operator-kubernetes.labels" . | nindent 4 }}
1111
spec:
1212
replicas: {{ .Values.controllerManager.replicas }}
1313
selector:
1414
matchLabels:
1515
control-plane: controller-manager
16-
{{- include "marklogic-operator.selectorLabels" . | nindent 6 }}
16+
{{- include "marklogic-operator-kubernetes.selectorLabels" . | nindent 6 }}
1717
template:
1818
metadata:
1919
labels:
2020
control-plane: controller-manager
21-
{{- include "marklogic-operator.selectorLabels" . | nindent 8 }}
21+
{{- include "marklogic-operator-kubernetes.selectorLabels" . | nindent 8 }}
2222
annotations:
2323
kubectl.kubernetes.io/default-container: manager
2424
spec:

charts/marklogic-operator/templates/leader-election-rbac.yaml renamed to charts/marklogic-operator-kubernetes/templates/leader-election-rbac.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ metadata:
66
app.kubernetes.io/component: rbac
77
app.kubernetes.io/created-by: marklogic-operator-kubernetes
88
app.kubernetes.io/part-of: marklogic-operator-kubernetes
9-
{{- include "marklogic-operator.labels" . | nindent 4 }}
9+
{{- include "marklogic-operator-kubernetes.labels" . | nindent 4 }}
1010
rules:
1111
- apiGroups:
1212
- ""
@@ -48,7 +48,7 @@ metadata:
4848
app.kubernetes.io/component: rbac
4949
app.kubernetes.io/created-by: marklogic-operator-kubernetes
5050
app.kubernetes.io/part-of: marklogic-operator-kubernetes
51-
{{- include "marklogic-operator.labels" . | nindent 4 }}
51+
{{- include "marklogic-operator-kubernetes.labels" . | nindent 4 }}
5252
roleRef:
5353
apiGroup: rbac.authorization.k8s.io
5454
kind: Role

charts/marklogic-operator/templates/manager-rbac.yaml renamed to charts/marklogic-operator-kubernetes/templates/manager-rbac.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kind: ClusterRole
33
metadata:
44
name: marklogic-operator-manager-role
55
labels:
6-
{{- include "marklogic-operator.labels" . | nindent 4 }}
6+
{{- include "marklogic-operator-kubernetes.labels" . | nindent 4 }}
77
rules:
88
- apiGroups:
99
- ""
@@ -85,7 +85,7 @@ metadata:
8585
app.kubernetes.io/component: rbac
8686
app.kubernetes.io/created-by: marklogic-operator-kubernetes
8787
app.kubernetes.io/part-of: marklogic-operator-kubernetes
88-
{{- include "marklogic-operator.labels" . | nindent 4 }}
88+
{{- include "marklogic-operator-kubernetes.labels" . | nindent 4 }}
8989
roleRef:
9090
apiGroup: rbac.authorization.k8s.io
9191
kind: ClusterRole

charts/marklogic-operator/templates/marklogiccluster-crd.yaml renamed to charts/marklogic-operator-kubernetes/templates/marklogiccluster-crd.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
annotations:
66
controller-gen.kubebuilder.io/version: v0.17.1
77
labels:
8-
{{- include "marklogic-operator.labels" . | nindent 4 }}
8+
{{- include "marklogic-operator-kubernetes.labels" . | nindent 4 }}
99
spec:
1010
group: database.marklogic.com
1111
names:

charts/marklogic-operator/templates/marklogicgroup-crd.yaml renamed to charts/marklogic-operator-kubernetes/templates/marklogicgroup-crd.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
annotations:
66
controller-gen.kubebuilder.io/version: v0.17.1
77
labels:
8-
{{- include "marklogic-operator.labels" . | nindent 4 }}
8+
{{- include "marklogic-operator-kubernetes.labels" . | nindent 4 }}
99
spec:
1010
group: database.marklogic.com
1111
names:

0 commit comments

Comments
 (0)