diff --git a/Jenkinsfile_CNP b/Jenkinsfile_CNP index 2ba618edd..0126dfdc2 100644 --- a/Jenkinsfile_CNP +++ b/Jenkinsfile_CNP @@ -35,7 +35,6 @@ static LinkedHashMap secret(String secretName, String envVar) { withPipeline(type, product, component) { loadVaultSecrets(secrets) - enableDockerBuild() enableSlackNotifications('#idam_tech') installCharts() diff --git a/Makefile b/Makefile index cbba45a15..d98fb4dd2 100644 --- a/Makefile +++ b/Makefile @@ -15,23 +15,28 @@ UNAME := $(uname) setup: - @if [ -z "${HELM_INSTALLED}" ] && [[ "${UNAME}" == 'Darwin' ]]; then \ - brew install kubernetes-helm ; \ + brew install helm ; \ + elif $$(helm version | grep -q 'v2'); then \ + brew upgrade helm ; \ fi - az account set --subscription ${ACR_SUBSCRIPTION} - az configure --defaults acr=${ACR} - az acr helm repo add - az aks get-credentials --resource-group ${AKS_RESOURCE_GROUP} --name ${AKS_CLUSTER} + @az account set --subscription ${ACR_SUBSCRIPTION} + @az configure --defaults acr=${ACR} + @az acr helm repo add + @az aks get-credentials --resource-group ${AKS_RESOURCE_GROUP} --name ${AKS_CLUSTER} - @if [ ! -d $${HOME}/.helm ]; then \ helm init --client-only ; \ fi clean: - - @helm delete --purge ${RELEASE} + - @helm uninstall --namespace ${NAMESPACE} ${RELEASE} + - @for i in $$(kubectl -n ${NAMESPACE} get deploy -o name | grep ${RELEASE}); do \ + kubectl -n ${NAMESPACE} delete $${i} --grace-period=0 --force ; \ + done - @for i in $$(kubectl -n ${NAMESPACE} get rs -o name | grep ${RELEASE}); do \ - kubectl -n ${NAMESPACE} delete $${i} --grace-period=0 --force ; \ + kubectl -n ${NAMESPACE} delete $${i} --grace-period=0 --force ; \ done - @for i in $$(kubectl -n ${NAMESPACE} get pod -o name | grep ${RELEASE}); do \ - kubectl -n ${NAMESPACE} delete $${i} --grace-period=0 --force ; \ + kubectl -n ${NAMESPACE} delete $${i} --grace-period=0 --force ; \ done update: @@ -41,16 +46,16 @@ lint: helm lint charts/${CHART} template: - helm template charts/${CHART} + helm template ${RELEASE} --set "java.releaseNameOverride=${RELEASE}" --namespace ${NAMESPACE} charts/${CHART} dry-run: - helm install charts/${CHART} --name ${RELEASE} --namespace ${NAMESPACE} -f ci-values.yaml --dry-run --timeout 30 --atomic + helm install ${RELEASE} --set "java.releaseNameOverride=${RELEASE}" --namespace ${NAMESPACE} --dry-run --timeout 30s --atomic charts/${CHART} deploy: - helm install charts/${CHART} --name ${RELEASE} --namespace ${NAMESPACE} --wait --timeout 30 + helm install ${RELEASE} --set "java.releaseNameOverride=${RELEASE}" --set "java.replicas=1" --namespace ${NAMESPACE} --wait --timeout 8m charts/${CHART} test: - helm test charts/${RELEASE} + helm test ${RELEASE} --namespace ${NAMESPACE} force-update-pods: @kubectl -n ${NAMESPACE} scale --current-replicas=2 --replicas=0 deploy/idam-api diff --git a/charts/idam-web-public/Chart.yaml b/charts/idam-web-public/Chart.yaml index 5b4c30c70..2bbd5805a 100644 --- a/charts/idam-web-public/Chart.yaml +++ b/charts/idam-web-public/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: "1.0" description: A Helm chart for HMCTS Reform IDAM Web Public name: idam-web-public -version: 0.2.2 +version: 0.2.3 maintainers: - name: Amido Reform SIDAM Team email: reform.idam@HMCTS.NET diff --git a/charts/idam-web-public/requirements.yaml b/charts/idam-web-public/requirements.yaml index 6d6a934c6..fe652555f 100644 --- a/charts/idam-web-public/requirements.yaml +++ b/charts/idam-web-public/requirements.yaml @@ -1,4 +1,4 @@ dependencies: - name: java - version: ~2.11.1 + version: ~2.16.0 repository: '@hmctspublic' diff --git a/charts/idam-web-public/values.aat.template.yaml b/charts/idam-web-public/values.aat.template.yaml new file mode 100644 index 000000000..27bdfccbf --- /dev/null +++ b/charts/idam-web-public/values.aat.template.yaml @@ -0,0 +1,6 @@ +java: + releaseNameOverride: ${SERVICE_NAME} + image: ${IMAGE_NAME} + ingressHost: ${SERVICE_FQDN} + ingressIP: ${INGRESS_IP} + consulIP: ${CONSUL_LB_IP} \ No newline at end of file diff --git a/charts/idam-web-public/values.preview.template.yaml b/charts/idam-web-public/values.preview.template.yaml index 5c97a8c1e..1844afbe6 100644 --- a/charts/idam-web-public/values.preview.template.yaml +++ b/charts/idam-web-public/values.preview.template.yaml @@ -1,7 +1,7 @@ java: releaseNameOverride: ${SERVICE_NAME} image: ${IMAGE_NAME} - replicas: 2 + replicas: 1 ingressHost: ${SERVICE_FQDN} ingressIP: ${INGRESS_IP} consulIP: ${CONSUL_LB_IP} diff --git a/charts/idam-web-public/values.yaml b/charts/idam-web-public/values.yaml index f5e0aa5a0..b5ebd8f9c 100644 --- a/charts/idam-web-public/values.yaml +++ b/charts/idam-web-public/values.yaml @@ -28,4 +28,9 @@ java: devmemoryRequests: '512Mi' devcpuRequests: '1000m' devmemoryLimits: '1024Mi' - devcpuLimits: '2500m' \ No newline at end of file + devcpuLimits: '2500m' + +global: + tenantId: "531ff96d-0ae9-462a-8d2d-bec7c0b42082" + environment: preview + enableKeyVaults: true \ No newline at end of file