Skip to content

Merge Main branch back to develop after release #20

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

Merged
merged 2 commits into from
Aug 21, 2024
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
39 changes: 30 additions & 9 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Release Charts

concurrency: release-helm

on:
push:
branches:
Expand All @@ -14,22 +16,41 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
with:
path: 'src'
ref: 'main'
fetch-depth: 0

- name: Checkout
uses: actions/checkout@v3
with:
path: 'dest'
ref: 'gh-pages'
fetch-depth: 0

- name: Configure Git
run: |
cd dest
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"

- name: Install Helm
uses: azure/setup-helm@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Run chart-releaser
uses: helm/[email protected]
with:
charts_dir: 'charts'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Package Helm Charts
shell: bash
run: |
find src/charts/ -type f -name 'Chart.yaml' | sed -r 's|/[^/]+$||' | sort | uniq | xargs -L 1 helm dep up
for d in src/charts/*/ ; do
echo "$d"
helm package "$d" -u -d dest
done

- name: Push New Files
shell: bash
working-directory: dest
run: |
helm repo index . --url https://raw.githubusercontent.com/marklogic/marklogic-kubernetes-operator/gh-pages/
git add $(git ls-files -o --exclude-standard)
git add index.yaml
git commit -m "Updated from ref: $GITHUB_SHA"
git push
39 changes: 32 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# MarkLogic Kubernetes Operator
# MarkLogic Kubernetes Operator (Private Repo)

## Introduction

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

## Run or deploy Operator

### Deploy Operator with Helm Chart in Private Repo
The EA release is currently in a private repository. To access and work with this private repository, please follow these steps:
1. First you need to create a Fine-grained tokens in Github with Read-only permission for marklogic/marklogic-kubernetes-operator repository
Once you have the token, put store it in a safe place and put it in the environmental variable:
```sh
GITHUB_TOKEN=<YOUR_GITHUB_TOKEN>
```
2. Then add the private repo to Helm repository with the GITHUB_TOKEN:
```sh
helm repo add marklogic-private https://raw.githubusercontent.com/marklogic/marklogic-kubernetes-operator/gh-pages/ --username <YOUR_USERNAME> --password $GITHUB_TOKEN
helm repo update
```
3. Install the Helm Chart for MarkLogic Operator:
```sh
helm upgrade marklogic-operator marklogic-private/marklogic-operator --version=1.0.0-ea1 --install --namespace marklogic-operator-system --create-namespace
```
4. Check the Operator Pod and make sure it is in Running state:
```sh
kubectl get pods -n marklogic-operator-system
```

### Run Operator locally
After checking out the source code, you can run the MarkLogic Operator locally by following these steps:
```sh
make build # build the project
make install # instal CRD to Kubernetes cluster
make run # run the operator controller locally
```

### Deploy Operator locally
After checking out the source code, you can deploy the MarkLogic Operator locally by following these steps:
```sh
make build # build the project
make docker-build # build the operator to docker image
make docker-push # push the operator to remote docker repo
make deploy # deploy the CRD and Operator into marklogic-operator-system namespace
```

### Deploy Operator with Helm Chart
1. Add the Helm repository:
### Build Helm Chart locally
If you don't have the GITHUB_TOKEN that is required to visit the Github Repo, you can also build the Helm Chart locally.
First build the Helm Chart
```sh
helm repo add marklogic-operator https://marklogic.github.io/marklogic-kubernetes-operator/
make build
make docker-build
make helm
```

2. Install the Helm Chart for MarkLogic Operator:
Then deploy the Operator with Helm Chart
```sh
helm upgrade marklogic-operator marklogic-operator/marklogic-operator --install --namespace marklogic-operator-system --create-namespace
helm upgrade marklogic-operator ./charts/marklogic-operator --install --namespace marklogic-operator-system --create-namespace
```

## Install MarkLogic Cluster with MarkLogic Operator
Expand Down
Loading