-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from paul-gilber/helm-checks
Update charts to support deployment to OpenShift. Add validate workflows for installing chart to k3s cluster
- Loading branch information
Showing
19 changed files
with
396 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
# Using Docker Compose for Dev Containers: https://containers.dev/guide/dockerfile#docker-compose-dockerfile | ||
# Service top-level element reference: https://docs.docker.com/compose/compose-file/05-services/ | ||
services: | ||
devcontainer: | ||
image: mcr.microsoft.com/devcontainers/base:bullseye | ||
# network_mode: host | ||
volumes: | ||
- ../..:/workspaces:cached # mounts the workspace folder from the local source tree into the Dev Container. | ||
command: sleep infinity | ||
extra_hosts: | ||
- "api.crc.testing:host-gateway" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Charts | ||
charts/**/Chart.lock | ||
charts/**/*.tgz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,30 @@ | ||
# demoapp-helm-charts | ||
Helm Charts for deploying demoapp to Kubernetes and OpenShift | ||
|
||
## Deployment to OpenShift Local | ||
Prerequisites: | ||
1. [Red Hat OpenShift Local](https://developers.redhat.com/products/openshift-local/overview) | ||
|
||
Steps: | ||
1. Create `demo` project | ||
```sh | ||
# Login to OpenShift Local | ||
oc login -u kubeadmin https://api.crc.testing:6443 | ||
|
||
# Create project | ||
oc new-project demo | ||
``` | ||
2. Deploy `demoapp-backend` | ||
```sh | ||
cd charts/demoapp-backend | ||
helm dependency update . | ||
helm upgrade -i demoapp-backend . \ | ||
--values values-openshift-local.yaml | ||
``` | ||
3. Deploy `demoapp-frontend` | ||
```sh | ||
cd charts/demoapp-frontend | ||
helm dependency update . | ||
helm upgrade -i demoapp-frontend . \ | ||
--values values-openshift-local.yaml | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{{- if .Values.openshift.route.enabled }} | ||
# Expose application via OpenShift route | ||
apiVersion: route.openshift.io/v1 | ||
kind: Route | ||
metadata: | ||
name: {{ include "demoapp-backend.fullname" . }} | ||
{{- with .Values.openshift.route.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
labels: | ||
{{- include "demoapp-backend.labels" . | nindent 4 }} | ||
spec: | ||
{{- if .Values.openshift.route.host }} | ||
host: {{ .Values.openshift.route.host }} | ||
{{- end }} | ||
path: {{ .Values.openshift.route.path }} | ||
port: | ||
targetPort: http | ||
to: | ||
kind: Service | ||
name: {{ include "demoapp-backend.fullname" . }} | ||
weight: 100 | ||
{{- with .Values.openshift.route.tls }} | ||
tls: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
wildcardPolicy: None | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{{- if and .Values.openshift.enabled .Values.mysql.enabled }} | ||
# Binds `{{ .Values.openshift.scc.mysql }}` securitycontextconstraints to service account | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: scc-{{ .Values.openshift.scc.mysql }}-{{ .Release.Namespace }}-{{ .Values.mysql.fullnameOverride }} | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: system:openshift:scc:{{ .Values.openshift.scc.mysql }} | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ .Values.mysql.fullnameOverride }} | ||
namespace: {{ .Release.Namespace }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
# Values for deploying demoapp-frontend to OpenShift Local | ||
|
||
openshift: | ||
enabled: true # Is this deployment for OpenShift? | ||
# OpenShift route | ||
route: | ||
enabled: true # Create OpenShift route? | ||
annotations: | ||
# Forward route /api to to container / | ||
haproxy.router.openshift.io/rewrite-target: / | ||
host: demoapp.apps-crc.testing # Route host, autogenerated by cluster when unspecified | ||
path: /api | ||
tls: | ||
termination: edge | ||
# OpenShift SCC | ||
scc: | ||
mysql: privileged | ||
|
||
# Values for mysql: https://artifacthub.io/packages/helm/bitnami/mysql | ||
mysql: | ||
enabled: true | ||
# global | ||
global: | ||
storageClass: "" | ||
image: | ||
registry: docker.io | ||
repository: mysql | ||
ta: "8.0" | ||
auth: | ||
rootPassword: openshift-local | ||
# primary database | ||
primary: | ||
persistence: | ||
enabled: true |
Oops, something went wrong.