Skip to content

Commit

Permalink
keycloak changes added
Browse files Browse the repository at this point in the history
  • Loading branch information
sfdevops committed Oct 22, 2024
1 parent 1543e6f commit 08d5262
Show file tree
Hide file tree
Showing 95 changed files with 7,544 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,12 @@ data:
WEBHOOK_PASSWORD: '{{ .Values.tenantMgmtFacade.webhook_password }}'
AUTH0_DOMAIN: '{{ .Values.tenantMgmtService.auth0_domain }}'
AUTH0_CLIENT_ID: '{{ .Values.tenantMgmtService.auth0_client_id }}'
KEYCLOAK_HOST: 'https://keycloak.{{ .Values.domain }}'
KEYCLOAK_ADMIN_USERNAME: '{{ .Values.keycloakUser }}'
AWS_REGION: '{{ .Values.region }}'
DOMAIN_NAME: '{{ .Values.domain }}'
AWS_SES_SMTP_HOST: 'email-smtp.{{ .Values.region }}.amazonaws.com'
AWS_SES_SMTP_PORT: '{{ .Values.notificationService.smtp_port }}'
SMTP_FROM_EMAIL: '{{ .Values.tenantMgmtService.from_email }}'
SMTP_FROM_DISPLAY_NAME: '{{ .Values.notificationService.smtp_display_name }}'
{{- end}}
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ spec:
key: PUBLIC_KEY
- objectName: auth0_client_secret
key: AUTH0_CLIENT_SECRET
- objectName: keycloak_password
key: KEYCLOAK_ADMIN_PASSWORD
{{- if .Values.ses.enabled }}
- objectName: ses_access_key
key: SMTP_USER
Expand Down Expand Up @@ -153,6 +155,9 @@ spec:
- objectName: {{ .Values.auth0ClientSecret }}
objectType: ssmparameter
objectAlias: auth0_client_secret
- objectName: {{ .Values.keycloakPassword }}
objectType: ssmparameter
objectAlias: keycloak_password
{{- if .Values.ses.enabled }}
- objectName: "/{{ .Values.projectName }}/ses_access_key"
objectType: ssmparameter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,23 @@ spec:
secretKeyRef:
name: api-token
key: AUTH0_CLIENT_SECRET
- name: KEYCLOAK_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: api-token
key: KEYCLOAK_ADMIN_PASSWORD
{{- if .Values.ses.enabled }}
- name: SMTP_USER
valueFrom:
secretKeyRef:
name: api-token
key: SMTP_USER
- name: SMTP_PASSWORD
valueFrom:
secretKeyRef:
name: api-token
key: SMTP_PASSWORD
{{- end }}
{{- if .Values.imagePullSecret.enabled }}
imagePullSecrets:
- name: {{ .Values.imagePullSecret.name }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ notificationService:
node_env: "production"
log_level: "info"
smtp_port: "587"
smtp_display_name: "IDP"
affinity: {}
allowed_origins: "*"
imagePullPolicy:
Expand Down Expand Up @@ -425,7 +426,8 @@ cognitoSub: ${COGNITO_USER_SUB}
clientId: "tata-elxsi-control-plane"
publicKey: "TrPbi0xJT"


keycloakUser: "admin"
keycloakPassword: ${KEYCLOAK_PASSWORD}
saname: "control-plane"
region: ${REGION}
environment: ${ENVIRONMENT}
Expand Down
23 changes: 23 additions & 0 deletions files/tenant-samples/bridge/tenant-helm-chart/keycloak/.helmignore
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/
24 changes: 24 additions & 0 deletions files/tenant-samples/bridge/tenant-helm-chart/keycloak/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: v2
name: helm
description: A Helm chart for Kubernetes

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.16.0"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# ARC-SAAS Application Plane Helm
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "helm.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "helm.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "helm.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "helm.labels" -}}
helm.sh/chart: {{ include "helm.chart" . }}
{{ include "helm.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "helm.selectorLabels" -}}
app: {{ include "helm.name" . }}

{{- end }}


{{/*
Configuring .dockerconfigjson
*/}}
{{- define "imagePullSecret" }}
{{- with .Values.imagePullSecret }}
{{- printf "{\"auths\":{\"%s\":{\"username\":\"%s\",\"password\":\"%s\",\"email\":\"%s\",\"auth\":\"%s\"}}}" .registry .username .password .email (printf "%s:%s" .username .password | b64enc) | b64enc }}
{{- end }}
{{- end }}

Loading

0 comments on commit 08d5262

Please sign in to comment.