Skip to content

Commit

Permalink
[KMIP] Introduce kmip-restapi container (#7543)
Browse files Browse the repository at this point in the history
  • Loading branch information
rajivmucheli authored Dec 17, 2024
1 parent e0cff71 commit 16aa7b1
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 9 deletions.
8 changes: 4 additions & 4 deletions openstack/kmip/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ dependencies:
version: 1.0.0
- name: linkerd-support
repository: oci://keppel.eu-de-1.cloud.sap/ccloud-helm
version: 1.0.0
version: 1.1.0
- name: utils
repository: oci://keppel.eu-de-1.cloud.sap/ccloud-helm
version: 0.19.3
version: 0.20.0
- name: mariadb
repository: oci://keppel.eu-de-1.cloud.sap/ccloud-helm
version: 0.14.2
- name: mysql_metrics
repository: oci://keppel.eu-de-1.cloud.sap/ccloud-helm
version: 0.3.5
digest: sha256:1b7f9179787075e1bd895dde3348fb9fc578868e7d8372570811167b9a2065e7
generated: "2024-10-14T17:05:41.66997+05:30"
digest: sha256:bb17389f99b286a9b65137c31a94f02426af229325160acfded17ecdcaca877f
generated: "2024-12-12T20:11:21.311376+05:30"
39 changes: 39 additions & 0 deletions openstack/kmip/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,45 @@ spec:
spec:
serviceAccountName: {{ include "kmip.serviceAccountName" . }}-barbican
containers:
- name: kmip-restapi
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: {{required ".Values.global.registry is missing" .Values.global.registry }}/loci-barbican:{{required "Values.kmip.restapi_image is missing" .Values.kmip.restapi_image }}
imagePullPolicy: {{ .Values.kmip.pullPolicy }}
env:
- name: KMIP_MARIADB_SERVICE_HOST
value: "kmip-mariadb"
- name: KMIP_MARIADB_SERVICE_PORT
value: "3306"
- name: KMIP_MARIADB_SERVICE_USER
value: {{ .Values.mariadb.users.kmip.user | quote }}
- name: KMIP_MARIADB_SERVICE_PASSWORD
value: {{ .Values.mariadb.users.kmip.password | quote }}
- name: KMIP_MARIADB_NAME
value: "kmip"
- name: BARBICAN_MARIADB_SERVICE_HOST
value: "barbican-mariadb"
- name: BARBICAN_MARIADB_SERVICE_PORT
value: "3306"
- name: BARBICAN_MARIADB_SERVICE_USER
value: {{ .Values.mariadb.users.barbican.user | quote }}
- name: BARBICAN_MARIADB_SERVICE_PASSWORD
value: {{ .Values.mariadb.users.barbican.password | quote }}
- name: BARBICAN_MARIADB_NAME
value: "barbican"
command: ["sh", "-c"]
args:
- |
echo "Sleeping for 30 seconds before starting the application...";
sleep 30;
echo "Starting the application...";
python /app/app.py;
echo "Application exited. Keeping container alive...";
tail -f /dev/null
resources:
requests:
memory: 0
cpu: 0
- name: kmip-barbican
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
Expand Down
14 changes: 9 additions & 5 deletions openstack/kmip/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: v1

metadata:
name: kmip-barbican
namespace: {{.Release.Namespace}}
namespace: {{ .Release.Namespace }}
labels:
app: {{ include "kmip.fullname" . }}-barbican
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
Expand All @@ -15,15 +15,19 @@ metadata:
annotations:
{{- include "utils.linkerd.pod_and_service_annotation" . | indent 4 }}
spec:
type : {{ .Values.service.type }}
type: {{ .Values.service.type }}
externalIPs:
- {{ .Values.service.externalIPs }}
sessionAffinity: None
externalTrafficPolicy: Local
selector:
name: kmip-barbican
app: {{ include "kmip.fullname" . }}-barbican
ports:
- port: {{ .Values.service.ports.port }}
- name: http
port: {{ .Values.service.ports.port }}
targetPort: 5696
protocol: TCP
name: http
- name: restapi
port: 5005
targetPort: 5005
protocol: TCP
1 change: 1 addition & 0 deletions openstack/kmip/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ replicaCount: 1
kmip:
pullPolicy: IfNotPresent
image: defined-in-secrets
restapi_image: defined-in-secrets

serviceAccount:
# Specifies whether a service account should be created
Expand Down

0 comments on commit 16aa7b1

Please sign in to comment.