├── .editorconfig ├── .github ├── CODEOWNERS ├── renovate.json └── workflows │ └── release-drafter.yml ├── .gitignore ├── LICENSE ├── Makefile ├── README.md ├── azure-pipelines.yaml ├── ci-tests-values.yaml ├── ci-values.yaml ├── images └── icons8-java-50.png └── java ├── Chart.yaml ├── templates ├── NOTES.txt ├── configmap.yaml ├── deployment-tests.yaml ├── deployment.yaml ├── hpa.yaml ├── ingress.yaml ├── pdb.yaml ├── secretproviderclass-tests.yaml ├── secretproviderclass.yaml ├── service.yaml └── tests │ └── test-service.yaml └── values.yaml /.editorconfig: -------------------------------------------------------------------------------- 1 | [Makefile] 2 | indent_style = tab 3 | 4 | [*.{yaml,yml}] 5 | quote_type = simple 6 | indent_style = space 7 | indent_size = 2 8 | end_of_line = lf 9 | charset = utf-8 10 | trim_trailing_whitespace = true 11 | insert_final_newline = true 12 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @hmcts/platform-operations 2 | -------------------------------------------------------------------------------- /.github/renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "enabledManagers": [ 3 | "helm-requirements" 4 | ], 5 | "helm-requirements": { 6 | "fileMatch": [ 7 | "\\Chart.yaml$" 8 | ], 9 | "aliases": { 10 | "hmctspublic": "https://hmctspublic.azurecr.io/helm/v1/repo/" 11 | } 12 | }, 13 | "extends": [ 14 | "local>hmcts/.github:renovate-config" 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /.github/workflows/release-drafter.yml: -------------------------------------------------------------------------------- 1 | name: Release Drafter 2 | 3 | on: 4 | push: 5 | # branches to consider in the event; optional, defaults to all 6 | branches: 7 | - master 8 | 9 | jobs: 10 | update_release_draft: 11 | runs-on: ubuntu-latest 12 | steps: 13 | # Drafts your next Release notes as Pull Requests are merged into "master" 14 | - uses: release-drafter/release-drafter@v5 15 | env: 16 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | **/*.tgz 2 | *.iml 3 | .idea 4 | *.local 5 | *.local.yaml 6 | Chart.lock 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 HM Courts & Tribunals Service 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .DEFAULT_GOAL := all 2 | CHART := java 3 | RELEASE := chart-${CHART}-release 4 | NAMESPACE := chart-tests 5 | TEST := ${RELEASE}-${CHART}-test 6 | ACR := hmctspublic 7 | ACR_SUBSCRIPTION := DCD-CFTAPPS-DEV 8 | AKS_RESOURCE_GROUP := cft-preview-00-rg 9 | AKS_CLUSTER := cft-preview-00-aks 10 | 11 | setup: 12 | az account set --subscription ${ACR_SUBSCRIPTION} 13 | az configure --defaults acr=${ACR} 14 | az aks get-credentials --resource-group ${AKS_RESOURCE_GROUP} --name ${AKS_CLUSTER} 15 | 16 | clean: 17 | -helm uninstall ${RELEASE} -n ${NAMESPACE} 18 | -kubectl delete pod ${TEST} -n ${NAMESPACE} 19 | 20 | lint: 21 | helm lint ${CHART} -f ci-values.yaml 22 | helm lint ${CHART} -f ci-tests-values.yaml 23 | 24 | template: 25 | helm template ${CHART} -f ci-values.yaml 26 | helm template ${CHART} -f ci-tests-values.yaml 27 | 28 | deploy: 29 | helm install ${RELEASE} ${CHART} --namespace ${NAMESPACE} -f ci-values.yaml --wait --timeout 60s 30 | 31 | dry-run: 32 | helm dependency update ${CHART} 33 | helm install ${RELEASE} ${CHART} --namespace ${NAMESPACE} -f ci-values.yaml --dry-run --debug 34 | helm install ${RELEASE} ${CHART} --namespace ${NAMESPACE} -f ci-tests-values.yaml --dry-run --debug 35 | 36 | test: 37 | helm test ${RELEASE} --namespace ${NAMESPACE} 38 | 39 | all: setup clean lint deploy test 40 | 41 | .PHONY: setup clean lint deploy test all 42 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # chart-java 2 | 3 | [![Build Status](https://dev.azure.com/hmcts/CNP/_apis/build/status/Helm%20Charts/chart-java)](https://dev.azure.com/hmcts/CNP/_build/latest?definitionId=62) 4 | 5 | This chart is intended for simple Java microservices. 6 | 7 | We will take small PRs and small features to this chart but more complicated needs should be handled in your own chart. 8 | 9 | *NOTE*: /health/readiness and /health/liveness [exposed by spring boot 2.3.0 actuator](https://docs.spring.io/spring-boot/docs/2.3.0.BUILD-SNAPSHOT/reference/html/production-ready-features.html#production-ready-kubernetes-probes) are used for readiness and liveness checks. 10 | 11 | This chart adds below templates from [chart-library](https://github.com/hmcts/chart-library/) based on the chosen configuration: 12 | 13 | - [Deployment](https://github.com/hmcts/chart-library/tree/master#deployment) 14 | - [Keyvault Secrets](https://github.com/hmcts/chart-library#keyvault-secret-csi-volumes) 15 | - [Horizontal Pod Auto Scaler](https://github.com/hmcts/chart-library/tree/master#hpa-horizontal-pod-auto-scaler) 16 | - [Ingress](https://github.com/hmcts/chart-library/tree/master#ingress) 17 | - [Pod Disruption Budget](https://github.com/hmcts/chart-library/tree/master#pod-disruption-budget) 18 | - [Service](https://github.com/hmcts/chart-library/tree/master#service) 19 | - [Deployment Tests](https://github.com/hmcts/chart-library/tree/master#smoke-and-functional-tests) 20 | 21 | ## Example configuration 22 | 23 | ```yaml 24 | applicationPort: 8080 25 | environment: 26 | REFORM_TEAM: cnp 27 | REFORM_SERVICE_NAME: rhubarb-backend 28 | REFORM_ENVIRONMENT: preview 29 | ROOT_APPENDER: CNP 30 | CONFIG_TEMPLATE: "{{ .Release.Name }}-config" 31 | configmap: 32 | VAR_A: VALUE_A 33 | VAR_B: VALUE_B 34 | secrets: 35 | ENVIRONMENT_VAR: 36 | secretRef: some-secret-reference 37 | key: connectionString 38 | ENVIRONMENT_VAR_OTHER: 39 | secretRef: some-secret-reference-other 40 | key: connectionStringOther 41 | disabled: true #ENVIRONMENT_VAR_OTHER will not be set to environment 42 | keyVaults: 43 | "cmc": 44 | secrets: 45 | - smoke-test-citizen-username 46 | - smoke-test-user-password 47 | "s2s": 48 | secrets: 49 | - microservicekey-cmcLegalFrontend 50 | applicationInsightsInstrumentKey: "some-key" 51 | ``` 52 | 53 | If you wish to use pod identity for accessing the key vaults instead of a service principal you need to set a flag `aadIdentityName: ` 54 | e.g. 55 | ```yaml 56 | aadIdentityName: cmc 57 | keyVaults: 58 | "cmc": 59 | usePodIdentity: true 60 | secrets: 61 | - smoke-test-citizen-username 62 | - smoke-test-user-password 63 | ``` 64 | 65 | ## Startup probes 66 | Startup probes are defined in the [library template](https://github.com/hmcts/chart-library/tree/dtspo-2201-startup-probes#startup-probes) and should be configured for slow starting applications. 67 | The default values below (defined in the chart) should be sufficient for most applications but can be overriden as required. 68 | ```yaml 69 | startupPath: '/health/liveness' 70 | startupDelay: 5 71 | startupTimeout: 3 72 | startupPeriod: 10 73 | startupFailureThreshold: 3 74 | ``` 75 | 76 | To configure startup probes for a slow starting application: 77 | - Set the value of `(startupFailureThreshold x startupPeriodSeconds)` to cover the longest startup time required by the application 78 | - If `livenessDelay` is currently configured, set the value to `0` 79 | 80 | ### Example configuration 81 | The below example will allow the application 360 seconds to complete startup. 82 | ```yaml 83 | java: 84 | livenessDelay: 0 85 | startupPeriod: 120 86 | startupFailureThreshold: 3 87 | ``` 88 | Also see example [pull request](https://github.com/hmcts/cnp-flux-config/pull/12891/files). 89 | 90 | ### HPA Horizontal Pod Autoscaler 91 | 92 | To adjust the number of pods in a deployment depending on CPU utilization AKS supports horizontal pod autoscaling. 93 | To enable horizontal pod autoscaling you can set the [autoscaling section](https://docs.microsoft.com/en-us/azure/aks/tutorial-kubernetes-scale#autoscale-pods). 94 | 95 | ```yaml 96 | autoscaling: # Default is true 97 | enabled: true 98 | maxReplicas: 5 # Optional setting, will use the value of replicas + 2 if not set 99 | minReplicas: 2 # Optional setting, will use the value of replicas if not set 100 | targetCPUUtilizationPercentage: 80 # Default is 80% target CPU utilization 101 | ``` 102 | 103 | ## Postgresql 104 | 105 | If you need to use a Postgresql database for testing then you can enable it 106 | by setting the following flag in your application config with: 107 | 108 | ```yaml 109 | java: 110 | environment: 111 | DB_HOST: "{{ .Release.Name }}-postgresql" 112 | DB_USER_NAME: "{{ .Values.postgresql.auth.username}}" 113 | DB_PASSWORD: "{{ .Values.postgresql.auth.password}}" 114 | 115 | postgresql: 116 | #Whether to deploy the Postgres Chart or not 117 | enabled: true 118 | ``` 119 | 120 | ## Smoke and functional tests 121 | 122 | From version 2.15.0 of this chart you can configure your functional and smoke tests to run just after deployment or at scheduled times 123 | as cron jobs. 124 | 125 | ```yaml 126 | java: 127 | testsConfig: 128 | keyVaults: 129 | cmc: 130 | excludeEnvironmentSuffix: false 131 | secretRef: "kvcreds" 132 | secrets: 133 | smoke-test-citizen-username: SMOKE_TEST_CITIZEN_USER 134 | smoke-test-user-password: SMOKE_TEST_CITIZEN_PASS 135 | environment: 136 | TEST_URL: http://plum-recipe-backend-java 137 | SLACK_CHANNEL: "platops-build-notices" 138 | SLACK_NOTIFY_SUCCESS: "true" 139 | CLUSTER_NAME: "aat-01-aks" 140 | 141 | smoketests: 142 | image: hmctspublic.azurecr.io/spring-boot/template-test 143 | enabled: true 144 | environment: 145 | TEST_URL: http://plum-recipe-backend-java-overridden 146 | 147 | functionaltests: 148 | image: hmctspublic.azurecr.io/spring-boot/template-test 149 | enabled: true 150 | 151 | smoketestscron: 152 | image: hmctspublic.azurecr.io/spring-boot/template-test 153 | enabled: true 154 | environment: 155 | TEST_URL: http://plum-recipe-backend-java-overridden2 156 | 157 | functionaltestscron: 158 | image: hmctspublic.azurecr.io/spring-boot/template-test 159 | enabled: true 160 | environment: 161 | TEST_URL: http://plum-recipe-backend-java-overridden2 162 | SOME_ENV: some-val 163 | ``` 164 | 165 | ## Development and Testing 166 | 167 | Default configuration (e.g. default image and ingress host) is setup for preview. This is suitable for local development and testing. 168 | 169 | - Ensure you have logged in with `az cli` and are using `preview` subscription (use `az account show` to display the current one). 170 | - For local development see the `Makefile` for available targets. 171 | - To execute an end-to-end build, deploy and test run `make`. 172 | - to clean up deployed releases, charts, test pods and local charts, run `make clean` 173 | 174 | `helm test` will deploy a busybox container alongside the release which performs a simple HTTP request against the service health endpoint. If it doesn't return `HTTP 200` the test will fail. **NOTE:** it does NOT run with `--cleanup` so the test pod will be available for inspection. 175 | 176 | ## Azure DevOps Builds 177 | 178 | Builds are run against the 'nonprod' AKS cluster. 179 | 180 | ### Pull Request Validation 181 | 182 | A build is triggered when pull requests are created. This build will run `helm lint`, deploy the chart using `ci-values.yaml` and run `helm test`. 183 | 184 | ### Release Build 185 | 186 | Triggered when the repository is tagged (e.g. when a release is created). Also performs linting and testing, and will publish the chart to ACR on success. 187 | 188 | 189 | ### Releases 190 | We use semantic versioning via GitHub releases to handle new releases of this application chart, this is done via automation called Release Drafter. When you merge a PR to master, a new draft release will be created. 191 | More information is available about the [release process and how to create draft releases for testing purposes in more depth](https://hmcts.github.io/ops-runbooks/Testing-Changes/drafting-a-release.html) 192 | -------------------------------------------------------------------------------- /azure-pipelines.yaml: -------------------------------------------------------------------------------- 1 | name: chart-java pipeline 2 | trigger: 3 | branches: 4 | include: 5 | - refs/tags/* 6 | pr: 7 | branches: 8 | include: 9 | - master 10 | resources: 11 | repositories: 12 | - repository: cnp-azuredevops-libraries 13 | type: github 14 | ref: refs/heads/master 15 | name: hmcts/cnp-azuredevops-libraries 16 | endpoint: 'hmcts' 17 | 18 | variables: 19 | - name: agentPool 20 | value: ubuntu-latest 21 | 22 | jobs: 23 | - job: Validate 24 | pool: 25 | vmImage: ${{ variables.agentPool }} 26 | steps: 27 | - template: steps/charts/validate.yaml@cnp-azuredevops-libraries 28 | parameters: 29 | chartName: java 30 | chartReleaseName: chart-java-ci-test 31 | chartNamespace: chart-tests 32 | helmInstallTimeout: "500" 33 | 34 | - job: Release 35 | # Make sure we have a tag to run this job 36 | condition: > 37 | and( 38 | succeeded(), 39 | startsWith(variables['Build.SourceBranch'], 'refs/tags/') 40 | ) 41 | dependsOn: Validate 42 | pool: 43 | vmImage: ${{ variables.agentPool }} 44 | steps: 45 | - template: steps/charts/release.yaml@cnp-azuredevops-libraries 46 | parameters: 47 | chartName: java 48 | chartReleaseName: chart-java 49 | chartNamespace: chart-tests 50 | -------------------------------------------------------------------------------- /ci-tests-values.yaml: -------------------------------------------------------------------------------- 1 | aadIdentityName: someId 2 | 3 | testsConfig: 4 | keyVaults: 5 | "cmc": 6 | excludeEnvironmentSuffix: false 7 | secretRef: "kvcreds" 8 | secrets: 9 | smoke-test-citizen-username: SMOKE_TEST_CITIZEN_USER 10 | smoke-test-user-password: SMOKE_TEST_CITIZEN_PASS 11 | serviceAccountName: tests-service-account 12 | environment: 13 | TEST_URL: http://plum-recipe-backend-java 14 | 15 | smoketests: 16 | image: hmctspublic.azurecr.io/spring-boot/template-test 17 | enabled: true 18 | environment: 19 | TEST_URL: http://plum-recipe-backend-java-overridden 20 | 21 | functionaltests: 22 | image: hmctspublic.azurecr.io/spring-boot/template-test 23 | enabled: true 24 | 25 | smoketestscron: 26 | schedule: "20 0/3 * * *" 27 | image: hmctspublic.azurecr.io/spring-boot/template-test 28 | enabled: true 29 | environment: 30 | TEST_URL: http://plum-recipe-backend-java-overridden2 31 | 32 | functionaltestscron: 33 | schedule: "30 0/6 * * *" 34 | image: hmctspublic.azurecr.io/spring-boot/template-test 35 | enabled: true 36 | environment: 37 | TEST_URL: http://plum-recipe-backend-java-overridden2 38 | SOME_ENV: some-val 39 | memoryRequests: '512Mi' 40 | cpuRequests: '300m' 41 | memoryLimits: '2048Mi' 42 | cpuLimits: '2000m' 43 | -------------------------------------------------------------------------------- /ci-values.yaml: -------------------------------------------------------------------------------- 1 | image: 'hmctspublic.azurecr.io/plum/recipe-backend:latest' 2 | environment: 3 | POSTGRES_SSL_MODE: disable 4 | POSTGRES_PASSWORD: "{{ .Values.postgresql.auth.password}}" 5 | POSTGRES_DATABASE: "{{ .Values.postgresql.auth.database }}" 6 | POSTGRES_USER: "{{ .Values.postgresql.auth.username }}" 7 | POSTGRES_HOST: "{{ .Release.Name }}-postgresql" 8 | replicas: 2 9 | useInterpodAntiAffinity: true 10 | ingressHost: "{{.Release.Name}}.service.core-compute-preview.internal" 11 | additionalIngressHosts: ["ci-01.{{.Values.global.environment}}.platform.hmcts.net"] 12 | imagePullPolicy: Always 13 | configmap: 14 | VAR_A: VALUE_A 15 | VAR_B: VALUE_B 16 | secrets: 17 | CONNECTION_STRING: 18 | secretRef: some-secret-reference 19 | key: connectionString 20 | disabled: true 21 | prometheus: 22 | enabled: true 23 | keyVaults: 24 | "plumsi": 25 | excludeEnvironmentSuffix: false 26 | secrets: 27 | - test-secret 28 | postgresql: 29 | enabled: true 30 | global: 31 | tenantId: "531ff96d-0ae9-462a-8d2d-bec7c0b42082" 32 | environment: aat 33 | enableKeyVaults: true 34 | -------------------------------------------------------------------------------- /images/icons8-java-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hmcts/chart-java/a821a2d2a803416a6d1638faf18f7f8fd71a12c1/images/icons8-java-50.png -------------------------------------------------------------------------------- /java/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | description: A Helm chart for HMCTS Java Microservices 3 | name: java 4 | # This is the chart version. This doesn't need to be incremented on every change. 5 | # It is managed by release pipeline based on Github tag 6 | version: 0.1.0 # Do not change 7 | appVersion: 0.1.0 # Do not change 8 | type: application 9 | icon: https://github.com/hmcts/chart-java/raw/master/images/icons8-java-50.png 10 | keywords: 11 | - java 12 | - web 13 | - springboot 14 | - postgres 15 | - postgresql 16 | 17 | dependencies: 18 | - name: library 19 | version: 2.2.2 20 | repository: oci://hmctspublic.azurecr.io/helm 21 | - name: postgresql 22 | version: 14.0.1 23 | repository: https://charts.bitnami.com/bitnami 24 | condition: postgresql.enabled 25 | -------------------------------------------------------------------------------- /java/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | Thank you for installing {{ .Chart.Name }}. 2 | 3 | Your release is named {{ .Release.Name }}. 4 | 5 | To learn more about the release, try: 6 | 7 | $ helm status {{ .Release.Name }} 8 | $ helm get {{ .Release.Name }} 9 | -------------------------------------------------------------------------------- /java/templates/configmap.yaml: -------------------------------------------------------------------------------- 1 | {{- template "hmcts.configmap.v2.tpl" . -}} -------------------------------------------------------------------------------- /java/templates/deployment-tests.yaml: -------------------------------------------------------------------------------- 1 | {{- template "hmcts.deploymenttests.v2.tpl" . -}} -------------------------------------------------------------------------------- /java/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | {{- template "hmcts.deployment.v5.tpl" . -}} 2 | -------------------------------------------------------------------------------- /java/templates/hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- template "hmcts.hpa.v5.tpl" . -}} 2 | -------------------------------------------------------------------------------- /java/templates/ingress.yaml: -------------------------------------------------------------------------------- 1 | {{- template "hmcts.ingress.v3.tpl" . -}} -------------------------------------------------------------------------------- /java/templates/pdb.yaml: -------------------------------------------------------------------------------- 1 | {{- template "hmcts.pdb.v2.tpl" . -}} -------------------------------------------------------------------------------- /java/templates/secretproviderclass-tests.yaml: -------------------------------------------------------------------------------- 1 | {{- template "hmcts.secretproviderclass-tests.v3.tpl" . -}} 2 | -------------------------------------------------------------------------------- /java/templates/secretproviderclass.yaml: -------------------------------------------------------------------------------- 1 | {{- template "hmcts.secretproviderclass.v5.tpl" . -}} 2 | -------------------------------------------------------------------------------- /java/templates/service.yaml: -------------------------------------------------------------------------------- 1 | {{- template "hmcts.service.v2.tpl" . -}} -------------------------------------------------------------------------------- /java/templates/tests/test-service.yaml: -------------------------------------------------------------------------------- 1 | {{- template "hmcts.testservice.v2.tpl" . -}} 2 | -------------------------------------------------------------------------------- /java/values.yaml: -------------------------------------------------------------------------------- 1 | applicationPort: 4550 2 | imagePullPolicy: IfNotPresent 3 | replicas: 1 4 | registerAdditionalDns: 5 | enabled: false 6 | memoryRequests: '1024Mi' 7 | cpuRequests: '250m' 8 | memoryLimits: '2048Mi' 9 | cpuLimits: '1500m' 10 | devmemoryRequests: '512Mi' 11 | devcpuRequests: '250m' 12 | devmemoryLimits: '1024Mi' 13 | devcpuLimits: '2500m' 14 | readinessPath: '/health/readiness' 15 | readinessDelay: 0 16 | readinessTimeout: 3 17 | readinessPeriod: 15 18 | livenessPath: '/health/liveness' 19 | livenessDelay: 0 20 | livenessTimeout: 3 21 | livenessPeriod: 15 22 | livenessFailureThreshold: 3 23 | startupPath: '/health/liveness' 24 | startupDelay: 10 25 | startupTimeout: 3 26 | startupPeriod: 10 27 | startupFailureThreshold: 20 28 | saEnabled: true 29 | spotInstances: 30 | enabled: false 31 | devApplicationInsightsInstrumentKeyName: AZURE_APPLICATIONINSIGHTS_INSTRUMENTATIONKEY 32 | devApplicationInsightsInstrumentKey: '00000000-0000-0000-0000-000000000000' 33 | useInterpodAntiAffinity: true 34 | ingressClass: traefik 35 | disableTraefikTls: true 36 | # WARNING: ingressSessionAffinity is a temporary option. 37 | # This is subject to removal without notice. Do NOT use for any reason! 38 | ingressSessionAffinity: 39 | enabled: false 40 | sessionCookieName: sticky 41 | dnsConfig: 42 | ndots: "3" 43 | singleRequestTcp: false 44 | pdb: 45 | enabled: true 46 | maxUnavailable: 50% 47 | 48 | ## Postgres chart configuration 49 | ## https://github.com/helm/charts/blob/master/stable/postgresql/values.yaml 50 | 51 | postgresql: 52 | image: 53 | registry: hmctspublic.azurecr.io 54 | repository: imported/bitnami/postgresql 55 | tag: '11.16.0' 56 | ## Whether to deploy the Postgres Chart or not 57 | enabled: false 58 | ## Default Postgres Configuration parameters 59 | auth: 60 | username: javapostgres 61 | password: javapassword 62 | database: javadatabase 63 | ## Disable Postgres Persistence 64 | primary: 65 | persistence: 66 | enabled: false 67 | 68 | global: 69 | enableKeyVaults: false 70 | devMode: false 71 | smoketestscron: 72 | enabled: true 73 | functionaltestscron: 74 | enabled: true 75 | prometheus: 76 | enabled: false 77 | path: /prometheus 78 | 79 | testsConfig: 80 | memoryRequests: '256Mi' 81 | cpuRequests: '100m' 82 | memoryLimits: '2048Mi' 83 | cpuLimits: '1000m' 84 | serviceAccountName: tests-service-account 85 | smoketests: 86 | image: hmctspublic.azurecr.io/spring-boot/template 87 | enabled: false 88 | functionaltests: 89 | image: hmctspublic.azurecr.io/spring-boot/template 90 | enabled: false 91 | smoketestscron: 92 | image: hmctspublic.azurecr.io/spring-boot/template 93 | enabled: false 94 | schedule: "20 0/1 * * *" 95 | functionaltestscron: 96 | image: hmctspublic.azurecr.io/spring-boot/template 97 | enabled: false 98 | schedule: "30 0/6 * * *" 99 | 100 | # HPA - example 101 | # autoscaling: 102 | # enabled: true 103 | # maxReplicas: 5 104 | # minReplicas: 2 105 | # targetCPUUtilizationPercentage: 80 106 | 107 | autoscaling: 108 | enabled: true 109 | cpu: 110 | enabled: true 111 | averageUtilization: 80 112 | memory: 113 | enabled: true 114 | averageUtilization: 80 115 | useWorkloadIdentity: true 116 | --------------------------------------------------------------------------------