-
Notifications
You must be signed in to change notification settings - Fork 69
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 #922 from Azure/cluster-service-helm-chart
convert cs deployment to helm chart
- Loading branch information
Showing
38 changed files
with
1,037 additions
and
1,140 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
File renamed without changes.
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 }} |
9 changes: 9 additions & 0 deletions
9
...er-service/deploy/helm/templates/azure-operators-managed-identities-config.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: azure-operators-managed-identities-config | ||
namespace: {{ .Release.Namespace }} | ||
data: | ||
azure-operators-managed-identities-config.yaml: | | ||
{{ .Values.azureOperatorsManagedIdentitiesConfig | b64dec | indent 4 }} |
23 changes: 23 additions & 0 deletions
23
cluster-service/deploy/helm/templates/azure-runtime-config.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,23 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: azure-runtime-config | ||
namespace: {{ .Release.Namespace }} | ||
data: | ||
config.json: | | ||
{ | ||
"cloudEnvironment": "AzurePublicCloud", | ||
"managedIdentitiesDataPlaneAudienceResource": "{{ .Values.managedIdentitiesDataPlaneAudienceResource }}", | ||
"tenantId": "{{ .Values.tenantId }}", | ||
"ocpImagesAcr": { | ||
"resourceId": "{{ .Values.ocpAcrResourceId }}", | ||
"url": "{{ .Values.ocpAcrUrl }}", | ||
"scopeMapName": "_repositories_pull" | ||
}, | ||
"dataplane_identities_oidc_configuration": { | ||
"storage_account_blob_container_name": "$web", | ||
"storage_account_blob_service_url": "{{ .Values.oidcIssuerBlobServiceUrl }}", | ||
"oidc_issuer_base_url": "{{ .Values.oidcIssuerBaseUrl }}" | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
cluster-service/deploy/helm/templates/cloud-resource-constraints-config.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,18 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: cloud-resource-constraints-config | ||
namespace: {{ .Release.Namespace }} | ||
data: | ||
instance-type-constraints.yaml: | | ||
instance_types: | ||
- id: Standard_D8s_v3 | ||
ccs_only: true | ||
enabled: true | ||
cloud-region-constraints.yaml: | | ||
cloud_regions: | ||
- id: {{ .Values.region }} | ||
enabled: true | ||
govcloud: false | ||
ccs_only: false |
23 changes: 23 additions & 0 deletions
23
cluster-service/deploy/helm/templates/cloud-resources-config.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,23 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: cloud-resources-config | ||
namespace: {{ .Release.Namespace }} | ||
data: | ||
instance-types.yaml: | | ||
instance_types: | ||
- id: Standard_D8s_v3 | ||
name: Standard_D8s_v3 - General purpose | ||
cloud_provider_id: azure | ||
cpu_cores: 8 | ||
memory: 34359738368 | ||
category: general_purpose | ||
size: d8s_v3 | ||
generic_name: standard-d8s_v3 | ||
cloud-regions.yaml: | | ||
cloud_regions: | ||
- id: {{ .Values.region }} | ||
cloud_provider_id: azure | ||
display_name: Azure East US | ||
supports_multi_az: true |
Oops, something went wrong.