From ca564b09f8144e53f6140450879e58c52e703dff Mon Sep 17 00:00:00 2001 From: Ashwin Chatterji Date: Fri, 12 Jun 2020 15:12:44 +0800 Subject: [PATCH 1/2] Add Kubernetes Pod labels to Core and Serving. --- infra/charts/feast/charts/feast-core/README.md | 5 +++-- .../feast/charts/feast-core/templates/deployment.yaml | 3 +++ infra/charts/feast/charts/feast-core/values.yaml | 5 ++++- infra/charts/feast/charts/feast-serving/README.md | 7 ++++--- .../feast/charts/feast-serving/templates/deployment.yaml | 3 +++ infra/charts/feast/charts/feast-serving/values.yaml | 5 ++++- 6 files changed, 21 insertions(+), 7 deletions(-) diff --git a/infra/charts/feast/charts/feast-core/README.md b/infra/charts/feast/charts/feast-core/README.md index 40d6bd9112..f85b4223c8 100644 --- a/infra/charts/feast/charts/feast-core/README.md +++ b/infra/charts/feast/charts/feast-core/README.md @@ -12,7 +12,7 @@ Current chart version is `0.5.0-alpha.1` | Key | Type | Default | Description | |-----|------|---------|-------------| -| "application-generated.yaml".enabled | bool | `true` | Flag to include Helm generated configuration for Feast database URL, Kafka bootstrap servers and jobs metrics host. This is useful for deployment that uses default configuration for Kafka, Postgres and StatsD exporter. Please set `application-override.yaml` to override this configuration. | +| "application-generated.yaml".enabled | bool | `true` | Flag to include Helm generated configuration for http port, Feast database URL, Kafka bootstrap servers and jobs metrics host. This is useful for deployment that uses default configuration for Kafka, Postgres and StatsD exporter. Please set `application-override.yaml` to override this configuration. | | "application-override.yaml" | object | `{"enabled":true}` | Configuration to override the default [application.yaml](https://github.com/feast-dev/feast/blob/master/core/src/main/resources/application.yml). Will be created as a ConfigMap. `application-override.yaml` has a higher precedence than `application-secret.yaml` | | "application-secret.yaml" | object | `{"enabled":true}` | Configuration to override the default [application.yaml](https://github.com/feast-dev/feast/blob/master/core/src/main/resources/application.yml). Will be created as a Secret. `application-override.yaml` has a higher precedence than `application-secret.yaml`. It is recommended to either set `application-override.yaml` or `application-secret.yaml` only to simplify config management. | | "application.yaml".enabled | bool | `true` | Flag to include the default [configuration](https://github.com/feast-dev/feast/blob/master/core/src/main/resources/application.yml). Please set `application-override.yaml` to override this configuration. | @@ -42,7 +42,7 @@ Current chart version is `0.5.0-alpha.1` | ingress.http.https.secretNames | object | `{}` | Map of hostname to TLS secret name | | ingress.http.whitelist | string | `""` | Allowed client IP source ranges | | javaOpts | string | `nil` | [JVM options](https://docs.oracle.com/cd/E22289_01/html/821-1274/configuring-the-default-jvm-and-java-arguments.html). For better performance, it is advised to set the min and max heap:
`-Xms2048m -Xmx2048m` | -| livenessProbe.enabled | bool | `true` | Flag to enabled the probe | +| livenessProbe.enabled | bool | `false` | Flag to enabled the probe | | livenessProbe.failureThreshold | int | `5` | Min consecutive failures for the probe to be considered failed | | livenessProbe.initialDelaySeconds | int | `60` | Delay before the probe is initiated | | livenessProbe.periodSeconds | int | `10` | How often to perform the probe | @@ -51,6 +51,7 @@ Current chart version is `0.5.0-alpha.1` | logLevel | string | `"WARN"` | Default log level, use either one of `DEBUG`, `INFO`, `WARN` or `ERROR` | | logType | string | `"Console"` | Log format, either `JSON` or `Console` | | nodeSelector | object | `{}` | Node labels for pod assignment | +| podLabels | object | `{}` | Labels to be added to Feast Core pods | | postgresql.existingSecret | string | `""` | Existing secret to use for authenticating to Postgres | | prometheus.enabled | bool | `true` | Flag to enable scraping of Feast Core metrics | | readinessProbe.enabled | bool | `true` | Flag to enabled the probe | diff --git a/infra/charts/feast/charts/feast-core/templates/deployment.yaml b/infra/charts/feast/charts/feast-core/templates/deployment.yaml index 179e3a6a09..3520e92261 100644 --- a/infra/charts/feast/charts/feast-core/templates/deployment.yaml +++ b/infra/charts/feast/charts/feast-core/templates/deployment.yaml @@ -30,6 +30,9 @@ spec: app: {{ template "feast-core.name" . }} component: core release: {{ .Release.Name }} + {{- if Values.podLabels }} + {{ toYaml .Values.podLabels | nindent 8 }} + {{- end }} spec: {{- with .Values.nodeSelector }} nodeSelector: diff --git a/infra/charts/feast/charts/feast-core/values.yaml b/infra/charts/feast/charts/feast-core/values.yaml index f56897d285..d5ad50ea15 100644 --- a/infra/charts/feast/charts/feast-core/values.yaml +++ b/infra/charts/feast/charts/feast-core/values.yaml @@ -150,4 +150,7 @@ resources: {} nodeSelector: {} # envOverrides -- Extra environment variables to set -envOverrides: {} \ No newline at end of file +envOverrides: {} + +# podLabels -- Labels to be added to Feast Core pods +podLabels: {} diff --git a/infra/charts/feast/charts/feast-serving/README.md b/infra/charts/feast/charts/feast-serving/README.md index d30da2eb3a..eb638359e7 100644 --- a/infra/charts/feast/charts/feast-serving/README.md +++ b/infra/charts/feast/charts/feast-serving/README.md @@ -12,13 +12,13 @@ Current chart version is `0.5.0-alpha.1` | Key | Type | Default | Description | |-----|------|---------|-------------| -| "application-generated.yaml".enabled | bool | `true` | Flag to include Helm generated configuration for Feast Core host, Redis store and job store. This is useful for deployment that uses default configuration for Redis. Please set `application-override.yaml` to override this configuration. | +| "application-generated.yaml".enabled | bool | `true` | Flag to include Helm generated configuration for http port, Feast Core host, Redis store and job store. This is useful for deployment that uses default configuration for Redis. Please set `application-override.yaml` to override this configuration. | | "application-override.yaml" | object | `{"enabled":true}` | Configuration to override the default [application.yaml](https://github.com/feast-dev/feast/blob/master/serving/src/main/resources/application.yml). Will be created as a ConfigMap. `application-override.yaml` has a higher precedence than `application-secret.yaml` | | "application-secret.yaml" | object | `{"enabled":true}` | Configuration to override the default [application.yaml](https://github.com/feast-dev/feast/blob/master/serving/src/main/resources/application.yml). Will be created as a Secret. `application-override.yaml` has a higher precedence than `application-secret.yaml`. It is recommended to either set `application-override.yaml` or `application-secret.yaml` only to simplify config management. | | "application.yaml".enabled | bool | `true` | Flag to include the default [configuration](https://github.com/feast-dev/feast/blob/master/serving/src/main/resources/application.yml). Please set `application-override.yaml` to override this configuration. | | envOverrides | object | `{}` | Extra environment variables to set | | gcpProjectId | string | `""` | Project ID to use when using Google Cloud services such as BigQuery, Cloud Storage and Dataflow | -| gcpServiceAccount.enabled | bool | `false` | Flag to use [service account](https://cloud.google.com/iam/docs/creating-managing-service-account-keys) JSON key | +| gcpServiceAccount.enabled | bool | `false` | Flag to use [service account](https://cloud.google.com/iam/docs/creating-managing-service-account-keys) JSON key Cloud service account JSON key file. | | gcpServiceAccount.existingSecret.key | string | `"credentials.json"` | Key in the secret data (file name of the service account) | | gcpServiceAccount.existingSecret.name | string | `"feast-gcp-service-account"` | Name of the existing secret containing the service account | | image.pullPolicy | string | `"IfNotPresent"` | Image pull policy | @@ -51,6 +51,7 @@ Current chart version is `0.5.0-alpha.1` | logLevel | string | `"WARN"` | Default log level, use either one of `DEBUG`, `INFO`, `WARN` or `ERROR` | | logType | string | `"Console"` | Log format, either `JSON` or `Console` | | nodeSelector | object | `{}` | Node labels for pod assignment | +| podLabels | object | `{}` | Labels to be added to Feast Serving pods | | prometheus.enabled | bool | `true` | Flag to enable scraping of Feast Core metrics | | readinessProbe.enabled | bool | `true` | Flag to enabled the probe | | readinessProbe.failureThreshold | int | `5` | Min consecutive failures for the probe to be considered failed | @@ -65,5 +66,5 @@ Current chart version is `0.5.0-alpha.1` | service.grpc.targetPort | int | `6566` | Container port serving GRPC requests | | service.http.nodePort | string | `nil` | Port number that each cluster node will listen to | | service.http.port | int | `80` | Service port for HTTP requests | -| service.http.targetPort | int | `8080` | Container port serving HTTP requests | +| service.http.targetPort | int | `8080` | Container port serving HTTP requests and Prometheus metrics | | service.type | string | `"ClusterIP"` | Kubernetes service type | diff --git a/infra/charts/feast/charts/feast-serving/templates/deployment.yaml b/infra/charts/feast/charts/feast-serving/templates/deployment.yaml index bb8fdc55ae..076c910490 100644 --- a/infra/charts/feast/charts/feast-serving/templates/deployment.yaml +++ b/infra/charts/feast/charts/feast-serving/templates/deployment.yaml @@ -30,6 +30,9 @@ spec: app: {{ template "feast-serving.name" . }} component: serving release: {{ .Release.Name }} + {{- if Values.podLabels }} + {{ toYaml .Values.podLabels | nindent 8 }} + {{- end }} spec: {{- with .Values.nodeSelector }} nodeSelector: diff --git a/infra/charts/feast/charts/feast-serving/values.yaml b/infra/charts/feast/charts/feast-serving/values.yaml index c94c720526..18069c2863 100644 --- a/infra/charts/feast/charts/feast-serving/values.yaml +++ b/infra/charts/feast/charts/feast-serving/values.yaml @@ -145,4 +145,7 @@ resources: {} nodeSelector: {} # envOverrides -- Extra environment variables to set -envOverrides: {} \ No newline at end of file +envOverrides: {} + +# podLabels -- Labels to be added to Feast Serving pods +podLabels: {} From ac8c5a07654d28c97e9e5ef7b05efeed81a0d950 Mon Sep 17 00:00:00 2001 From: Ashwin Chatterji Date: Fri, 12 Jun 2020 15:24:00 +0800 Subject: [PATCH 2/2] Missed a dot before Values. --- infra/charts/feast/charts/feast-core/templates/deployment.yaml | 2 +- .../charts/feast/charts/feast-serving/templates/deployment.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/infra/charts/feast/charts/feast-core/templates/deployment.yaml b/infra/charts/feast/charts/feast-core/templates/deployment.yaml index 3520e92261..8b2343ee9c 100644 --- a/infra/charts/feast/charts/feast-core/templates/deployment.yaml +++ b/infra/charts/feast/charts/feast-core/templates/deployment.yaml @@ -30,7 +30,7 @@ spec: app: {{ template "feast-core.name" . }} component: core release: {{ .Release.Name }} - {{- if Values.podLabels }} + {{- if .Values.podLabels }} {{ toYaml .Values.podLabels | nindent 8 }} {{- end }} spec: diff --git a/infra/charts/feast/charts/feast-serving/templates/deployment.yaml b/infra/charts/feast/charts/feast-serving/templates/deployment.yaml index 076c910490..610dbe5fee 100644 --- a/infra/charts/feast/charts/feast-serving/templates/deployment.yaml +++ b/infra/charts/feast/charts/feast-serving/templates/deployment.yaml @@ -30,7 +30,7 @@ spec: app: {{ template "feast-serving.name" . }} component: serving release: {{ .Release.Name }} - {{- if Values.podLabels }} + {{- if .Values.podLabels }} {{ toYaml .Values.podLabels | nindent 8 }} {{- end }} spec: