-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a40992b
commit 6c9d7e3
Showing
32 changed files
with
1,026 additions
and
1,324 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
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,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
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,13 @@ | ||
apiVersion: v2 | ||
name: cluster-service | ||
description: A Helm chart for Cluster Service | ||
type: application | ||
version: 0.1.0 | ||
|
||
appVersion: "1.16.0" | ||
|
||
dependencies: | ||
- name: database | ||
version: 0.1.0 | ||
repository: "file://charts/database" | ||
condition: deployLocalDatabase |
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,5 @@ | ||
apiVersion: v2 | ||
name: database | ||
description: A Helm chart for a Local Cluster Service Database | ||
type: application | ||
version: 0.1.0 |
69 changes: 69 additions & 0 deletions
69
cluster-service/deploy/helm/charts/database/templates/database.deployment.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: '{{ .Values.databaseServiceName }}' | ||
namespace: '{{ .Release.Namespace }}' | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
name: '{{ .Values.databaseServiceName }}' | ||
strategy: | ||
type: Recreate | ||
template: | ||
metadata: | ||
labels: | ||
name: '{{ .Values.databaseServiceName }}' | ||
spec: | ||
containers: | ||
- env: | ||
- name: POSTGRES_USER | ||
valueFrom: | ||
secretKeyRef: | ||
key: db.user | ||
name: '{{ .Values.databaseK8sSecretName }}' | ||
- name: POSTGRES_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
key: db.password | ||
name: '{{ .Values.databaseK8sSecretName }}' | ||
- name: POSTGRES_DB | ||
valueFrom: | ||
secretKeyRef: | ||
key: db.name | ||
name: '{{ .Values.databaseK8sSecretName }}' | ||
- name: PGDATA | ||
value: /var/lib/pgsql/data/pgdata | ||
image: docker.io/library/postgres:16.2 | ||
imagePullPolicy: IfNotPresent | ||
livenessProbe: | ||
tcpSocket: | ||
port: 5432 | ||
initialDelaySeconds: 120 | ||
timeoutSeconds: 10 | ||
name: postgresql | ||
ports: | ||
- containerPort: 5432 | ||
protocol: TCP | ||
readinessProbe: | ||
exec: | ||
command: | ||
- /bin/sh | ||
- -c | ||
- exec /usr/bin/pg_isready -U $POSTGRES_USER -d $POSTGRES_DB -h localhost -p 5432 | ||
initialDelaySeconds: 5 | ||
timeoutSeconds: 1 | ||
securityContext: | ||
capabilities: {} | ||
privileged: false | ||
terminationMessagePath: /dev/termination-log | ||
volumeMounts: | ||
- mountPath: /var/lib/pgsql/data | ||
name: '{{ .Values.databaseServiceName }}-data' | ||
dnsPolicy: ClusterFirst | ||
restartPolicy: Always | ||
volumes: | ||
- name: '{{ .Values.databaseServiceName }}-data' | ||
persistentVolumeClaim: | ||
claimName: '{{ .Values.databaseServiceName }}' |
12 changes: 12 additions & 0 deletions
12
cluster-service/deploy/helm/charts/database/templates/database.pvc.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: '{{ .Values.databaseServiceName }}' | ||
namespace: '{{ .Release.Namespace }}' | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: '{{ .Values.databaseVolumeCapacity }}' |
17 changes: 17 additions & 0 deletions
17
cluster-service/deploy/helm/charts/database/templates/database.service.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: '{{ .Values.databaseServiceName }}' | ||
namespace: '{{ .Release.Namespace }}' | ||
spec: | ||
ports: | ||
- name: postgresql | ||
nodePort: 0 | ||
port: 5432 | ||
protocol: TCP | ||
targetPort: 5432 | ||
selector: | ||
name: '{{ .Values.databaseServiceName }}' | ||
sessionAffinity: None | ||
type: ClusterIP |
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,26 @@ | ||
# The name of the OpenShift Service exposed for the database. | ||
databaseServiceName: ocm-cs-db | ||
|
||
# The name of the K8s secret where CS DB connection information is placed | ||
databaseK8sSecretName: ocm-cs-db | ||
|
||
# Volume space available for data, e.g. 512Mi, 2Gi. | ||
databaseVolumeCapacity: 512Mi | ||
|
||
# Version of PostgreSQL image to be used (10 or latest). | ||
postgresqlVersion: "12" | ||
|
||
# The hostname of the postgres server/service. It can be a K8s service name | ||
databaseHost: "ocm-cs-db" | ||
|
||
# Username for PostgreSQL user that will be used for accessing the database. | ||
databaseUser: "ocm" | ||
|
||
# Password for the PostgreSQL connection user. | ||
databasePassword: "TheBlurstOfTimes" | ||
|
||
# Name of the PostgreSQL database accessed. | ||
databaseName: "ocm-cs-db" | ||
|
||
# Host port | ||
databasePort: "5432" |
9 changes: 9 additions & 0 deletions
9
cluster-service/deploy/helm/templates/authentication.configmap.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: authentication | ||
namespace: '{{ .Release.Namespace }}' | ||
data: | ||
jwks.json: "" | ||
acl.yml: "" |
9 changes: 9 additions & 0 deletions
9
cluster-service/deploy/helm/templates/azure-credentials.secret.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: azure-credentials | ||
namespace: '{{ .Release.Namespace }}' | ||
type: Opaque | ||
data: | ||
azure-auth-config: {{ .Values.csServicePrincipalCredsBase64 }} |
Oops, something went wrong.