diff --git a/charts/radar-oura-connector/.helmignore b/charts/radar-oura-connector/.helmignore new file mode 100644 index 00000000..50af0317 --- /dev/null +++ b/charts/radar-oura-connector/.helmignore @@ -0,0 +1,22 @@ +# 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 +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/radar-oura-connector/Chart.yaml b/charts/radar-oura-connector/Chart.yaml new file mode 100644 index 00000000..a9ae2b24 --- /dev/null +++ b/charts/radar-oura-connector/Chart.yaml @@ -0,0 +1,27 @@ +apiVersion: v2 +appVersion: "0.5.0" +description: A Helm chart for RADAR-base oura connector. This application collects data from participants via the Oura Web API. +name: radar-oura-connector +version: 0.0.1 +icon: "http://radar-base.org/wp-content/uploads/2022/09/Logo_RADAR-Base-RGB.png" +sources: +- https://github.com/RADAR-base/radar-helm-charts/tree/main/charts/radar-oura-connector +- https://github.com/RADAR-base/RADAR-REST-Connector +keywords: + - radar-base + - remote-trial +annotations: + artifacthub.io/license: Apache-2.0 +deprecated: false +type: application +home: "https://radar-base.org" +maintainers: + - email: keyvan@thehyve.nl + name: Keyvan Hedayati + url: https://www.thehyve.nl + - email: pauline.conde@kcl.ac.uk + name: Pauline Conde + url: https://www.kcl.ac.uk/people/pauline-conde + - email: yatharth.ranjan@kcl.ac.uk + name: Yatharth Ranjan + url: https://www.kcl.ac.uk/people/yatharth-ranjan diff --git a/charts/radar-oura-connector/DOCS.md.gotmpl b/charts/radar-oura-connector/DOCS.md.gotmpl new file mode 100644 index 00000000..e69de29b diff --git a/charts/radar-oura-connector/README.md b/charts/radar-oura-connector/README.md new file mode 100644 index 00000000..5d4536ed --- /dev/null +++ b/charts/radar-oura-connector/README.md @@ -0,0 +1,84 @@ + + +# radar-oura-connector +[![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/radar-oura-connector)](https://artifacthub.io/packages/helm/radar-base/radar-oura-connector) + +![Version: 0.0.1](https://img.shields.io/badge/Version-0.0.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.5.0](https://img.shields.io/badge/AppVersion-0.5.0-informational?style=flat-square) + +A Helm chart for RADAR-base oura connector. This application collects data from participants via the Oura Web API. + +**Homepage:** + +## Maintainers + +| Name | Email | Url | +| ---- | ------ | --- | +| Keyvan Hedayati | | | +| Pauline Conde | | | +| Yatharth Ranjan | | | + +## Source Code + +* +* + +## Prerequisites +* Kubernetes 1.22+ +* Kubectl 1.22+ +* Helm 3.1.0+ +* PV provisioner support in the underlying infrastructure + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| replicaCount | int | `1` | Number of radar-oura-connector replicas to deploy | +| image.repository | string | `"radarbase/kafka-connect-rest-oura-source"` | radar-oura-connector image repository | +| image.tag | string | `"0.5.0"` | radar-oura-connector image tag (immutable tags are recommended) Overrides the image tag whose default is the chart appVersion. | +| image.pullPolicy | string | `"IfNotPresent"` | radar-oura-connector image pull policy | +| imagePullSecrets | list | `[]` | Docker registry secret names as an array | +| nameOverride | string | `""` | String to partially override radar-oura-connector.fullname template with a string (will prepend the release name) | +| fullnameOverride | string | `""` | String to fully override radar-oura-connector.fullname template with a string | +| podSecurityContext | object | `{}` | Configure radar-oura-connector pods' Security Context | +| securityContext | object | `{}` | Configure radar-oura-connector containers' Security Context | +| service.type | string | `"ClusterIP"` | Kubernetes Service type | +| service.port | int | `8083` | radar-oura-connector port | +| resources.requests | object | `{"cpu":"100m","memory":"1Gi"}` | CPU/Memory resource requests | +| persistence.enabled | bool | `true` | Enable persistence using PVC | +| persistence.accessMode | string | `"ReadWriteOnce"` | PVC Access Mode for radar-oura-connector volume | +| persistence.size | string | `"5Gi"` | PVC Storage Request for radar-oura-connector volume | +| persistence.fsUserOverride | string | `nil` | Overrides the user of the oura connector logs, for example, `"1000:1000"`. | +| nodeSelector | object | `{}` | Node labels for pod assignment | +| tolerations | list | `[]` | Toleration labels for pod assignment | +| affinity | object | `{}` | Affinity labels for pod assignment | +| extraEnvVars | list | `[{"name":"CONNECT_SECURITY_PROTOCOL","value":"PLAINTEXT"}]` | Extra environment variables | +| extraEnvVars[0] | object | `{"name":"CONNECT_SECURITY_PROTOCOL","value":"PLAINTEXT"}` | Protocol used to communicate with brokers. Valid values are: PLAINTEXT, SSL, SASL_PLAINTEXT, SASL_SSL. | +| customLivenessProbe | object | `{}` | Custom livenessProbe that overrides the default one | +| livenessProbe.enabled | bool | `true` | Enable livenessProbe | +| livenessProbe.initialDelaySeconds | int | `5` | Initial delay seconds for livenessProbe | +| livenessProbe.periodSeconds | int | `60` | Period seconds for livenessProbe | +| livenessProbe.timeoutSeconds | int | `5` | Timeout seconds for livenessProbe | +| livenessProbe.successThreshold | int | `1` | Success threshold for livenessProbe | +| livenessProbe.failureThreshold | int | `3` | Failure threshold for livenessProbe | +| customReadinessProbe | object | `{}` | Custom readinessProbe that overrides the default one | +| readinessProbe.enabled | bool | `true` | Enable readinessProbe | +| readinessProbe.initialDelaySeconds | int | `5` | Initial delay seconds for readinessProbe | +| readinessProbe.periodSeconds | int | `60` | Period seconds for readinessProbe | +| readinessProbe.timeoutSeconds | int | `5` | Timeout seconds for readinessProbe | +| readinessProbe.successThreshold | int | `1` | Success threshold for readinessProbe | +| readinessProbe.failureThreshold | int | `3` | Failure threshold for readinessProbe | +| networkpolicy | object | check `values.yaml` | Network policy defines who can access this application and who this applications has access to | +| zookeeper | string | `"cp-zookeeper-headless:2181"` | URI of Zookeeper instances of the cluster | +| kafka | string | `"PLAINTEXT://cp-kafka-headless:9092"` | URI of Kafka brokers of the cluster | +| kafka_num_brokers | string | `"3"` | Number of Kafka brokers. This is used to validate the cluster availability at connector init. | +| schema_registry | string | `"http://cp-schema-registry:8081"` | URL of the Kafka schema registry | +| kafka_wait.enabled | bool | `true` | Whether to wait before the specified number of brokers are available. | +| kafka_wait.properties | string | `""` | Kafka connection properties file contents during wait. If empty, all environment variables starting with `CONNECT_` will be used. | +| radar_rest_sources_backend_url | string | `"http://radar-rest-sources-backend:8080/rest-sources/backend/"` | Base URL of the rest-sources-authorizer-backend service | +| connector_num_tasks | string | `"5"` | Number of connector tasks to be used in connector.properties | +| oura_api_client | string | `""` | Oura API client id. | +| oura_api_secret | string | `""` | Oura API client secret. | +| oauthClientId | string | `"radar_oura_connector"` | OAuth2 client id from Management Portal | +| oauthClientSecret | string | `"secret"` | OAuth2 client secret from Management Portal | +| managementportal_url | string | `"http://management-portal:8080/managementportal"` | URL of Management Portal. This will be used to create URLs to access Management Portal | +| includeIntradayData | bool | `true` | Set to true, if intraday access data should be collected by the connector. This will be set in connector.properties. | diff --git a/charts/radar-oura-connector/README.md.gotmpl b/charts/radar-oura-connector/README.md.gotmpl new file mode 100644 index 00000000..929d551e --- /dev/null +++ b/charts/radar-oura-connector/README.md.gotmpl @@ -0,0 +1,18 @@ +{{ template "common.header" . }} +{{ template "chart.deprecationWarning" . }} + +{{ template "chart.badgesSection" . }} + +{{ template "chart.description" . }} + +{{ template "chart.homepageLine" . }} + +{{ template "chart.maintainersSection" . }} + +{{ template "chart.sourcesSection" . }} + +{{ template "common.prerequisiteswithpv" . }} + +{{ template "chart.requirementsSection" . }} + +{{ template "chart.valuesSection" . }} diff --git a/charts/radar-oura-connector/templates/NOTES.txt b/charts/radar-oura-connector/templates/NOTES.txt new file mode 100644 index 00000000..e69de29b diff --git a/charts/radar-oura-connector/templates/_helpers.tpl b/charts/radar-oura-connector/templates/_helpers.tpl new file mode 100644 index 00000000..704344ee --- /dev/null +++ b/charts/radar-oura-connector/templates/_helpers.tpl @@ -0,0 +1,52 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "radar-oura-connector.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "radar-oura-connector.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "radar-oura-connector.labels" -}} +helm.sh/chart: {{ include "radar-oura-connector.chart" . }} +{{ include "radar-oura-connector.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "radar-oura-connector.selectorLabels" -}} +app.kubernetes.io/name: {{ include "radar-oura-connector.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "radar-oura-connector.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/charts/radar-oura-connector/templates/configmap-properties.yaml b/charts/radar-oura-connector/templates/configmap-properties.yaml new file mode 100644 index 00000000..673161ae --- /dev/null +++ b/charts/radar-oura-connector/templates/configmap-properties.yaml @@ -0,0 +1,25 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "radar-oura-connector.fullname" . }}-properties + labels: +{{ include "radar-oura-connector.labels" . | indent 4 }} +data: + source-oura.properties: | + name=radar-oura-source + connector.class=org.radarbase.connect.rest.oura.OuraSourceConnector + tasks.max={{ .Values.connector_num_tasks }} + rest.source.base.url=https://api.ouraring.com + rest.source.poll.interval.ms=5000 + oura.api.client={{ .Values.oura_api_client }} + oura.api.secret={{ .Values.oura_api_secret }} + oura.api.intraday={{ .Values.includeIntradayData }} + oura.user.repository.class=org.radarbase.connect.rest.oura.user.OuraServiceUserRepository + oura.user.repository.url={{ .Values.radar_rest_sources_backend_url }} + oura.user.repository.client.id={{ .Values.oauthClientId }} + oura.user.repository.client.secret={{ .Values.oauthClientSecret }} + oura.user.repository.oauth2.token.url={{ .Values.managementportal_url }}/oauth/token + {{- if and .Values.kafka_wait.enabled .Values.kafka_wait.properties }} + kafka-wait.properties: | + {{ .Values.kafka_wait.properties | indent 4 }} + {{- end }} diff --git a/charts/radar-oura-connector/templates/deployment.yaml b/charts/radar-oura-connector/templates/deployment.yaml new file mode 100644 index 00000000..8b2080ea --- /dev/null +++ b/charts/radar-oura-connector/templates/deployment.yaml @@ -0,0 +1,178 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "radar-oura-connector.fullname" . }} + labels: +{{ include "radar-oura-connector.labels" . | indent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app.kubernetes.io/name: {{ include "radar-oura-connector.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + strategy: + rollingUpdate: + maxUnavailable: 100% + template: + metadata: + annotations: + checksum/configmap-properties: {{ include (print $.Template.BasePath "/configmap-properties.yaml") . | sha256sum }} + backup.velero.io/backup-volumes: logs + labels: + app.kubernetes.io/name: {{ include "radar-oura-connector.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 1 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: "app.kubernetes.io/name" + operator: In + values: + - {{ template "radar-oura-connector.name" . }} + - key: "app.kubernetes.io/instance" + operator: In + values: + - {{ .Release.Name }} + topologyKey: "kubernetes.io/hostname" + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + - name: CONNECT_BOOTSTRAP_SERVERS + value: "{{ .Values.kafka }}" + - name: CONNECT_REST_PORT + value: "8083" + - name: CONNECT_GROUP_ID + value: "default" + - name: CONNECT_CONFIG_STORAGE_TOPIC + value: "default.config" + - name: CONNECT_OFFSET_STORAGE_TOPIC + value: "default.offsets" + - name: CONNECT_STATUS_STORAGE_TOPIC + value: "default.status" + - name: CONNECT_KEY_CONVERTER + value: "io.confluent.connect.avro.AvroConverter" + - name: CONNECT_VALUE_CONVERTER + value: "io.confluent.connect.avro.AvroConverter" + - name: CONNECT_KEY_CONVERTER_SCHEMA_REGISTRY_URL + value: "{{ .Values.schema_registry }}" + - name: CONNECT_VALUE_CONVERTER_SCHEMA_REGISTRY_URL + value: "{{ .Values.schema_registry }}" + - name: CONNECT_INTERNAL_KEY_CONVERTER + value: "org.apache.kafka.connect.json.JsonConverter" + - name: CONNECT_INTERNAL_VALUE_CONVERTER + value: "org.apache.kafka.connect.json.JsonConverter" + - name: CONNECT_OFFSET_STORAGE_FILE_FILENAME + value: "/var/lib/kafka-connect-oura-source/logs/connect.offsets" + - name: CONNECT_REST_ADVERTISED_HOST_NAME + value: {{ include "radar-oura-connector.fullname" . }} + - name: CONNECT_ZOOKEEPER_CONNECT + value: "{{ .Values.zookeeper }}" + - name: CONNECTOR_PROPERTY_FILE_PREFIX + value: "source-oura/source-oura" + - name: KAFKA_HEAP_OPTS + value: "-Xms256m -Xmx768m" + - name: KAFKA_BROKERS + value: "{{ .Values.kafka_num_brokers }}" + - name: CONNECT_LOG4J_LOGGERS + value: "org.reflections=ERROR" + - name: WAIT_FOR_KAFKA + value: {{ if .Values.kafka_wait.enabled }}1{{ else }}0{{ end }} + {{- if and .Values.kafka_wait.enabled .Values.kafka_wait.properties }} + - name: COMMAND_CONFIG_FILE_PATH + value: /etc/kafka-connect/source-oura/kafka-wait.properties + {{- end }} + {{- with .Values.extraEnvVars }} + {{- toYaml . | nindent 10 }} + {{- end }} + ports: + - name: http + containerPort: 80 + protocol: TCP + {{- if .Values.customLivenessProbe }} + livenessProbe: {{- .Values.customLivenessProbe | toYaml | nindent 12 }} + {{- else if .Values.livenessProbe.enabled }} + livenessProbe: + exec: + command: + - /bin/sh + - -c + - curl -sf localhost:8083/connectors/radar-oura-source/status | grep -o '\"state\":\"[^\"]*\"' | tr '\\n' ',' | grep -vq FAILED || exit 1 + initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.customReadinessProbe }} + readinessProbe: {{- .Values.customReadinessProbe | toYaml | nindent 12 }} + {{- else if .Values.readinessProbe.enabled }} + readinessProbe: + exec: + command: + - /bin/sh + - -c + - curl -sf localhost:8083/connectors/radar-oura-source/status | grep -o '\"state\":\"[^\"]*\"' | tr '\\n' ',' | grep -vq FAILED || exit 1 + initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.readinessProbe.failureThreshold }} + {{- end }} + resources: + {{- toYaml .Values.resources | nindent 12 }} + volumeMounts: + - name: config-properties + mountPath: /etc/kafka-connect/source-oura + - name: logs + mountPath: /var/lib/kafka-connect-oura-source/logs + {{- if .Values.persistence.fsUserOverride }} + initContainers: + - name: fix-permissions + command: + - chown + - -R + - {{ .Values.persistence.fsUserOverride }} + - /var/lib/kafka-connect-oura-source/logs + image: alpine:latest + imagePullPolicy: IfNotPresent + volumeMounts: + - mountPath: /var/lib/kafka-connect-oura-source/logs + name: logs + {{- end }} + volumes: + - name: config-properties + configMap: + name: {{ include "radar-oura-connector.fullname" . }}-properties + - name: logs + {{- if .Values.persistence.enabled }} + persistentVolumeClaim: + claimName: {{ .Values.persistence.existingClaim | default (include "radar-oura-connector.fullname" .) }} + {{- else }} + emptyDir: {} + {{ end }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/radar-oura-connector/templates/networkpolicy.yaml b/charts/radar-oura-connector/templates/networkpolicy.yaml new file mode 100644 index 00000000..8b588c95 --- /dev/null +++ b/charts/radar-oura-connector/templates/networkpolicy.yaml @@ -0,0 +1,12 @@ +{{- if .Values.networkpolicy }} +kind: NetworkPolicy +apiVersion: networking.k8s.io/v1 +metadata: + name: {{ template "radar-oura-connector.fullname" . }} + labels: +{{ include "radar-oura-connector.labels" . | indent 4 }} +spec: + podSelector: +{{ include "radar-oura-connector.labels" . | indent 4 }} + {{- tpl (toYaml .Values.networkpolicy) . | nindent 2 }} +{{- end -}} \ No newline at end of file diff --git a/charts/radar-oura-connector/templates/pvc.yaml b/charts/radar-oura-connector/templates/pvc.yaml new file mode 100644 index 00000000..fd090bda --- /dev/null +++ b/charts/radar-oura-connector/templates/pvc.yaml @@ -0,0 +1,21 @@ +{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }} +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: {{ template "radar-oura-connector.fullname" . }} + labels: +{{ include "radar-oura-connector.labels" . | indent 4 }} +spec: + accessModes: + - {{ .Values.persistence.accessMode | quote }} + resources: + requests: + storage: {{ .Values.persistence.size | quote }} +{{- if .Values.persistence.storageClass }} +{{- if (eq "-" .Values.persistence.storageClass) }} + storageClassName: "" +{{- else }} + storageClassName: "{{ .Values.persistence.storageClass }}" +{{- end }} +{{- end }} +{{- end -}} diff --git a/charts/radar-oura-connector/templates/service.yaml b/charts/radar-oura-connector/templates/service.yaml new file mode 100644 index 00000000..37903a6b --- /dev/null +++ b/charts/radar-oura-connector/templates/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "radar-oura-connector.fullname" . }} + labels: +{{ include "radar-oura-connector.labels" . | indent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + app.kubernetes.io/name: {{ include "radar-oura-connector.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} diff --git a/charts/radar-oura-connector/templates/tests/test-connection.yaml b/charts/radar-oura-connector/templates/tests/test-connection.yaml new file mode 100644 index 00000000..71667d6c --- /dev/null +++ b/charts/radar-oura-connector/templates/tests/test-connection.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: Pod +metadata: + name: "{{ include "radar-oura-connector.fullname" . }}-test-connection" + labels: + app.kubernetes.io/name: {{ include "radar-oura-connector.name" . }} + helm.sh/chart: {{ include "radar-oura-connector.chart" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + annotations: + "helm.sh/hook": test-success +spec: + containers: + - name: wget + image: busybox + command: ['wget'] + args: ['{{ include "radar-oura-connector.fullname" . }}:{{ .Values.service.port }}'] + restartPolicy: Never diff --git a/charts/radar-oura-connector/values.yaml b/charts/radar-oura-connector/values.yaml new file mode 100644 index 00000000..879d55d8 --- /dev/null +++ b/charts/radar-oura-connector/values.yaml @@ -0,0 +1,218 @@ +# Default values for radar-oura-connector. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +# -- Number of radar-oura-connector replicas to deploy +replicaCount: 1 + +image: + # -- radar-oura-connector image repository + repository: radarbase/kafka-connect-rest-oura-source + # -- radar-oura-connector image tag (immutable tags are recommended) + # Overrides the image tag whose default is the chart appVersion. + tag: 0.5.0 + # -- radar-oura-connector image pull policy + pullPolicy: IfNotPresent + +# -- Docker registry secret names as an array +imagePullSecrets: [] + +# -- String to partially override radar-oura-connector.fullname template with a string (will prepend the release name) +nameOverride: "" +# -- String to fully override radar-oura-connector.fullname template with a string +fullnameOverride: "" + +# -- Configure radar-oura-connector pods' Security Context +podSecurityContext: {} + # fsGroup: 2000 + +# -- Configure radar-oura-connector containers' Security Context +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + # -- Kubernetes Service type + type: ClusterIP + # -- radar-oura-connector port + port: 8083 + +resources: + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + + # -- CPU/Memory resource requests + requests: + cpu: 100m + memory: 1Gi + +persistence: + # -- Enable persistence using PVC + enabled: true + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + # storageClass: "-" + ## + ## If you want to reuse an existing claim, you can pass the name of the PVC using + ## the existingClaim variable + # existingClaim: your-claim + + # -- PVC Access Mode for radar-oura-connector volume + accessMode: ReadWriteOnce + # -- PVC Storage Request for radar-oura-connector volume + size: 5Gi + # -- Overrides the user of the oura connector logs, for example, `"1000:1000"`. + fsUserOverride: null + +# -- Node labels for pod assignment +nodeSelector: {} + +# -- Toleration labels for pod assignment +tolerations: [] + +# -- Affinity labels for pod assignment +affinity: {} + +# -- Extra environment variables +extraEnvVars: + # -- Protocol used to communicate with brokers. Valid values are: PLAINTEXT, SSL, SASL_PLAINTEXT, SASL_SSL. + - name: CONNECT_SECURITY_PROTOCOL + value: PLAINTEXT + +# -- Custom livenessProbe that overrides the default one +customLivenessProbe: {} + +livenessProbe: + # -- Enable livenessProbe + enabled: true + # -- Initial delay seconds for livenessProbe + initialDelaySeconds: 5 + # -- Period seconds for livenessProbe + periodSeconds: 60 + # -- Timeout seconds for livenessProbe + timeoutSeconds: 5 + # -- Success threshold for livenessProbe + successThreshold: 1 + # -- Failure threshold for livenessProbe + failureThreshold: 3 + +# -- Custom readinessProbe that overrides the default one +customReadinessProbe: {} + +readinessProbe: + # -- Enable readinessProbe + enabled: true + # -- Initial delay seconds for readinessProbe + initialDelaySeconds: 5 + # -- Period seconds for readinessProbe + periodSeconds: 60 + # -- Timeout seconds for readinessProbe + timeoutSeconds: 5 + # -- Success threshold for readinessProbe + successThreshold: 1 + # -- Failure threshold for readinessProbe + failureThreshold: 3 + +# -- Network policy defines who can access this application and who this applications has access to +# @default -- check `values.yaml` +networkpolicy: + policyTypes: + - Egress + egress: + - to: + - ipBlock: + cidr: 0.0.0.0/0 + except: + - 10.0.0.0/8 + - 192.168.0.0/16 + - 172.16.0.0/20 + - to: + - namespaceSelector: + matchLabels: + kubernetes.io/metadata.name: '{{ .Release.Namespace }}' + podSelector: + matchLabels: + app.kubernetes.io/name: 'cp-zookeeper' + - namespaceSelector: + matchLabels: + kubernetes.io/metadata.name: '{{ .Release.Namespace }}' + podSelector: + matchLabels: + app.kubernetes.io/name: 'cp-kafka' + - namespaceSelector: + matchLabels: + kubernetes.io/metadata.name: '{{ .Release.Namespace }}' + podSelector: + matchLabels: + app.kubernetes.io/name: 'cp-schema-registry' + - namespaceSelector: + matchLabels: + kubernetes.io/metadata.name: '{{ .Release.Namespace }}' + podSelector: + matchLabels: + app.kubernetes.io/name: 'radar-rest-sources-backend' + - namespaceSelector: + matchLabels: + kubernetes.io/metadata.name: '{{ .Release.Namespace }}' + podSelector: + matchLabels: + app.kubernetes.io/name: 'management-portal' + - to: + - namespaceSelector: + matchLabels: + kubernetes.io/metadata.name: kube-system + podSelector: + matchLabels: + k8s-app: kube-dns + ports: + - port: 53 + protocol: UDP + - port: 53 + protocol: TCP + +# -- URI of Zookeeper instances of the cluster +zookeeper: cp-zookeeper-headless:2181 +# -- URI of Kafka brokers of the cluster +kafka: PLAINTEXT://cp-kafka-headless:9092 +# -- Number of Kafka brokers. This is used to validate the cluster availability at connector init. +kafka_num_brokers: "3" +# -- URL of the Kafka schema registry +schema_registry: http://cp-schema-registry:8081 + +kafka_wait: + # -- Whether to wait before the specified number of brokers are available. + enabled: true + # -- Kafka connection properties file contents during wait. If empty, all environment variables starting with + # `CONNECT_` will be used. + properties: "" + +# -- Base URL of the rest-sources-authorizer-backend service +radar_rest_sources_backend_url: http://radar-rest-sources-backend:8080/rest-sources/backend/ +# -- Number of connector tasks to be used in connector.properties +connector_num_tasks: "5" +# -- Oura API client id. +oura_api_client: "" +# -- Oura API client secret. +oura_api_secret: "" + +# -- OAuth2 client id from Management Portal +oauthClientId: radar_oura_connector +# -- OAuth2 client secret from Management Portal +oauthClientSecret: secret +# -- URL of Management Portal. This will be used to create URLs to access Management Portal +managementportal_url: http://management-portal:8080/managementportal +# -- Set to true, if intraday access data should be collected by the connector. This will be set in connector.properties. +includeIntradayData: true