Skip to content

Commit

Permalink
Merge pull request #8 from rohit-smartsensesolutions/feat/helm-chart-…
Browse files Browse the repository at this point in the history
…for-revocation-service

feat: Helm charts for revocation service
  • Loading branch information
nitin-vavdiya authored Sep 5, 2024
2 parents 8c5c60d + b0e0751 commit d742ff4
Show file tree
Hide file tree
Showing 25 changed files with 894 additions and 391 deletions.
3 changes: 2 additions & 1 deletion charts/managed-identity-wallet/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
charts/
charts/pgadmin4
**/charts/*.tgz
6 changes: 3 additions & 3 deletions charts/managed-identity-wallet/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ dependencies:
version: 15.1.6
- name: common
repository: https://charts.bitnami.com/bitnami
version: 2.13.3
version: 2.22.0
- name: postgresql
repository: https://charts.bitnami.com/bitnami
version: 11.9.13
- name: pgadmin4
repository: file://charts/pgadmin4
version: 1.19.0
digest: sha256:fb94864221b4fed31894b48ac56b72a2324da0dc1cb1d6888cc52c3490685df7
generated: "2023-12-15T10:30:41.880265+01:00"
digest: sha256:886b90f763f2320a1601e15b06264065a764f51fc34d592c0f0a08bd76f01635
generated: "2024-08-22T18:04:25.649769241+05:30"
39 changes: 21 additions & 18 deletions charts/managed-identity-wallet/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# /********************************************************************************
# * Copyright (c) 2021,2023 Contributors to the Eclipse Foundation
# *
# * See the NOTICE file(s) distributed with this work for additional
# * information regarding copyright ownership.
# *
# * This program and the accompanying materials are made available under the
# * terms of the Apache License, Version 2.0 which is available at
# * https://www.apache.org/licenses/LICENSE-2.0.
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# * License for the specific language governing permissions and limitations
# * under the License.
# *
# * SPDX-License-Identifier: Apache-2.0
# ********************************************************************************/
###############################################################
# Copyright (c) 2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0
###############################################################

apiVersion: v2
name: managed-identity-wallet
Expand All @@ -40,6 +40,9 @@ maintainers:
- name: Dominik Pinsel
email: [email protected]
url: https://github.com/DominikPinsel
- name: Rohit Solanki
email: [email protected]
url: https://github.com/rohit-smartsensesolutions

dependencies:
- name: keycloak
Expand Down
290 changes: 173 additions & 117 deletions charts/managed-identity-wallet/README.md

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions charts/managed-identity-wallet/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{{- range $host := .Values.ingress.hosts }}
{{- range .paths }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
http{{ if $.Values.vcrs.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
{{- end }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
Expand All @@ -17,6 +18,7 @@
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "managed-identity-wallet.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
Visit http://127.0.0.1:8080 (MIW) and http://127.0.0.1:8081 (VCRS) to use your application
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:8080
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8081:8081
{{- end }}
35 changes: 35 additions & 0 deletions charts/managed-identity-wallet/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ Expand the name of the chart.
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{- define "verifiable-credential-revocation-service.name" -}}
{{- default .Chart.Name .Values.vcrs.env.APPLICATION_NAME | 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).
Expand All @@ -42,13 +46,30 @@ If release name contains chart name it will be used as a full name.
{{- end }}
{{- end }}

{{- define "verifiable-credential-revocation-service.fullname" -}}
{{- if .Values.vcrs.env.APPLICATION_NAME }}
{{- .Values.vcrs.env.APPLICATION_NAME | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.vcrs.env.APPLICATION_NAME }}
{{- 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 "managed-identity-wallet.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{- define "verifiable-credential-revocation-service.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
Expand All @@ -61,6 +82,15 @@ app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

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

{{/*
Selector labels
*/}}
Expand All @@ -69,6 +99,11 @@ app.kubernetes.io/name: {{ include "managed-identity-wallet.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{- define "verifiable-credential-revocation-service.selectorLabels" -}}
app.kubernetes.io/name: {{ include "verifiable-credential-revocation-service.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# /********************************************************************************
# * Copyright (c) 2021,2023 Contributors to the Eclipse Foundation
# *
# * See the NOTICE file(s) distributed with this work for additional
# * information regarding copyright ownership.
# *
# * This program and the accompanying materials are made available under the
# * terms of the Apache License, Version 2.0 which is available at
# * https://www.apache.org/licenses/LICENSE-2.0.
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# * License for the specific language governing permissions and limitations
# * under the License.
# *
# * SPDX-License-Identifier: Apache-2.0
# ********************************************************************************/
###############################################################
# Copyright (c) 2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0
###############################################################

apiVersion: apps/v1
kind: Deployment
Expand Down Expand Up @@ -117,7 +117,7 @@ spec:
- name: http
containerPort: 8080
protocol: TCP
{{- with .Values.livenessProbe }}
{{- with .Values.miw.livenessProbe }}
{{- if .enabled }}
livenessProbe:
httpGet:
Expand All @@ -130,7 +130,7 @@ spec:
timeoutSeconds: {{ .timeoutSeconds }}
{{- end }}
{{- end }}
{{- with .Values.readinessProbe }}
{{- with .Values.miw.readinessProbe }}
{{- if .enabled }}
readinessProbe:
httpGet:
Expand Down Expand Up @@ -162,4 +162,4 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
{{- toYaml .Values.extraVolumes | nindent 8 }}
{{- toYaml .Values.extraVolumes | nindent 8 }}
3 changes: 2 additions & 1 deletion charts/managed-identity-wallet/templates/networkpolicy.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# /********************************************************************************
# * Copyright (c) 2024 Contributors to the Eclipse Foundation
# * Copyright (c) 2021,2023 Contributors to the Eclipse Foundation
# *
# * See the NOTICE file(s) distributed with this work for additional
# * information regarding copyright ownership.
Expand All @@ -16,6 +16,7 @@
# *
# * SPDX-License-Identifier: Apache-2.0
# ********************************************************************************/

{{- if .Values.networkPolicy.enabled }}
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
Expand Down
30 changes: 30 additions & 0 deletions charts/managed-identity-wallet/templates/psql-pv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
###############################################################
# Copyright (c) 2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0
###############################################################

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: postgres-seed-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storageClassName: standard
36 changes: 18 additions & 18 deletions charts/managed-identity-wallet/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# /********************************************************************************
# * Copyright (c) 2021,2023 Contributors to the Eclipse Foundation
# *
# * See the NOTICE file(s) distributed with this work for additional
# * information regarding copyright ownership.
# *
# * This program and the accompanying materials are made available under the
# * terms of the Apache License, Version 2.0 which is available at
# * https://www.apache.org/licenses/LICENSE-2.0.
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# * License for the specific language governing permissions and limitations
# * under the License.
# *
# * SPDX-License-Identifier: Apache-2.0
# ********************************************************************************/
###############################################################
# Copyright (c) 2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0
###############################################################

{{ if .Values.serviceAccount.create -}}
apiVersion: v1
Expand Down
27 changes: 27 additions & 0 deletions charts/managed-identity-wallet/templates/vcrs-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
###############################################################
# Copyright (c) 2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0
###############################################################

apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "verifiable-credential-revocation-service.fullname" . }}
data:
{{- range $key, $val := .Values.vcrs.env }}
{{ $key }}: {{ $val | quote }}
{{- end}}
Loading

0 comments on commit d742ff4

Please sign in to comment.