Skip to content

Commit b4b2166

Browse files
authored
Add install instructions and CRD to helm (#10)
* Add install instructions and CRD to helm * Only mark latest on main * reduce resources
1 parent 33bafef commit b4b2166

File tree

4 files changed

+42
-11
lines changed

4 files changed

+42
-11
lines changed

.github/workflows/build.yml

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,13 @@ jobs:
214214
sed -i "s/^appVersion:.*/appVersion: \"${{ needs.extract-versions.outputs.app_version }}\"/" deploy/quix-environment-operator/Chart.yaml
215215
echo "Updated chart version to ${{ needs.extract-versions.outputs.chart_version }}"
216216
cat deploy/quix-environment-operator/Chart.yaml
217+
218+
- name: Add CRD Manifests
219+
run: |
220+
make setup-dev
221+
make manifests
222+
mkdir -p deploy/quix-environment-operator/templates/crd-manifests/
223+
cp config/crd/bases/*.yaml deploy/quix-environment-operator/templates/crd-manifests/
217224
218225
- name: Verify values.yaml image tag
219226
run: |
@@ -237,11 +244,26 @@ jobs:
237244
package-path: .cr-release-packages
238245
EOF
239246
240-
- name: Run chart-releaser
247+
- name: Run chart-releaser (main branch)
248+
if: github.ref_name == 'main'
249+
uses: helm/[email protected]
250+
with:
251+
charts_dir: deploy
252+
config: cr.yaml
253+
mark_as_latest: true
254+
env:
255+
CR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
256+
CR_SKIP_EXISTING: "true"
257+
CR_FORCE: "true"
258+
CR_PAGES_BRANCH: "gh-pages"
259+
260+
- name: Run chart-releaser (other branches)
261+
if: github.ref_name != 'main'
241262
uses: helm/[email protected]
242263
with:
243264
charts_dir: deploy
244265
config: cr.yaml
266+
mark_as_latest: false
245267
env:
246268
CR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
247269
CR_SKIP_EXISTING: "true"
@@ -284,13 +306,12 @@ jobs:
284306
285307
# Make sure charts dir exists and package before switching branch
286308
if [ -d "deploy/quix-environment-operator" ]; then
309+
# Package the finished chart
287310
helm package deploy/quix-environment-operator -d .cr-release-packages
288311
else
289-
# Fallback to look for the chart elsewhere
290-
find . -name Chart.yaml -exec dirname {} \; | while read chart_dir; do
291-
echo "Found chart at: ${chart_dir}"
292-
helm package ${chart_dir} -d .cr-release-packages
293-
done
312+
echo "Error: No charts were found"
313+
exit 1
314+
294315
fi
295316
296317
# Make sure we actually packaged something

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ A Kubernetes controller for secure, declarative provisioning of isolated applica
2323

2424
Packaged as a Helm chart for customer-managed Kubernetes clusters. Operates within pre-approved RBAC constraints.
2525

26+
Install a specific version
27+
```
28+
operator_version=0.1.2
29+
operator_env_regex=""
30+
helm repo add quix-environment-operator https://quixio.github.io/quix-environment-operator/ && helm repo update
31+
helm pull quix-environment-operator/quix-environment-operator --version $operator_version
32+
helm upgrade --install quix-environment-operator -n quix-operator --create-namespace ./quix-environment-operator-$operator_version.tgz --set env.environmentRegex="$operator_env_regex"
33+
```
34+
For all configuration options see [values.yaml](deploy/quix-environment-operator/values.yaml).
35+
2636
## Development
2737

2838
### Setup

deploy/quix-environment-operator/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: quix-environment-operator
33
description: A Kubernetes operator for provisioning isolated application environments
44
type: application
5-
version: 0.1.1
5+
version: 0.1.2
66
appVersion: "0.1.0"
77
icon: https://quixstorageaccount.blob.core.windows.net/portal/img/quix_favicon.png
88
keywords:

deploy/quix-environment-operator/values.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ securityContext: {}
2727

2828
resources:
2929
limits:
30-
cpu: 200m
31-
memory: 128Mi
32-
requests:
3330
cpu: 100m
34-
memory: 64Mi
31+
memory: 96Mi
32+
requests:
33+
cpu: 25m
34+
memory: 32Mi
3535

3636
nodeSelector: {}
3737

0 commit comments

Comments
 (0)