diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 86483ee..7774750 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,7 +25,7 @@ jobs: - name: Install Helm uses: azure/setup-helm@v3 with: - version: 'latest' # default is latest (stable) + version: "latest" # default is latest (stable) token: ${{ secrets.GITHUB_TOKEN }} # only needed if version is 'latest' - name: Run chart-releaser diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 23049b7..b58cbcc 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,51 +1,51 @@ --- name: Test on: - workflow_call: - workflow_dispatch: - pull_request: - branches: - - '**' - push: - branches: - - main + workflow_call: + workflow_dispatch: + pull_request: + branches: + - "**" + push: + branches: + - main jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Install yamllint - run: pip install yamllint - - - name: Lint YAML files - run: yamllint -c yaml_lint_configuration.yaml . - unittests: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Setup kubectl - uses: azure/setup-kubectl@v3 - with: - version: v1.20.0 - - - name: Setup Helm - uses: azure/setup-helm@v1 - with: - version: v3.4.0 - - - uses: actions/setup-python@v4 - with: - python-version: '3.9' - check-latest: true - - - name: Set up chart-testing - uses: helm/chart-testing-action@v2.6.0 - - - name: Create kind cluster - uses: helm/kind-action@v1.7.0 - - - name: Upgrade and Test All Charts - run: ct install --all --target-branch ${{ github.event.repository.default_branch}} + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Install yamllint + run: pip install yamllint + + - name: Lint YAML files + run: yamllint -c yaml_lint_configuration.yaml . + unittests: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup kubectl + uses: azure/setup-kubectl@v3 + with: + version: v1.20.0 + + - name: Setup Helm + uses: azure/setup-helm@v1 + with: + version: v3.4.0 + + - uses: actions/setup-python@v4 + with: + python-version: "3.9" + check-latest: true + + - name: Set up chart-testing + uses: helm/chart-testing-action@v2.6.0 + + - name: Create kind cluster + uses: helm/kind-action@v1.7.0 + + - name: Upgrade and Test All Charts + run: ct install --all --target-branch ${{ github.event.repository.default_branch}} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 779bb98..988d8f6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,27 +1,21 @@ --- repos: - - repo: https://github.com/psf/black - rev: 23.3.0 - hooks: - - id: black - - repo: https://github.com/pycqa/flake8 - rev: 6.0.0 - hooks: - - id: flake8 - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 - hooks: - - id: pretty-format-json - args: [--autofix, --no-sort-keys] - exclude: .*valid.* - - repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt - rev: 0.2.3 - hooks: - - id: yamlfmt - args: [--width, '80'] - - repo: https://github.com/adrienverge/yamllint.git - rev: v1.32.0 - hooks: - - id: yamllint - args: [-d relaxed] - exclude: .*/templates + - repo: https://github.com/psf/black + rev: 23.3.0 + hooks: + - id: black + - repo: https://github.com/pycqa/flake8 + rev: 6.0.0 + hooks: + - id: flake8 + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: pretty-format-json + args: [--autofix, --no-sort-keys] + exclude: .*valid.* + - repo: https://github.com/pre-commit/mirrors-prettier + rev: v4.0.0-alpha.8 + hooks: + - id: prettier + types_or: [yaml] diff --git a/.vscode/settings.json b/.vscode/settings.json index 6b502cd..a42a8f7 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,8 +1,8 @@ { - "cSpell.words": [ - "ATSDR", - "CFPB", - "ISSO", - "cybersecurity" - ] -} \ No newline at end of file + "cSpell.words": [ + "ATSDR", + "CFPB", + "ISSO", + "cybersecurity" + ] +} diff --git a/charts/alerts/templates/deployment.yaml b/charts/alerts/templates/deployment.yaml index 789e66c..0fe34af 100644 --- a/charts/alerts/templates/deployment.yaml +++ b/charts/alerts/templates/deployment.yaml @@ -2,38 +2,38 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: '{{.Release.Name}}-{{.Values.appName}}' - labels: - app: {{.Values.appName}} + name: "{{.Release.Name}}-{{.Values.appName}}" + labels: + app: { { .Values.appName } } spec: - replicas: {{.Values.replicaCount}} - selector: - matchLabels: - app: {{.Values.appName}} - template: - metadata: - annotations: - labels: - app: {{.Values.appName}} - spec: - imagePullSecrets: - containers: - - name: {{.Chart.Name}} - image: ghcr.io/cdcgov/phdi/alerts:{{ .Values.image.tag }} - imagePullPolicy: {{.Values.image.pullPolicy}} - ports: - - name: {{.Chart.Name}} - containerPort: {{.Values.service.port}} - env: - - name: TEAMS_WEBHOOK_URL - valueFrom: - secretKeyRef: - name: '{{.Release.Name}}-{{.Values.secretName}}' - key: webhook-url - - name: COMMUNICATION_SERVICE_NAME - value: {{.Values.communicationServiceName}} - - name: SLACK_BOT_TOKEN - valueFrom: - secretKeyRef: - name: '{{.Release.Name}}-{{.Values.secretName}}' - key: slack-bot-token + replicas: { { .Values.replicaCount } } + selector: + matchLabels: + app: { { .Values.appName } } + template: + metadata: + annotations: + labels: + app: { { .Values.appName } } + spec: + imagePullSecrets: + containers: + - name: { { .Chart.Name } } + image: ghcr.io/cdcgov/phdi/alerts:{{ .Values.image.tag }} + imagePullPolicy: { { .Values.image.pullPolicy } } + ports: + - name: { { .Chart.Name } } + containerPort: { { .Values.service.port } } + env: + - name: TEAMS_WEBHOOK_URL + valueFrom: + secretKeyRef: + name: "{{.Release.Name}}-{{.Values.secretName}}" + key: webhook-url + - name: COMMUNICATION_SERVICE_NAME + value: { { .Values.communicationServiceName } } + - name: SLACK_BOT_TOKEN + valueFrom: + secretKeyRef: + name: "{{.Release.Name}}-{{.Values.secretName}}" + key: slack-bot-token diff --git a/charts/alerts/templates/secrets.yaml b/charts/alerts/templates/secrets.yaml index 86e99eb..d2803ad 100644 --- a/charts/alerts/templates/secrets.yaml +++ b/charts/alerts/templates/secrets.yaml @@ -4,5 +4,5 @@ metadata: name: "{{.Release.Name}}-{{.Values.secretName}}" type: Opaque stringData: - webhook-url: {{.Values.webhookUrl | quote}} - slack-bot-token: {{.Values.slackBotToken | quote}} + webhook-url: { { .Values.webhookUrl | quote } } + slack-bot-token: { { .Values.slackBotToken | quote } } diff --git a/charts/alerts/templates/service.yaml b/charts/alerts/templates/service.yaml index 7b2faf4..f140de5 100644 --- a/charts/alerts/templates/service.yaml +++ b/charts/alerts/templates/service.yaml @@ -5,8 +5,8 @@ metadata: spec: type: ClusterIP ports: - - port: {{.Values.service.port}} + - port: { { .Values.service.port } } targetPort: 8080 protocol: TCP selector: - app: {{.Values.appName}} + app: { { .Values.appName } } diff --git a/charts/alerts/templates/tests/test-connection.yaml b/charts/alerts/templates/tests/test-connection.yaml index f4f07d6..d917763 100644 --- a/charts/alerts/templates/tests/test-connection.yaml +++ b/charts/alerts/templates/tests/test-connection.yaml @@ -11,7 +11,6 @@ spec: - name: wget image: busybox command: ["wget"] - args: [ - "{{.Release.Name}}-{{.Values.serviceName}}:{{ .Values.service.port}}" - ] + args: + ["{{.Release.Name}}-{{.Values.serviceName}}:{{ .Values.service.port}}"] restartPolicy: Never diff --git a/charts/ecr-viewer/.helmignore b/charts/ecr-viewer/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/charts/ecr-viewer/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/ecr-viewer/Chart.yaml b/charts/ecr-viewer/Chart.yaml new file mode 100644 index 0000000..95da10a --- /dev/null +++ b/charts/ecr-viewer/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: ecr-viewer +description: A Helm chart for the DIBBs eCR Viewer +type: application +version: 0.1.0 +appVersion: "1.1.10" diff --git a/charts/ecr-viewer/templates/NOTES.txt b/charts/ecr-viewer/templates/NOTES.txt new file mode 100644 index 0000000..ddee59f --- /dev/null +++ b/charts/ecr-viewer/templates/NOTES.txt @@ -0,0 +1,22 @@ +1. Get the application URL by running these commands: +{{- if .Values.ingress.enabled }} +{{- range $host := .Values.ingress.hosts }} + {{- range .paths }} + http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} + {{- end }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "ecr-viewer.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "ecr-viewer.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "ecr-viewer.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + echo http://$SERVICE_IP:{{ .Values.service.port }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "ecr-viewer.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT +{{- end }} diff --git a/charts/ecr-viewer/templates/deployment.yaml b/charts/ecr-viewer/templates/deployment.yaml new file mode 100644 index 0000000..bdb9ee0 --- /dev/null +++ b/charts/ecr-viewer/templates/deployment.yaml @@ -0,0 +1,31 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: "{{ .Release.Name }}-{{.Values.appName}}" + labels: + app: { { .Values.appName } } +spec: + replicas: { { .Values.replicaCount } } + selector: + matchLabels: + app: { { .Values.appName } } + template: + metadata: + annotations: + labels: + app: { { .Values.appName } } + spec: + imagePullSecrets: + containers: + - name: { { .Chart.Name } } + image: ghcr.io/cdcgov/phdi/ecr-viewer:{{ .Values.image.tag }} + imagePullPolicy: { { .Values.image.pullPolicy } } + ports: + - name: { { .Chart.Name } } + containerPort: { { .Values.service.port } } + env: + - name: DATABASE_URL + valueFrom: + secretKeyRef: + name: "{{.Release.Name}}-{{.Values.secretName}}" + key: database-url diff --git a/charts/ecr-viewer/templates/secrets.yaml b/charts/ecr-viewer/templates/secrets.yaml new file mode 100644 index 0000000..84d2d05 --- /dev/null +++ b/charts/ecr-viewer/templates/secrets.yaml @@ -0,0 +1,8 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + name: "{{.Release.Name}}-{{.Values.secretName}}" +type: Opaque +stringData: + database-url: { { .Values.databaseUrl | quote: null }: null } diff --git a/charts/ecr-viewer/templates/service.yaml b/charts/ecr-viewer/templates/service.yaml new file mode 100644 index 0000000..6b91111 --- /dev/null +++ b/charts/ecr-viewer/templates/service.yaml @@ -0,0 +1,13 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: "{{.Release.Name}}-{{.Values.serviceName}}" +spec: + type: ClusterIP + ports: + - port: { { .Values.service.port: null }: null } + targetPort: 8080 + protocol: TCP + selector: + app: { { .Values.appName: null }: null } diff --git a/charts/ecr-viewer/templates/tests/test-connection.yaml b/charts/ecr-viewer/templates/tests/test-connection.yaml new file mode 100644 index 0000000..3dd3bdf --- /dev/null +++ b/charts/ecr-viewer/templates/tests/test-connection.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Pod +metadata: + name: "{{ include "ecr-viewer.fullname" . }}-test-connection" + labels: + {{- include "ecr-viewer.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": test +spec: + containers: + - name: wget + image: busybox + command: ['wget'] + args: ['{{ include "ecr-viewer.fullname" . }}:{{ .Values.service.port }}'] + restartPolicy: Never diff --git a/charts/ecr-viewer/values.yaml b/charts/ecr-viewer/values.yaml new file mode 100644 index 0000000..03bd2ce --- /dev/null +++ b/charts/ecr-viewer/values.yaml @@ -0,0 +1,18 @@ +replicaCount: 1 + +image: + repository: ghcr.io/cdcgov/phdi/ecr-viewer + pullPolicy: IfNotPresent + tag: "v1.1.10" + +service: + port: 8080 + +# Will not work as written. +# These will need to be replaced by the equivalent secret values +databaseUrl: "$database-connection-string" + +name: "ecr-viewer" +appName: "ecr-viewer-app" +secretName: "ecr-viewer-secrets" +serviceName: "ecr-viewer-service" diff --git a/charts/fhir-converter/templates/deployment.yaml b/charts/fhir-converter/templates/deployment.yaml index dc81298..30ef020 100644 --- a/charts/fhir-converter/templates/deployment.yaml +++ b/charts/fhir-converter/templates/deployment.yaml @@ -3,23 +3,23 @@ kind: Deployment metadata: name: "{{.Release.Name}}-{{.Values.appName}}" labels: - app: {{.Values.appName}} + app: { { .Values.appName } } spec: - replicas: {{.Values.replicaCount}} + replicas: { { .Values.replicaCount } } selector: matchLabels: - app: {{.Values.appName}} + app: { { .Values.appName } } template: metadata: annotations: labels: - app: {{.Values.appName}} + app: { { .Values.appName } } spec: imagePullSecrets: containers: - - name: {{.Chart.Name}} + - name: { { .Chart.Name } } image: ghcr.io/cdcgov/phdi/fhir-converter:{{ .Values.image.tag }} - imagePullPolicy: {{.Values.image.pullPolicy}} + imagePullPolicy: { { .Values.image.pullPolicy } } ports: - - name: {{.Chart.Name | trunc 14}} - containerPort: {{.Values.service.port}} + - name: { { .Chart.Name | trunc 14 } } + containerPort: { { .Values.service.port } } diff --git a/charts/fhir-converter/templates/service.yaml b/charts/fhir-converter/templates/service.yaml index 7b2faf4..f140de5 100644 --- a/charts/fhir-converter/templates/service.yaml +++ b/charts/fhir-converter/templates/service.yaml @@ -5,8 +5,8 @@ metadata: spec: type: ClusterIP ports: - - port: {{.Values.service.port}} + - port: { { .Values.service.port } } targetPort: 8080 protocol: TCP selector: - app: {{.Values.appName}} + app: { { .Values.appName } } diff --git a/charts/fhir-converter/templates/tests/test-connection.yaml b/charts/fhir-converter/templates/tests/test-connection.yaml index 9b939dd..d917763 100644 --- a/charts/fhir-converter/templates/tests/test-connection.yaml +++ b/charts/fhir-converter/templates/tests/test-connection.yaml @@ -11,5 +11,6 @@ spec: - name: wget image: busybox command: ["wget"] - args: ["{{.Release.Name}}-{{.Values.serviceName}}:{{ .Values.service.port}}"] + args: + ["{{.Release.Name}}-{{.Values.serviceName}}:{{ .Values.service.port}}"] restartPolicy: Never diff --git a/charts/fhir-converter/values.yaml b/charts/fhir-converter/values.yaml index e60d864..33cdd58 100644 --- a/charts/fhir-converter/values.yaml +++ b/charts/fhir-converter/values.yaml @@ -2,12 +2,12 @@ replicaCount: 1 image: - repository: ghcr.io/cdcgov/phdi/fhir-converter - pullPolicy: IfNotPresent - tag: v1.0.7 + repository: ghcr.io/cdcgov/phdi/fhir-converter + pullPolicy: IfNotPresent + tag: v1.0.7 service: - port: 8080 + port: 8080 name: fhir-converter appName: fhir-converter-app diff --git a/charts/ingestion/Chart.yaml b/charts/ingestion/Chart.yaml index 6747ff7..c08d4bd 100644 --- a/charts/ingestion/Chart.yaml +++ b/charts/ingestion/Chart.yaml @@ -1,7 +1,7 @@ --- apiVersion: v2 name: ingestion-chart -description: A Helm chart for Kubernetes +description: A Helm chart for the DIBBs ingestion service type: application version: 0.1.7 appVersion: 1.1.1 diff --git a/charts/ingestion/templates/deployment.yaml b/charts/ingestion/templates/deployment.yaml index 67ea5ca..fa8adc2 100644 --- a/charts/ingestion/templates/deployment.yaml +++ b/charts/ingestion/templates/deployment.yaml @@ -3,26 +3,26 @@ kind: Deployment metadata: name: "{{ .Release.Name }}-{{.Values.appName}}" labels: - app: {{.Values.appName}} + app: { { .Values.appName } } spec: - replicas: {{.Values.replicaCount}} + replicas: { { .Values.replicaCount } } selector: matchLabels: - app: {{.Values.appName}} + app: { { .Values.appName } } template: metadata: annotations: labels: - app: {{.Values.appName}} + app: { { .Values.appName } } spec: imagePullSecrets: containers: - - name: {{.Chart.Name}} + - name: { { .Chart.Name } } image: ghcr.io/cdcgov/phdi/ingestion:{{ .Values.image.tag }} - imagePullPolicy: {{.Values.image.pullPolicy}} + imagePullPolicy: { { .Values.image.pullPolicy } } ports: - - name: {{.Chart.Name}} - containerPort: {{.Values.service.port}} + - name: { { .Chart.Name } } + containerPort: { { .Values.service.port } } env: - name: SMARTY_AUTH_ID valueFrom: diff --git a/charts/ingestion/templates/secrets.yaml b/charts/ingestion/templates/secrets.yaml index bc305dd..16b5801 100644 --- a/charts/ingestion/templates/secrets.yaml +++ b/charts/ingestion/templates/secrets.yaml @@ -4,5 +4,5 @@ metadata: name: "{{.Release.Name}}-{{.Values.secretName}}" type: Opaque stringData: - auth-id: {{.Values.smartyAuthId | quote}} - token: {{.Values.smartyToken | quote}} + auth-id: { { .Values.smartyAuthId | quote } } + token: { { .Values.smartyToken | quote } } diff --git a/charts/ingestion/templates/service.yaml b/charts/ingestion/templates/service.yaml index 7b2faf4..f140de5 100644 --- a/charts/ingestion/templates/service.yaml +++ b/charts/ingestion/templates/service.yaml @@ -5,8 +5,8 @@ metadata: spec: type: ClusterIP ports: - - port: {{.Values.service.port}} + - port: { { .Values.service.port } } targetPort: 8080 protocol: TCP selector: - app: {{.Values.appName}} + app: { { .Values.appName } } diff --git a/charts/ingestion/templates/tests/test-connection.yaml b/charts/ingestion/templates/tests/test-connection.yaml index f4f07d6..d917763 100644 --- a/charts/ingestion/templates/tests/test-connection.yaml +++ b/charts/ingestion/templates/tests/test-connection.yaml @@ -11,7 +11,6 @@ spec: - name: wget image: busybox command: ["wget"] - args: [ - "{{.Release.Name}}-{{.Values.serviceName}}:{{ .Values.service.port}}" - ] + args: + ["{{.Release.Name}}-{{.Values.serviceName}}:{{ .Values.service.port}}"] restartPolicy: Never diff --git a/charts/ingress/templates/ingress.yaml b/charts/ingress/templates/ingress.yaml index 660c56d..53cddfe 100644 --- a/charts/ingress/templates/ingress.yaml +++ b/charts/ingress/templates/ingress.yaml @@ -2,73 +2,80 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: ingress - annotations: - kubernetes.io/ingress.class: azure/application-gateway - appgw.ingress.kubernetes.io/backend-path-prefix: / - cert-manager.io/cluster-issuer: letsencrypt-prod + name: ingress + annotations: + kubernetes.io/ingress.class: azure/application-gateway + appgw.ingress.kubernetes.io/backend-path-prefix: / + cert-manager.io/cluster-issuer: letsencrypt-prod spec: - tls: - - hosts: - - {{.Values.ingressHostname }} - secretName: phdi-playground-issuer-account-key - rules: - - host: {{.Values.ingressHostname }} - http: - paths: - - path: /ingestion/* - pathType: Prefix - backend: - service: - name: {{.Values.ingestionServiceName }} - port: - number: 8080 - - path: /alerts/* - pathType: Prefix - backend: - service: - name: {{.Values.alertsServiceName }} - port: - number: 8080 - - path: /fhir-converter/* - pathType: Prefix - backend: - service: - name: {{.Values.fhirConverterServiceName}} - port: - number: 8080 - - path: /message-parser/* - pathType: Prefix - backend: - service: - name: {{.Values.messageParserServiceName }} - port: - number: 8080 - - path: /record-linkage/* - pathType: Prefix - backend: - service: - name: {{.Values.recordLinkageServiceName }} - port: - number: 8080 - - path: /tabulation/* - pathType: Prefix - backend: - service: - name: {{.Values.tabulationServiceName }} - port: - number: 8080 - - path: /validation/* - pathType: Prefix - backend: - service: - name: {{.Values.validationServiceName }} - port: - number: 8080 - - path: /orchestration/* - pathType: Prefix - backend: - service: - name: {{.Values.orchestrationServiceName }} - port: - number: 8080 + tls: + - hosts: + - { { .Values.ingressHostname: null }: null } + secretName: phdi-playground-issuer-account-key + rules: + - host: { { .Values.ingressHostname: null }: null } + http: + paths: + - path: /ingestion/* + pathType: Prefix + backend: + service: + name: { { .Values.ingestionServiceName: null }: null } + port: + number: 8080 + - path: /alerts/* + pathType: Prefix + backend: + service: + name: { { .Values.alertsServiceName: null }: null } + port: + number: 8080 + - path: /fhir-converter/* + pathType: Prefix + backend: + service: + name: { { .Values.fhirConverterServiceName: null }: null } + port: + number: 8080 + - path: /message-parser/* + pathType: Prefix + backend: + service: + name: { { .Values.messageParserServiceName: null }: null } + port: + number: 8080 + - path: /record-linkage/* + pathType: Prefix + backend: + service: + name: { { .Values.recordLinkageServiceName: null }: null } + port: + number: 8080 + - path: /tabulation/* + pathType: Prefix + backend: + service: + name: { { .Values.tabulationServiceName: null }: null } + port: + number: 8080 + - path: /validation/* + pathType: Prefix + backend: + service: + name: { { .Values.validationServiceName: null }: null } + port: + number: 8080 + - path: /orchestration/* + pathType: Prefix + backend: + service: + name: { { .Values.orchestrationServiceName: null }: null } + port: + number: 8080 + - path: /ecr-viewer/* + pathType: Prefix + backend: + service: + name: { { .Values.ecrViewerServiceName: null }: null } + port: + number: 8080 diff --git a/charts/ingress/values.yaml b/charts/ingress/values.yaml index f0b1faa..cfc8e55 100644 --- a/charts/ingress/values.yaml +++ b/charts/ingress/values.yaml @@ -9,3 +9,4 @@ recordLinkageServiceName: record-linkage-service tabulationServiceName: tabulation-service validationServiceName: validation-service orchestrationServiceName: orchestration-service +ecrViewerServiceName: ecr-viewer-service diff --git a/charts/message-parser/templates/deployment.yaml b/charts/message-parser/templates/deployment.yaml index 2bbe553..5ff57d3 100644 --- a/charts/message-parser/templates/deployment.yaml +++ b/charts/message-parser/templates/deployment.yaml @@ -3,23 +3,23 @@ kind: Deployment metadata: name: "{{.Release.Name}}-{{.Values.appName}}" labels: - app: {{.Values.appName}} + app: { { .Values.appName } } spec: - replicas: {{.Values.replicaCount}} + replicas: { { .Values.replicaCount } } selector: matchLabels: - app: {{.Values.appName}} + app: { { .Values.appName } } template: metadata: annotations: labels: - app: {{.Values.appName}} + app: { { .Values.appName } } spec: imagePullSecrets: containers: - - name: {{.Chart.Name}} + - name: { { .Chart.Name } } image: ghcr.io/cdcgov/phdi/message-parser:{{ .Values.image.tag }} - imagePullPolicy: {{.Values.image.pullPolicy}} + imagePullPolicy: { { .Values.image.pullPolicy } } ports: - - name: {{.Chart.Name | trunc 14}} - containerPort: {{.Values.service.port}} + - name: { { .Chart.Name | trunc 14 } } + containerPort: { { .Values.service.port } } diff --git a/charts/message-parser/templates/service.yaml b/charts/message-parser/templates/service.yaml index e7786f3..bde7187 100644 --- a/charts/message-parser/templates/service.yaml +++ b/charts/message-parser/templates/service.yaml @@ -6,8 +6,8 @@ metadata: spec: type: ClusterIP ports: - - port: {{.Values.service.port}} + - port: { { .Values.service.port } } targetPort: 8080 protocol: TCP selector: - app: {{.Values.appName}} + app: { { .Values.appName } } diff --git a/charts/message-parser/templates/tests/test-connection.yaml b/charts/message-parser/templates/tests/test-connection.yaml index f4f07d6..d917763 100644 --- a/charts/message-parser/templates/tests/test-connection.yaml +++ b/charts/message-parser/templates/tests/test-connection.yaml @@ -11,7 +11,6 @@ spec: - name: wget image: busybox command: ["wget"] - args: [ - "{{.Release.Name}}-{{.Values.serviceName}}:{{ .Values.service.port}}" - ] + args: + ["{{.Release.Name}}-{{.Values.serviceName}}:{{ .Values.service.port}}"] restartPolicy: Never diff --git a/charts/orchestration/templates/deployment.yaml b/charts/orchestration/templates/deployment.yaml index ac50986..8cd2e86 100644 --- a/charts/orchestration/templates/deployment.yaml +++ b/charts/orchestration/templates/deployment.yaml @@ -6,7 +6,7 @@ metadata: labels: app: orchestration-app spec: - replicas: {{.Values.replicaCount}} + replicas: { { .Values.replicaCount } } selector: matchLabels: app: orchestration-app @@ -18,12 +18,12 @@ spec: spec: imagePullSecrets: containers: - - name: {{.Chart.Name}} + - name: { { .Chart.Name } } image: ghcr.io/cdcgov/phdi/orchestration:{{ .Values.image.tag }} - imagePullPolicy: {{.Values.image.pullPolicy}} + imagePullPolicy: { { .Values.image.pullPolicy } } ports: - - name: {{.Chart.Name | trunc 14}} - containerPort: {{.Values.service.port}} + - name: { { .Chart.Name | trunc 14 } } + containerPort: { { .Values.service.port } } env: - name: ALERTS_URL valueFrom: diff --git a/charts/orchestration/templates/secrets.yaml b/charts/orchestration/templates/secrets.yaml index b18ef95..56e603f 100644 --- a/charts/orchestration/templates/secrets.yaml +++ b/charts/orchestration/templates/secrets.yaml @@ -2,14 +2,14 @@ apiVersion: v1 kind: Secret metadata: - name: '{{.Release.Name}}-orchestration-secrets' + name: "{{.Release.Name}}-orchestration-secrets" type: Opaque stringData: - alerts-url: {{ .Values.alertsUrl | quote }} - fhir-converter-url: {{ .Values.fhirConverterUrl | quote }} - ingestion-url: {{ .Values.ingestionUrl | quote }} - ingress-url: {{ .Values.ingressUrl | quote }} - message-parser-url: {{ .Values.messageParserUrl | quote }} - record-linkage-url: {{ .Values.recordLinkageUrl | quote }} - tabulation-url: {{ .Values.tabulationUrl | quote }} - validation-url: {{ .Values.validationUrl | quote }} + alerts-url: { { .Values.alertsUrl | quote } } + fhir-converter-url: { { .Values.fhirConverterUrl | quote } } + ingestion-url: { { .Values.ingestionUrl | quote } } + ingress-url: { { .Values.ingressUrl | quote } } + message-parser-url: { { .Values.messageParserUrl | quote } } + record-linkage-url: { { .Values.recordLinkageUrl | quote } } + tabulation-url: { { .Values.tabulationUrl | quote } } + validation-url: { { .Values.validationUrl | quote } } diff --git a/charts/orchestration/templates/service.yaml b/charts/orchestration/templates/service.yaml index ba8ed3c..bde7187 100644 --- a/charts/orchestration/templates/service.yaml +++ b/charts/orchestration/templates/service.yaml @@ -2,12 +2,12 @@ apiVersion: v1 kind: Service metadata: - name: '{{.Release.Name}}-{{.Values.serviceName}}' + name: "{{.Release.Name}}-{{.Values.serviceName}}" spec: type: ClusterIP ports: - - port: {{.Values.service.port}} + - port: { { .Values.service.port } } targetPort: 8080 protocol: TCP selector: - app: {{.Values.appName}} + app: { { .Values.appName } } diff --git a/charts/orchestration/values.yaml b/charts/orchestration/values.yaml index 5a317e1..f60afd1 100644 --- a/charts/orchestration/values.yaml +++ b/charts/orchestration/values.yaml @@ -2,12 +2,12 @@ replicaCount: 1 image: - repository: ghcr.io/cdcgov/phdi/orchestration - pullPolicy: IfNotPresent - tag: v1.0.14 + repository: ghcr.io/cdcgov/phdi/orchestration + pullPolicy: IfNotPresent + tag: v1.0.14 service: - port: 8080 + port: 8080 name: "orchestration" appName: "orchestration-app" diff --git a/charts/record-linkage/templates/configmap.yaml b/charts/record-linkage/templates/configmap.yaml index 44021f2..2812e10 100644 --- a/charts/record-linkage/templates/configmap.yaml +++ b/charts/record-linkage/templates/configmap.yaml @@ -3,4 +3,4 @@ kind: ConfigMap metadata: name: record-linkage-configmap data: - version: "1" \ No newline at end of file + version: "1" diff --git a/charts/record-linkage/templates/deployment.yaml b/charts/record-linkage/templates/deployment.yaml index 39a99c6..ed1ae8d 100644 --- a/charts/record-linkage/templates/deployment.yaml +++ b/charts/record-linkage/templates/deployment.yaml @@ -2,24 +2,24 @@ apiVersion: apps/v1 kind: Deployment metadata: labels: - app: {{.Values.appName}} + app: { { .Values.appName } } name: "{{.Release.Name}}-{{.Values.appName}}" spec: - replicas: {{.Values.replicaCount}} + replicas: { { .Values.replicaCount } } selector: matchLabels: - app: {{.Values.appName}} + app: { { .Values.appName } } template: metadata: labels: - app: {{.Values.appName}} + app: { { .Values.appName } } spec: containers: - - name: {{.Chart.Name}} + - name: { { .Chart.Name } } image: "ghcr.io/cdcgov/phdi/record-linkage:{{.Values.image.tag}}" ports: - - name: {{.Chart.Name}} - containerPort: {{.Values.service.port}} + - name: { { .Chart.Name } } + containerPort: { { .Values.service.port } } env: - name: MPI_DB_TYPE valueFrom: diff --git a/charts/record-linkage/templates/secrets.yaml b/charts/record-linkage/templates/secrets.yaml index dded13b..dcd844f 100644 --- a/charts/record-linkage/templates/secrets.yaml +++ b/charts/record-linkage/templates/secrets.yaml @@ -4,11 +4,11 @@ metadata: name: "{{.Release.Name}}-mpi-secrets" type: Opaque stringData: - db_type: {{.Values.databaseType | quote}} - db_password: {{.Values.databasePassword | quote}} - db_name: {{.Values.databaseName | quote}} - db_host: {{.Values.databaseHost | quote}} - db_user: {{.Values.databaseUser | quote}} - db_port: {{.Values.databasePort | quote}} - patient_table: {{.Values.patientTable | quote}} - person_table: {{.Values.personTable | quote}} + db_type: { { .Values.databaseType | quote } } + db_password: { { .Values.databasePassword | quote } } + db_name: { { .Values.databaseName | quote } } + db_host: { { .Values.databaseHost | quote } } + db_user: { { .Values.databaseUser | quote } } + db_port: { { .Values.databasePort | quote } } + patient_table: { { .Values.patientTable | quote } } + person_table: { { .Values.personTable | quote } } diff --git a/charts/record-linkage/templates/service.yaml b/charts/record-linkage/templates/service.yaml index 7b2faf4..f140de5 100644 --- a/charts/record-linkage/templates/service.yaml +++ b/charts/record-linkage/templates/service.yaml @@ -5,8 +5,8 @@ metadata: spec: type: ClusterIP ports: - - port: {{.Values.service.port}} + - port: { { .Values.service.port } } targetPort: 8080 protocol: TCP selector: - app: {{.Values.appName}} + app: { { .Values.appName } } diff --git a/charts/record-linkage/templates/tests/test-connection.yaml b/charts/record-linkage/templates/tests/test-connection.yaml index f4f07d6..d917763 100644 --- a/charts/record-linkage/templates/tests/test-connection.yaml +++ b/charts/record-linkage/templates/tests/test-connection.yaml @@ -11,7 +11,6 @@ spec: - name: wget image: busybox command: ["wget"] - args: [ - "{{.Release.Name}}-{{.Values.serviceName}}:{{ .Values.service.port}}" - ] + args: + ["{{.Release.Name}}-{{.Values.serviceName}}:{{ .Values.service.port}}"] restartPolicy: Never diff --git a/charts/record-linkage/values.yaml b/charts/record-linkage/values.yaml index 496a61f..669debd 100644 --- a/charts/record-linkage/values.yaml +++ b/charts/record-linkage/values.yaml @@ -2,13 +2,13 @@ replicaCount: 1 image: - repository: nginx - pullPolicy: IfNotPresent + repository: nginx + pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. - tag: v1.0.9 + tag: v1.0.9 service: - port: 80 + port: 80 # Will not work as written. # These will need to be replaced by the equivalent Azure Key Vault values @@ -17,7 +17,7 @@ databasePassword: $password databaseName: $dbName databaseHost: $fqdn databaseUser: postgres -databasePort: '5432' +databasePort: "5432" patientTable: patient personTable: person diff --git a/charts/tabulation/templates/deployment.yaml b/charts/tabulation/templates/deployment.yaml index 4637af9..83d6490 100644 --- a/charts/tabulation/templates/deployment.yaml +++ b/charts/tabulation/templates/deployment.yaml @@ -3,28 +3,28 @@ kind: Deployment metadata: name: "{{.Release.Name}}-{{.Values.appName}}" labels: - app: {{.Values.appName}} + app: { { .Values.appName } } spec: - replicas: {{.Values.replicaCount}} + replicas: { { .Values.replicaCount } } selector: matchLabels: - app: {{.Values.appName}} + app: { { .Values.appName } } template: metadata: annotations: labels: - app: {{.Values.appName}} + app: { { .Values.appName } } spec: imagePullSecrets: containers: - - name: {{.Chart.Name}} + - name: { { .Chart.Name } } image: ghcr.io/cdcgov/phdi/tabulation:{{ .Values.image.tag }} - imagePullPolicy: {{.Values.image.pullPolicy}} + imagePullPolicy: { { .Values.image.pullPolicy } } ports: - - name: {{.Chart.Name | trunc 15}} - containerPort: {{.Values.service.port}} + - name: { { .Chart.Name | trunc 15 } } + containerPort: { { .Values.service.port } } env: - name: fhir_url - value: {{.Values.fhirUrl}} + value: { { .Values.fhirUrl } } - name: cred_manager - value: {{.Values.credManager}} + value: { { .Values.credManager } } diff --git a/charts/tabulation/templates/service.yaml b/charts/tabulation/templates/service.yaml index e7786f3..bde7187 100644 --- a/charts/tabulation/templates/service.yaml +++ b/charts/tabulation/templates/service.yaml @@ -6,8 +6,8 @@ metadata: spec: type: ClusterIP ports: - - port: {{.Values.service.port}} + - port: { { .Values.service.port } } targetPort: 8080 protocol: TCP selector: - app: {{.Values.appName}} + app: { { .Values.appName } } diff --git a/charts/tabulation/templates/tests/test-connection.yaml b/charts/tabulation/templates/tests/test-connection.yaml index f4f07d6..d917763 100644 --- a/charts/tabulation/templates/tests/test-connection.yaml +++ b/charts/tabulation/templates/tests/test-connection.yaml @@ -11,7 +11,6 @@ spec: - name: wget image: busybox command: ["wget"] - args: [ - "{{.Release.Name}}-{{.Values.serviceName}}:{{ .Values.service.port}}" - ] + args: + ["{{.Release.Name}}-{{.Values.serviceName}}:{{ .Values.service.port}}"] restartPolicy: Never diff --git a/charts/validation/templates/deployment.yaml b/charts/validation/templates/deployment.yaml index fcd3d0f..188aee2 100644 --- a/charts/validation/templates/deployment.yaml +++ b/charts/validation/templates/deployment.yaml @@ -3,23 +3,23 @@ kind: Deployment metadata: name: "{{.Release.Name}}-{{.Values.appName}}" labels: - app: {{.Values.appName}} + app: { { .Values.appName } } spec: - replicas: {{.Values.replicaCount}} + replicas: { { .Values.replicaCount } } selector: matchLabels: - app: {{.Values.appName}} + app: { { .Values.appName } } template: metadata: annotations: labels: - app: {{.Values.appName}} + app: { { .Values.appName } } spec: imagePullSecrets: containers: - - name: {{.Chart.Name}} + - name: { { .Chart.Name } } image: "{{.Values.image.repository}}:{{.Values.image.tag | default .Chart.AppVersion}}" - imagePullPolicy: {{.Values.image.pullPolicy}} + imagePullPolicy: { { .Values.image.pullPolicy } } ports: - - name: {{.Chart.Name | trunc 15}} - containerPort: {{.Values.service.port}} + - name: { { .Chart.Name | trunc 15 } } + containerPort: { { .Values.service.port } } diff --git a/charts/validation/templates/service.yaml b/charts/validation/templates/service.yaml index e7786f3..bde7187 100644 --- a/charts/validation/templates/service.yaml +++ b/charts/validation/templates/service.yaml @@ -6,8 +6,8 @@ metadata: spec: type: ClusterIP ports: - - port: {{.Values.service.port}} + - port: { { .Values.service.port } } targetPort: 8080 protocol: TCP selector: - app: {{.Values.appName}} + app: { { .Values.appName } } diff --git a/charts/validation/templates/tests/test-connection.yaml b/charts/validation/templates/tests/test-connection.yaml index f4f07d6..d917763 100644 --- a/charts/validation/templates/tests/test-connection.yaml +++ b/charts/validation/templates/tests/test-connection.yaml @@ -11,7 +11,6 @@ spec: - name: wget image: busybox command: ["wget"] - args: [ - "{{.Release.Name}}-{{.Values.serviceName}}:{{ .Values.service.port}}" - ] + args: + ["{{.Release.Name}}-{{.Values.serviceName}}:{{ .Values.service.port}}"] restartPolicy: Never diff --git a/charts/validation/values.yaml b/charts/validation/values.yaml index 31dd4b3..b5ddb64 100644 --- a/charts/validation/values.yaml +++ b/charts/validation/values.yaml @@ -1,5 +1,4 @@ --- - # Default values for validation. # This is a YAML-formatted file. # Declare variables to be passed into your templates. diff --git a/yaml_lint_configuration.yaml b/yaml_lint_configuration.yaml index 8106526..0480be5 100644 --- a/yaml_lint_configuration.yaml +++ b/yaml_lint_configuration.yaml @@ -2,4 +2,4 @@ extends: relaxed ignore: - - templates/ + - templates/