From b6b664f8f123ac70b8e3bcdf1cb8129d495f9f1e Mon Sep 17 00:00:00 2001 From: bennsimon Date: Wed, 9 Nov 2022 16:12:52 +0300 Subject: [PATCH] spotless apply --- charts/fhir-access-proxy/Chart.yaml | 16 ++++++ charts/fhir-access-proxy/README.md | 56 ++++++++++++------- .../templates/configmap.yaml | 16 ++++++ .../templates/deployment.yaml | 16 ++++++ charts/fhir-access-proxy/templates/hpa.yaml | 16 ++++++ .../fhir-access-proxy/templates/ingress.yaml | 16 ++++++ charts/fhir-access-proxy/templates/pdb.yaml | 16 ++++++ .../fhir-access-proxy/templates/service.yaml | 16 ++++++ .../templates/serviceaccount.yaml | 16 ++++++ .../templates/tests/test-connection.yaml | 16 ++++++ charts/fhir-access-proxy/templates/vpa.yaml | 16 ++++++ charts/fhir-access-proxy/values.yaml | 16 ++++++ ct.yaml | 16 ++++++ 13 files changed, 228 insertions(+), 20 deletions(-) diff --git a/charts/fhir-access-proxy/Chart.yaml b/charts/fhir-access-proxy/Chart.yaml index 0839f063..0e42b891 100644 --- a/charts/fhir-access-proxy/Chart.yaml +++ b/charts/fhir-access-proxy/Chart.yaml @@ -1,3 +1,19 @@ +# +# Copyright 2021-2022 Google LLC +# +# 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: fhir-access-proxy description: | diff --git a/charts/fhir-access-proxy/README.md b/charts/fhir-access-proxy/README.md index 685d0c08..037aa632 100644 --- a/charts/fhir-access-proxy/README.md +++ b/charts/fhir-access-proxy/README.md @@ -1,6 +1,7 @@ # FHIR Access Proxy -[FHIR Access Proxy](../../README.md) is a simple access-control proxy that sits in front of FHIR store and server and controls access to FHIR resources. +[FHIR Access Proxy](../../README.md) is a simple access-control proxy that sits +in front of FHIR store and server and controls access to FHIR resources. ## TL;DR @@ -11,12 +12,14 @@ helm install fhir-access-proxy fhir-access-proxy/opensrp-fhir-access-proxy ## Introduction -This chart bootstraps [fhir access proxy](../../README.md) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. +This chart bootstraps [fhir access proxy](../../README.md) deployment on a +[Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) +package manager. ## Prerequisites -* Kubernetes 1.12+ -* Helm 3.1.0 +- Kubernetes 1.12+ +- Helm 3.1.0 ## Installing the Chart @@ -35,16 +38,18 @@ To uninstall/delete the `fhir-access-proxy` deployment: helm delete fhir-access-proxy ``` -The command removes all the Kubernetes components associated with the chart and deletes the release. +The command removes all the Kubernetes components associated with the chart and +deletes the release. ## Parameters -The following table lists the configurable parameters of the fhir access proxy chart and their default values. +The following table lists the configurable parameters of the fhir access proxy +chart and their default values. ## Common Parameters | Parameter | Description | Default | -|----------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| -------------------------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `replicaCount` | | `1` | | `image.repository` | | `"opensrp/fhir-access-proxy"` | | `image.pullPolicy` | | `"IfNotPresent"` | @@ -74,9 +79,9 @@ The following table lists the configurable parameters of the fhir access proxy c | `tolerations` | | `[]` | | `affinity` | | `{}` | | `recreatePodsWhenConfigMapChange` | | `true` | -| `livenessProbe.httpGet.path` | | `"/"` | +| `livenessProbe.httpGet.path` | | `"/.well-known/smart-configuration"` | | `livenessProbe.httpGet.port` | | `"http"` | -| `readinessProbe.httpGet.path` | | `"/"` | +| `readinessProbe.httpGet.path` | | `"/.well-known/smart-configuration"` | | `readinessProbe.httpGet.port` | | `"http"` | | `initContainers` | | `null` | | `volumes` | | `null` | @@ -94,11 +99,15 @@ The following table lists the configurable parameters of the fhir access proxy c To update config file on the pod with new changes one has to do the following: -(Will be showcasing an example of overriding the [hapi\_page\_url\_allowed\_queries.json](../../resources/hapi\_page\_url\_allowed\_queries.json) file). +(Will be showcasing an example of overriding the +[hapi_page_url_allowed_queries.json](../../resources/hapi_page_url_allowed_queries.json) +file). 1. Create a configmap entry, like below: - * The `.Values.configMaps.name` should be unique per entry. - * Ensure indentation of the content is okay. + + - The `.Values.configMaps.name` should be unique per entry. + - Ensure indentation of the content is okay. + ```yaml configMaps: - name: hapi_page_url_allowed_queries.json @@ -119,18 +128,25 @@ To update config file on the pod with new changes one has to do the following: ``` 2. Create a configmap volume type: - * The name of the configMap resemble the ConfigMap manifest metadata.name i.e. `fhir-access-proxy` but we obtain the generated name from the function `'{{ include "fhir-access-proxy.fullname" . }}'` using tpl function. + + - The name of the configMap resemble the ConfigMap manifest metadata.name + i.e. `fhir-access-proxy` but we obtain the generated name from the + function `'{{ include "fhir-access-proxy.fullname" . }}'` using tpl + function. + ```yaml volumes: - - name: hapi-page-url-allowed-queries - configMap: - name: '{{ include "fhir-access-proxy.fullname" . }}' + - name: hapi-page-url-allowed-queries + configMap: + name: '{{ include "fhir-access-proxy.fullname" . }}' ``` 3. Mount the Configmap volume: - * mountPath is the location of the file in the pod. - * name is the name of the volume in point 2 above. - * subPath is the name of the configMap used in point 1 above. + + - mountPath is the location of the file in the pod. + - name is the name of the volume in point 2 above. + - subPath is the name of the configMap used in point 1 above. + ```yaml volumeMounts: - mountPath: /app/resources/hapi_page_url_allowed_queries.json @@ -139,7 +155,7 @@ To update config file on the pod with new changes one has to do the following: ``` 4. Deploy. - * To confirm it has picked the new changes you can check the file by: + - To confirm it has picked the new changes you can check the file by: ```shell kubectl exec -it -- cat resources/hapi_page_url_allowed_queries.json ``` diff --git a/charts/fhir-access-proxy/templates/configmap.yaml b/charts/fhir-access-proxy/templates/configmap.yaml index 802e2c26..b1338c44 100644 --- a/charts/fhir-access-proxy/templates/configmap.yaml +++ b/charts/fhir-access-proxy/templates/configmap.yaml @@ -1,3 +1,19 @@ +# +# Copyright 2021-2022 Google LLC +# +# 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. +# + {{ $scope := .}} apiVersion: v1 kind: ConfigMap diff --git a/charts/fhir-access-proxy/templates/deployment.yaml b/charts/fhir-access-proxy/templates/deployment.yaml index 6869ec8b..792b64b0 100644 --- a/charts/fhir-access-proxy/templates/deployment.yaml +++ b/charts/fhir-access-proxy/templates/deployment.yaml @@ -1,3 +1,19 @@ +# +# Copyright 2021-2022 Google LLC +# +# 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: diff --git a/charts/fhir-access-proxy/templates/hpa.yaml b/charts/fhir-access-proxy/templates/hpa.yaml index 81e2f9f9..3b4685c9 100644 --- a/charts/fhir-access-proxy/templates/hpa.yaml +++ b/charts/fhir-access-proxy/templates/hpa.yaml @@ -1,3 +1,19 @@ +# +# Copyright 2021-2022 Google LLC +# +# 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. +# + {{- if .Values.autoscaling.enabled }} apiVersion: autoscaling/v2beta1 kind: HorizontalPodAutoscaler diff --git a/charts/fhir-access-proxy/templates/ingress.yaml b/charts/fhir-access-proxy/templates/ingress.yaml index bba93989..eaa2abbb 100644 --- a/charts/fhir-access-proxy/templates/ingress.yaml +++ b/charts/fhir-access-proxy/templates/ingress.yaml @@ -1,3 +1,19 @@ +# +# Copyright 2021-2022 Google LLC +# +# 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. +# + {{- if .Values.ingress.enabled -}} {{- $fullName := include "fhir-access-proxy.fullname" . -}} {{- $svcPort := .Values.service.port -}} diff --git a/charts/fhir-access-proxy/templates/pdb.yaml b/charts/fhir-access-proxy/templates/pdb.yaml index bc7b3bdd..84fee775 100644 --- a/charts/fhir-access-proxy/templates/pdb.yaml +++ b/charts/fhir-access-proxy/templates/pdb.yaml @@ -1,3 +1,19 @@ +# +# Copyright 2021-2022 Google LLC +# +# 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. +# + {{- if .Values.pdb.enabled }} {{- if semverCompare "<1.21-0" .Capabilities.KubeVersion.GitVersion -}} apiVersion: "policy/v1beta1" diff --git a/charts/fhir-access-proxy/templates/service.yaml b/charts/fhir-access-proxy/templates/service.yaml index 9490515f..e05420ad 100644 --- a/charts/fhir-access-proxy/templates/service.yaml +++ b/charts/fhir-access-proxy/templates/service.yaml @@ -1,3 +1,19 @@ +# +# Copyright 2021-2022 Google LLC +# +# 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: v1 kind: Service metadata: diff --git a/charts/fhir-access-proxy/templates/serviceaccount.yaml b/charts/fhir-access-proxy/templates/serviceaccount.yaml index 4ae09700..683b7f93 100644 --- a/charts/fhir-access-proxy/templates/serviceaccount.yaml +++ b/charts/fhir-access-proxy/templates/serviceaccount.yaml @@ -1,3 +1,19 @@ +# +# Copyright 2021-2022 Google LLC +# +# 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. +# + {{- if .Values.serviceAccount.create -}} apiVersion: v1 kind: ServiceAccount diff --git a/charts/fhir-access-proxy/templates/tests/test-connection.yaml b/charts/fhir-access-proxy/templates/tests/test-connection.yaml index 3a1d7790..9c4373b8 100644 --- a/charts/fhir-access-proxy/templates/tests/test-connection.yaml +++ b/charts/fhir-access-proxy/templates/tests/test-connection.yaml @@ -1,3 +1,19 @@ +# +# Copyright 2021-2022 Google LLC +# +# 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: v1 kind: Pod metadata: diff --git a/charts/fhir-access-proxy/templates/vpa.yaml b/charts/fhir-access-proxy/templates/vpa.yaml index 3e5a60ed..153c548c 100644 --- a/charts/fhir-access-proxy/templates/vpa.yaml +++ b/charts/fhir-access-proxy/templates/vpa.yaml @@ -1,3 +1,19 @@ +# +# Copyright 2021-2022 Google LLC +# +# 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. +# + {{- if .Values.vpa.enabled }} apiVersion: "autoscaling.k8s.io/v1" kind: VerticalPodAutoscaler diff --git a/charts/fhir-access-proxy/values.yaml b/charts/fhir-access-proxy/values.yaml index c9a6c00b..2f45fdab 100644 --- a/charts/fhir-access-proxy/values.yaml +++ b/charts/fhir-access-proxy/values.yaml @@ -1,3 +1,19 @@ +# +# Copyright 2021-2022 Google LLC +# +# 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. +# + # Default values for fhir-access-proxy. # This is a YAML-formatted file. # Declare variables to be passed into your templates. diff --git a/ct.yaml b/ct.yaml index 5f99c234..14ace63d 100644 --- a/ct.yaml +++ b/ct.yaml @@ -1,3 +1,19 @@ +# +# Copyright 2021-2022 Google LLC +# +# 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. +# + # See https://github.com/helm/chart-testing#configuration remote: origin target-branch: main