Commit 35461632 authored by Sherman Yang's avatar Sherman Yang
Browse files

add devops folder and aks chart

parent fd7ab659
Pipeline #8775 passed with stages
in 7 minutes and 12 seconds
# Pipeline Support Commands
```bash
AZURE_SERVICE="crs-catalog-service"
REPO_BRANCH="master"
TAG="latest"
PARTIAL=${REPO_BRANCH/\//-}
BRANCH=${PARTIAL/./-}
echo "--set image.branch=$BRANCH --set image.tag=$TAG"
# Install the Service
helm upgrade -i osdu-gitlab-$AZURE_SERVICE chart --set image.branch=$BRANCH --set image.tag=$TAG
pod=$(kubectl get pod |grep $AZURE_SERVICE | tail -1 | awk '{print $1}')
status=$(kubectl wait --for=condition=Ready pod/$pod --timeout=60s)
if [[ "$status" != *"met"* ]]; then echo "POD didn't start correctly" ; exit 1 ; fi
```
apiVersion: v2
name: crs-catalog-service
appVersion: "latest"
description: Helm Chart for installing crs-catalog-service service.
version: 0.1.0
type: application
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}
namespace: osdu
spec:
replicas: {{ .Values.global.replicaCount }}
selector:
matchLabels:
app: {{ .Chart.Name }}
template:
metadata:
labels:
app: {{ .Chart.Name }}
aadpodidbinding: osdu-identity
spec:
volumes:
- name: azure-keyvault
csi:
driver: secrets-store.csi.k8s.io
readOnly: true
volumeAttributes:
secretProviderClass: azure-keyvault
- name: shared-data
emptyDir: {}
imagePullSecrets:
- name: {{ .Values.catalogs.imagePullSecrets }}
initContainers:
- name: "init-crs-catalog"
image: "{{ .Values.catalogs.repository }}:{{ .Values.catalogs.tag }}"
imagePullPolicy: {{ .Values.catalogs.pullPolicy }}
volumeMounts:
- name: shared-data
mountPath: /mnt/crs_catalogs
containers:
- name: {{ .Chart.Name }}
image: {{ .Values.image.repository }}/{{ .Chart.Name }}-{{ .Values.image.branch }}:{{ .Values.image.tag | default .Chart.AppVersion }}
imagePullPolicy: Always
ports:
- containerPort: 80
readinessProbe:
httpGet:
path: /api/crs/catalog/swagger-ui.html
port: 80
volumeMounts:
- name: azure-keyvault
mountPath: "/mnt/azure-keyvault"
readOnly: true
- name: shared-data
mountPath: /mnt/crs_catalogs
env:
- name: spring_application_name
value: crs-catalog-service
- name: server.servlet.contextPath
value: /api/crs/catalog/v2/
- name: server_port
value: "80"
- name: ACCEPT_HTTP # TEMPORARY UNTIL HTTPS
value: "true"
- name: KEYVAULT_URI
valueFrom:
configMapKeyRef:
name: osdu-svc-properties
key: ENV_KEYVAULT
- name: AZURE_TENANT_ID
valueFrom:
configMapKeyRef:
name: osdu-svc-properties
key: ENV_TENANT_ID
- name: client-id
valueFrom:
secretKeyRef:
name: clientid
key: clientid
- name: AZURE_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: clientpassword
key: clientpassword
- name: aad_client_id
valueFrom:
secretKeyRef:
name: appid
key: appid
- name: azure_activedirectory_session_stateless
value: "true"
- name: azure_activedirectory_AppIdUri
value: "api://$(aad_client_id)"
- name: appinsights_key
valueFrom:
secretKeyRef:
name: appinsights
key: appinsights
- name: ENTITLEMENT_URL
value: http://entitlements-azure/entitlements/v1
- name: azure_istioauth_enabled
value: "true"
apiVersion: v1
kind: Service
metadata:
name: {{ .Chart.Name }}
namespace: osdu
spec:
type: ClusterIP
ports:
- protocol: TCP
port: 80
targetPort: 80
selector:
app: {{ .Chart.Name }}
global:
replicaCount: 1
image:
repository: community.opengroup.org:5555/osdu/platform/ref/crs-catalog-service
branch: master
tag: latest
catalogs:
repository: delfi.azurecr.io/crs-catalogs
tag: v2
pullPolicy: Always
imagePullSecrets: acr
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment