Skip to content

Commit 6fd4777

Browse files
pengzhoumlPeng Zhou
and
Peng Zhou
authored
MLE-16012 EA1 Release update (#18)
* MLE-16012 Update GitHub action to work with private repo * Update README for Private Repo --------- Co-authored-by: Peng Zhou <peng.zhou@progress.com>
1 parent 4897f2e commit 6fd4777

File tree

2 files changed

+62
-16
lines changed

2 files changed

+62
-16
lines changed

.github/workflows/release.yaml

+30-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: Release Charts
22

3+
concurrency: release-helm
4+
35
on:
46
push:
57
branches:
@@ -14,22 +16,41 @@ jobs:
1416
- name: Checkout
1517
uses: actions/checkout@v3
1618
with:
19+
path: 'src'
20+
ref: 'main'
21+
fetch-depth: 0
22+
23+
- name: Checkout
24+
uses: actions/checkout@v3
25+
with:
26+
path: 'dest'
27+
ref: 'gh-pages'
1728
fetch-depth: 0
1829

1930
- name: Configure Git
2031
run: |
32+
cd dest
2133
git config user.name "$GITHUB_ACTOR"
2234
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
2335
2436
- name: Install Helm
2537
uses: azure/setup-helm@v4
26-
env:
27-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2838

29-
- name: Run chart-releaser
30-
uses: helm/chart-releaser-action@v1.6.0
31-
with:
32-
charts_dir: 'charts'
33-
env:
34-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35-
CR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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/pengzhouml/marklogic-kubernetes-operator/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

README.md

+32-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# MarkLogic Kubernetes Operator
1+
# MarkLogic Kubernetes Operator (Private Repo)
22

33
## Introduction
44

@@ -14,30 +14,55 @@ pkg/ Contains golang packges to support reconciliation, utilities.
1414

1515
## Run or deploy Operator
1616

17+
### Deploy Operator with Helm Chart in Private Repo
18+
The EA release is currently in a private repository. To access and work with this private repository, please follow these steps:
19+
1. First you need to create a Fine-grained tokens in Github with Read-only permission for marklogic/marklogic-kubernetes-operator repository
20+
Once you have the token, put store it in a safe place and put it in the environmental variable:
21+
```sh
22+
GITHUB_TOKEN=<YOUR_GITHUB_TOKEN>
23+
```
24+
2. Then add the private repo to Helm repository with the GITHUB_TOKEN:
25+
```sh
26+
helm repo add marklogic-private https://raw.githubusercontent.com/marklogic/marklogic-kubernetes-operator/gh-pages/ --username <YOUR_USERNAME> --password $GITHUB_TOKEN
27+
helm repo update
28+
```
29+
3. Install the Helm Chart for MarkLogic Operator:
30+
```sh
31+
helm upgrade marklogic-operator marklogic-private/marklogic-operator --version=1.0.0-ea1 --install --namespace marklogic-operator-system --create-namespace
32+
```
33+
4. Check the Operator Pod and make sure it is in Running state:
34+
```sh
35+
kubectl get pods -n marklogic-operator-system
36+
```
37+
1738
### Run Operator locally
39+
After checking out the source code, you can run the MarkLogic Operator locally by following these steps:
1840
```sh
1941
make build # build the project
2042
make install # instal CRD to Kubernetes cluster
2143
make run # run the operator controller locally
2244
```
2345

2446
### Deploy Operator locally
47+
After checking out the source code, you can deploy the MarkLogic Operator locally by following these steps:
2548
```sh
2649
make build # build the project
2750
make docker-build # build the operator to docker image
2851
make docker-push # push the operator to remote docker repo
2952
make deploy # deploy the CRD and Operator into marklogic-operator-system namespace
3053
```
3154

32-
### Deploy Operator with Helm Chart
33-
1. Add the Helm repository:
55+
### Build Helm Chart locally
56+
If you don't have the GITHUB_TOKEN that is required to visit the Github Repo, you can also build the Helm Chart locally.
57+
First build the Helm Chart
3458
```sh
35-
helm repo add marklogic-operator https://marklogic.github.io/marklogic-kubernetes-operator/
59+
make build
60+
make docker-build
61+
make helm
3662
```
37-
38-
2. Install the Helm Chart for MarkLogic Operator:
63+
Then deploy the Operator with Helm Chart
3964
```sh
40-
helm upgrade marklogic-operator marklogic-operator/marklogic-operator --install --namespace marklogic-operator-system --create-namespace
65+
helm upgrade marklogic-operator ./charts/marklogic-operator --install --namespace marklogic-operator-system --create-namespace
4166
```
4267

4368
## Install MarkLogic Cluster with MarkLogic Operator

0 commit comments

Comments
 (0)