Commit b29a946e authored by Kishore Battula's avatar Kishore Battula
Browse files

Merge branch 'haaggarw/AddingHelmCharts' into 'master'

Adding helm charts for AKS

See merge request !6
parents dd7b559f 56a064c8
Pipeline #7424 failed with stages
in 17 minutes and 47 seconds
......@@ -14,3 +14,7 @@ include:
- project: 'osdu/platform/ci-cd-pipelines'
ref: 'master'
file: 'scanners/gitlab-ultimate.yml'
- project: "osdu/platform/ci-cd-pipelines"
file: "cloud-providers/azure-function.yml"
AZURE_SERVICE="storage"
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
# Copyright © Microsoft Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://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.
apiVersion: v2
name: wks
appVersion: "latest"
description: Helm Chart for installing wks service
version: 0.1.0
type: application
# Copyright © Microsoft Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://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.
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}
namespace: osdu
spec:
replicas: {{ .Values.global.replicaCount }}
selector:
matchLabels:
app: {{ .Release.Name }}-{{ .Chart.Name }}
template:
metadata:
labels:
app: {{ .Release.Name }}-{{ .Chart.Name }}
aadpodidbinding: osdu-identity
spec:
containers:
- name: {{ .Release.Name }}-{{ .Chart.Name }}
image: {{ .Values.image.repository }}/{{ .Chart.Name }}-{{ .Values.global.image.branch }}:{{ .Values.image.tag | default .Chart.AppVersion }}
imagePullPolicy: Always
env:
- name: spring_application_name
value: wks
- 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: AZURE_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_APP_RESOURCE_ID
valueFrom:
secretKeyRef:
name: appid
key: appid
- name: appinsights_key
valueFrom:
secretKeyRef:
name: appinsights
key: appinsights
- name: cosmosdb_database
value: osdu-db
- name: servicebus_namespace_name
valueFrom:
configMapKeyRef:
name: osdu-svc-properties
key: ENV_SERVICEBUS_NAMESPACE
- name: servicebus_connection_string
valueFrom:
secretKeyRef:
name: servicebus
key: servicebus
- name: servicebus_topic_name
value: recordstopic
- name: storage_account
valueFrom:
configMapKeyRef:
name: osdu-svc-properties
key: ENV_STORAGE_ACCOUNT
- name: servicebus_topic_subscription
value: "recordstopicsubscription"
- name: server_port
value: "80"
- name: storage_service_endpoint
value: "http://osdu-flux-storage/api/storage/v2"
- name: max_concurrent_calls
value: "1"
- name: executor_n_threads
value: "2"
- name: max_lock_renew_duration_seconds
value: "120"
# Copyright © Microsoft Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://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.
apiVersion: keda.k8s.io/v1alpha1
kind: ScaledObject
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}
namespace: osdu
labels:
deploymentName: {{ .Release.Name }}-{{ .Chart.Name }}
spec:
scaleTargetRef:
deploymentName: {{ .Release.Name }}-{{ .Chart.Name }}
triggers:
- type: azure-servicebus
metadata:
type: serviceBusTrigger
direction: in
name: message
subscriptionName: {{ .Values.config.azure.servicebusSubscription }}
topicName: {{ .Values.config.azure.servicebusTopic }}
connection: SERVICE_BUS
# Copyright © Microsoft Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://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.
config:
name: wks
azure:
servicebusSubscription: recordstopicsubscription
servicebusTopic: recordstopic
image:
repository: community.opengroup.org:5555/osdu/platform/data-flow/enrichment/wks
\ No newline at end of file
FROM openjdk:8-jdk-alpine
ARG JAR_FILE=target/*spring-boot.jar
COPY ${JAR_FILE} app.jar
ENTRYPOINT ["java","-jar","/app.jar"]
\ No newline at end of file
Markdown is supported
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