diff --git a/charts/neon-pg-sni-router/.gitignore b/charts/neon-pg-sni-router/.gitignore new file mode 100644 index 0000000..8f03563 --- /dev/null +++ b/charts/neon-pg-sni-router/.gitignore @@ -0,0 +1 @@ +values-preview-render.yaml diff --git a/charts/neon-pg-sni-router/.helmignore b/charts/neon-pg-sni-router/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/charts/neon-pg-sni-router/.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/neon-pg-sni-router/Chart.yaml b/charts/neon-pg-sni-router/Chart.yaml new file mode 100644 index 0000000..2ea3a9f --- /dev/null +++ b/charts/neon-pg-sni-router/Chart.yaml @@ -0,0 +1,11 @@ +apiVersion: v2 +name: neon-pg-sni-router +description: Neon Postgres SNI Router +type: application +version: 0.0.0 +appVersion: "0.1.0" +kubeVersion: "^1.18.x-x" +home: https://neon.tech +sources: + - https://github.com/neondatabase/neon + - https://github.com/neondatabase/helm-charts diff --git a/charts/neon-pg-sni-router/README.md b/charts/neon-pg-sni-router/README.md new file mode 100644 index 0000000..23c3115 --- /dev/null +++ b/charts/neon-pg-sni-router/README.md @@ -0,0 +1,80 @@ +# neon-pg-sni-router + +![Version: 0.0.0](https://img.shields.io/badge/Version-0.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) [![Lint and Test Charts](https://github.com/neondatabase/helm-charts/actions/workflows/lint-test.yaml/badge.svg)](https://github.com/neondatabase/helm-charts/actions/workflows/lint-test.yaml) + +Neon Postgres SNI Router + +**Homepage:** https://neon.tech + +## Source Code + +* +* + +## Installing the Chart + +To install the chart with the release name `neon-pg-sni-router`: + +```console +$ helm repo add neondatabase https://neondatabase.github.io/helm-charts +$ helm install neon-pg-sni-router neondatabase/neon-pg-sni-router +``` + +## Requirements + +Kubernetes: `^1.18.x-x` + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | Affinity for pod assignment | +| containerLifecycle | object | `{}` | container lifecycle hooks specification for neon-pg-sni-router container | +| deploymentStrategy | object | `{"type":"Recreate"}` | strategy override for deployment | +| exposedService.annotations | object | `{}` | Annotations to add to the exposed service | +| exposedService.httpsPort | int | `nil` | Exposed Service https port. If null, https server will not be exposed. | +| exposedService.port | int | `5432` | Exposed Service proxy port | +| exposedService.type | string | `"LoadBalancer"` | Exposed service type | +| extraManifests | list | `[]` | Additional manifests that are created with the chart | +| fullnameOverride | string | `""` | String to fully override neon-pg-sni-router.fullname template | +| image.pullPolicy | string | `"IfNotPresent"` | image pull policy | +| image.repository | string | `"neondatabase/neon"` | Neondatabase image repository | +| image.tag | string | `"3113"` | Overrides the image tag whose default is the chart appVersion. | +| imagePullSecrets | list | `[]` | Specify docker-registry secret names as an array | +| metrics.enabled | bool | `false` | Enable prometheus metrcis autodiscovery | +| metrics.serviceMonitor.enabled | bool | `false` | Create ServiceMonitor resource | +| metrics.serviceMonitor.interval | string | `"10s"` | Interval in which prometheus scrapes | +| metrics.serviceMonitor.namespace | string | `""` | The namespace in which the ServiceMonitor will be created, if empty then Release.Namespace used | +| metrics.serviceMonitor.scrapeTimeout | string | `"10s"` | Scrape Timeout duration for prometheus | +| metrics.serviceMonitor.selector | object | `{}` | Additional labels to attach (used by Prometheus operator) | +| nameOverride | string | `""` | String to partially override neon-pg-sni-router.fullname template (will maintain the release name) | +| nodeSelector | object | `{}` | Node labels for pod assignment. | +| podAnnotations | object | `{}` | Annotations for neon-pg-sni-router pods | +| podLabels | object | `{}` | Additional labels for neon-pg-sni-router pods | +| podSecurityContext | object | `{}` | neon-pg-sni-router's pods Security Context | +| replicaCount | int | `1` | | +| resources | object | `{}` | | +| securityContext | object | `{}` | neon-pg-sni-router's containers Security Context | +| service.annotations | object | `{}` | Annotations to add to the service | +| service.httpPort | int | `9090` | Http management port | +| service.port | int | `7000` | Service management port | +| service.type | string | `"ClusterIP"` | Service type | +| serviceAccount.annotations | object | `{}` | Annotations to add to the service account | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `""` | | +| settings.authBackend | string | `"link"` | auth method used (console|link|postgres) | +| settings.authEndpoint | string | `""` | auth endpoint, e.g. "http://console.neon/authenticate_proxy_request/" | +| settings.destination | string | `"svc.cluster.local"` | append this domain zone to the transformed SNI hostname to get the destination address, e.g. "svc.cluster.local" | +| settings.domain | string | `"dummy"` | domain used in TLS cert for client postgres connections | +| settings.metricCollectionEndpoint | string | `""` | (url) endpoint used to send metrics to. If null, metrics will not be sent. | +| settings.metricCollectionInterval | string | `""` | (string) how often metrics should be sent. | +| settings.sentryEnvironment | string | `"development"` | "development" or "production". It will be visible in sentry in order to filter issues | +| settings.sentryUrl | string | `""` | url (will be converted into `SENTRY_DSN` environment variable) used by sentry to collect error/panic events in neon-pg-sni-router | +| settings.uri | string | `""` | | +| settings.wssPort | int | `nil` | numeric port used for wss/https connections. If null, wss server will not be started | +| terminationGracePeriodSeconds | int | `30` | Deployment's terminationGracePeriodSeconds | +| tolerations | list | `[]` | Tolerations for pod assignment. | +| useCertManager | bool | `false` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.9.1](https://github.com/norwoodj/helm-docs/releases/v1.9.1) diff --git a/charts/neon-pg-sni-router/README.md.gotmpl b/charts/neon-pg-sni-router/README.md.gotmpl new file mode 100644 index 0000000..53bc31a --- /dev/null +++ b/charts/neon-pg-sni-router/README.md.gotmpl @@ -0,0 +1,23 @@ +{{ template "chart.header" . }} +{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}[![Lint and Test Charts](https://github.com/neondatabase/helm-charts/actions/workflows/lint-test.yaml/badge.svg)](https://github.com/neondatabase/helm-charts/actions/workflows/lint-test.yaml) + +{{ template "chart.description" . }} + +**Homepage:** {{ template "chart.homepage" . }} + +{{ template "chart.sourcesSection" . }} + +## Installing the Chart + +To install the chart with the release name `{{ template "chart.name" . }}`: + +```console +$ helm repo add neondatabase https://neondatabase.github.io/helm-charts +$ helm install {{ template "chart.name" . }} neondatabase/{{ template "chart.name" . }} +``` + +{{ template "chart.requirementsSection" . }} + +{{ template "chart.valuesSection" . }} + +{{ template "helm-docs.versionFooter" . }} diff --git a/charts/neon-pg-sni-router/templates/NOTES.txt b/charts/neon-pg-sni-router/templates/NOTES.txt new file mode 100644 index 0000000..4bb3fc2 --- /dev/null +++ b/charts/neon-pg-sni-router/templates/NOTES.txt @@ -0,0 +1,17 @@ +TODO: define this. +1. Get the application URL by running these commands: +{{- if contains "NodePort" .Values.exposedService.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "neon-pg-sni-router.fullname" . }}-exposed) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo postgres://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.exposedService.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 "neon-pg-sni-router.fullname" . }}-exposed' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "neon-pg-sni-router.fullname" . }}-exposed --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + echo postgres://$SERVICE_IP:{{ .Values.exposedService.port }} +{{- else if contains "ClusterIP" .Values.exposedService.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "neon-pg-sni-router.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 postgres://127.0.0.1:15432 to use your application" + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 15432:$CONTAINER_PORT +{{- end }} diff --git a/charts/neon-pg-sni-router/templates/_helpers.tpl b/charts/neon-pg-sni-router/templates/_helpers.tpl new file mode 100644 index 0000000..93b9c3a --- /dev/null +++ b/charts/neon-pg-sni-router/templates/_helpers.tpl @@ -0,0 +1,72 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "neon-pg-sni-router.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 "neon-pg-sni-router.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 }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "neon-pg-sni-router.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "neon-pg-sni-router.labels" -}} +helm.sh/chart: {{ include "neon-pg-sni-router.chart" . }} +{{ include "neon-pg-sni-router.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "neon-pg-sni-router.selectorLabels" -}} +app.kubernetes.io/name: {{ include "neon-pg-sni-router.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "neon-pg-sni-router.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "neon-pg-sni-router.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} + +{{/* +Create the name for TLS certificate and it's secret +*/}} +{{- define "neon-pg-sni-router.certificate" -}} +{{- .Values.settings.domain | replace "." "-" | replace "*" "wildcard" }} +{{- end }} +{{- define "neon-pg-sni-router.certificate-secret" -}} +{{ include "neon-pg-sni-router.certificate" . }}-tls +{{- end }} diff --git a/charts/neon-pg-sni-router/templates/certificate.yaml b/charts/neon-pg-sni-router/templates/certificate.yaml new file mode 100644 index 0000000..f8d650b --- /dev/null +++ b/charts/neon-pg-sni-router/templates/certificate.yaml @@ -0,0 +1,31 @@ +{{- if ne .Values.settings.domain "dummy" }} + {{- if .Values.useCertManager }} +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: {{ include "neon-pg-sni-router.certificate" . }} +spec: + commonName: {{ .Values.settings.domain | quote }} + dnsNames: + - {{ .Values.settings.domain | quote }} + issuerRef: + group: cert-manager.io + kind: ClusterIssuer + name: cert-manager-clusterissuer + secretName: {{ include "neon-pg-sni-router.certificate-secret" . }} + privateKey: + encoding: PKCS8 + {{- end }} +{{ else }} +{{/* this is a dummy certificate to make tests pass */}} +apiVersion: v1 +kind: Secret +metadata: + name: dummy-tls +type: kubernetes.io/tls +data: + tls.crt: >- + LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUZUakNDQkRhZ0F3SUJBZ0lTQTdFT3RQTGRXRzUwbzBEeVBzaDl1bktTTUEwR0NTcUdTSWIzRFFFQkN3VUEKTURJeEN6QUpCZ05WQkFZVEFsVlRNUll3RkFZRFZRUUtFdzFNWlhRbmN5QkZibU55ZVhCME1Rc3dDUVlEVlFRRApFd0pTTXpBZUZ3M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bktVWmJyU09CVlVmQTlMTlhIVHNTYkUKZFBWNWZ1WCtNem1PLytRWVdGMGx2V3RQCi0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0K +{{- end }} diff --git a/charts/neon-pg-sni-router/templates/deployment.yaml b/charts/neon-pg-sni-router/templates/deployment.yaml new file mode 100644 index 0000000..8a78ad1 --- /dev/null +++ b/charts/neon-pg-sni-router/templates/deployment.yaml @@ -0,0 +1,128 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "neon-pg-sni-router.fullname" . }} + labels: + {{- include "neon-pg-sni-router.labels" . | nindent 4 }} +spec: + strategy: + {{- toYaml .Values.deploymentStrategy | nindent 4 }} + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "neon-pg-sni-router.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "neon-pg-sni-router.selectorLabels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "neon-pg-sni-router.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + initContainers: + - name: sysctl + image: busybox:1.35.0 + imagePullPolicy: IfNotPresent + securityContext: + privileged: true + args: + - /bin/sh + - -c + - 'sysctl -w net.ipv4.tcp_keepalive_time=60; sysctl -w net.ipv4.tcp_keepalive_intvl=30' + terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + command: + - /usr/local/bin/pg_sni_router + - --listen + - 0.0.0.0:4432 + - --destination + - {{ .Values.settings.destination }} + {{- with .Values.settings.metricCollectionEndpoint }} + - --metric-collection-endpoint + - {{ . }} + {{- end }} + {{- with .Values.settings.metricCollectionInterval }} + - --metric-collection-interval + - {{ . }} + {{- end }} + - --tls-key + - /certs/tls.key + - --tls-cert + - /certs/tls.crt + {{- if .Values.settings }} + env: + {{- with .Values.settings.sentryUrl }} + - name: SENTRY_DSN + value: {{ . }} + {{- end }} + {{- with .Values.settings.sentryEnvironment }} + - name: SENTRY_ENVIRONMENT + value: {{ . }} + {{- end }} + {{- end }} + volumeMounts: + - mountPath: "/certs" + name: certs + readOnly: true + ports: + - name: router + containerPort: 4432 + protocol: TCP + - name: http + containerPort: 9090 + protocol: TCP + startupProbe: + tcpSocket: + port: router + initialDelaySeconds: 10 + timeoutSeconds: 5 + periodSeconds: 10 + failureThreshold: 30 + livenessProbe: + tcpSocket: + port: router + periodSeconds: 15 + timeoutSeconds: 10 + readinessProbe: + tcpSocket: + port: router + periodSeconds: 15 + timeoutSeconds: 10 + {{- if .Values.containerLifecycle }} + lifecycle: + {{- toYaml .Values.containerLifecycle | nindent 12 }} + {{- end }} + resources: + {{- toYaml .Values.resources | nindent 12 }} + volumes: + - name: certs + secret: + secretName: {{ include "neon-pg-sni-router.certificate-secret" . }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} \ No newline at end of file diff --git a/charts/neon-pg-sni-router/templates/extra-manifests.yaml b/charts/neon-pg-sni-router/templates/extra-manifests.yaml new file mode 100644 index 0000000..0e5456b --- /dev/null +++ b/charts/neon-pg-sni-router/templates/extra-manifests.yaml @@ -0,0 +1,4 @@ +{{- range .Values.extraManifests }} +--- +{{ tpl (toYaml .) $ }} +{{- end }} diff --git a/charts/neon-pg-sni-router/templates/service.exposed.yaml b/charts/neon-pg-sni-router/templates/service.exposed.yaml new file mode 100644 index 0000000..ae11a26 --- /dev/null +++ b/charts/neon-pg-sni-router/templates/service.exposed.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "neon-pg-sni-router.fullname" . }}-exposed + {{- with .Values.exposedService.annotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "neon-pg-sni-router.labels" . | nindent 4 }} +spec: + type: {{ .Values.exposedService.type }} + ports: + - port: {{ .Values.exposedService.port }} + targetPort: router + protocol: TCP + name: proxy + selector: + {{- include "neon-pg-sni-router.selectorLabels" . | nindent 4 }} diff --git a/charts/neon-pg-sni-router/templates/service.yaml b/charts/neon-pg-sni-router/templates/service.yaml new file mode 100644 index 0000000..18b5dd1 --- /dev/null +++ b/charts/neon-pg-sni-router/templates/service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "neon-pg-sni-router.fullname" . }} + {{- with .Values.service.annotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "neon-pg-sni-router.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.httpPort }} + targetPort: http + protocol: TCP + name: http + selector: + {{- include "neon-pg-sni-router.selectorLabels" . | nindent 4 }} diff --git a/charts/neon-pg-sni-router/templates/serviceaccount.yaml b/charts/neon-pg-sni-router/templates/serviceaccount.yaml new file mode 100644 index 0000000..151f303 --- /dev/null +++ b/charts/neon-pg-sni-router/templates/serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "neon-pg-sni-router.serviceAccountName" . }} + labels: + {{- include "neon-pg-sni-router.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/charts/neon-pg-sni-router/templates/servicemonitor.yaml b/charts/neon-pg-sni-router/templates/servicemonitor.yaml new file mode 100644 index 0000000..8630a00 --- /dev/null +++ b/charts/neon-pg-sni-router/templates/servicemonitor.yaml @@ -0,0 +1,32 @@ +{{- if .Values.metrics.enabled }} +{{- if .Values.metrics.serviceMonitor.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ include "neon-pg-sni-router.fullname" . }} + labels: + {{- include "neon-pg-sni-router.labels" . | nindent 4 }} + {{- range $key, $value := .Values.metrics.serviceMonitor.selector }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- if .Values.metrics.serviceMonitor.namespace }} + namespace: {{ .Values.metrics.serviceMonitor.namespace }} + {{- end }} +spec: + selector: + matchLabels: + {{- include "neon-pg-sni-router.selectorLabels" . | nindent 6 }} + endpoints: + - port: http + path: /metrics + {{- if .Values.metrics.serviceMonitor.interval }} + interval: {{ .Values.metrics.serviceMonitor.interval }} + {{- end }} + {{- if .Values.metrics.serviceMonitor.scrapeTimeout }} + scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }} + {{- end }} + namespaceSelector: + matchNames: + - {{ .Release.Namespace }} +{{- end }} +{{- end }} diff --git a/charts/neon-pg-sni-router/values-dev-eu-west-1-zeta.yaml b/charts/neon-pg-sni-router/values-dev-eu-west-1-zeta.yaml new file mode 100644 index 0000000..98a1dfc --- /dev/null +++ b/charts/neon-pg-sni-router/values-dev-eu-west-1-zeta.yaml @@ -0,0 +1,21 @@ +useCertManager: true + +replicaCount: 3 + +image: + tag: "3113" + +exposedService: + # exposedService.port -- Exposed Service proxy port + port: 4432 + annotations: + external-dns.alpha.kubernetes.io/hostname: "*.snirouter.zeta.eu-west-1.internal.aws.neon.build" + +settings: + domain: "*.snirouter.zeta.eu-west-1.internal.aws.neon.build" + +imagePullSecrets: + - name: docker-hub-neon + +metrics: + enabled: false diff --git a/charts/neon-pg-sni-router/values-preview-template.yaml b/charts/neon-pg-sni-router/values-preview-template.yaml new file mode 100644 index 0000000..dda7a2f --- /dev/null +++ b/charts/neon-pg-sni-router/values-preview-template.yaml @@ -0,0 +1,24 @@ +image: + repository: neondatabase/neon + tag: latest + +exposedService: + # exposedService.port -- Exposed Service proxy port + port: 4432 + annotations: + external-dns.alpha.kubernetes.io/hostname: "*.snirouter.${PREVIEW_NAME}.aws.neon.build" + +settings: + domain: "*.snirouter.${PREVIEW_NAME}.aws.neon.build" + +imagePullSecrets: + - name: docker-hub-neon + +terminationGracePeriodSeconds: 5 + +serviceAccount: + create: false + +metrics: + enabled: false + diff --git a/charts/neon-pg-sni-router/values-prod-us-east-1-theta.yaml b/charts/neon-pg-sni-router/values-prod-us-east-1-theta.yaml new file mode 100644 index 0000000..a047eda --- /dev/null +++ b/charts/neon-pg-sni-router/values-prod-us-east-1-theta.yaml @@ -0,0 +1,21 @@ +useCertManager: true + +replicaCount: 3 + +image: + tag: "3113" + +exposedService: + # exposedService.port -- Exposed Service proxy port + port: 4432 + annotations: + external-dns.alpha.kubernetes.io/hostname: "*.snirouter.theta.us-east-1.internal.aws.neon.tech" + +settings: + domain: "*.snirouter.theta.us-east-1.internal.aws.neon.tech" + +imagePullSecrets: + - name: docker-hub-neon + +metrics: + enabled: false diff --git a/charts/neon-pg-sni-router/values.yaml b/charts/neon-pg-sni-router/values.yaml new file mode 100644 index 0000000..d02803b --- /dev/null +++ b/charts/neon-pg-sni-router/values.yaml @@ -0,0 +1,173 @@ +# Default values for neon-pg-sni-router. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +# Use cert-manager to generate TLS certificates +# otherwise, you need to provide your own certificates +useCertManager: false + +replicaCount: 1 + +# -- strategy override for deployment +deploymentStrategy: + type: Recreate + +# -- Deployment's terminationGracePeriodSeconds +terminationGracePeriodSeconds: 30 + +image: + # -- Neondatabase image repository + repository: neondatabase/neon + # -- image pull policy + pullPolicy: IfNotPresent + # -- Overrides the image tag whose default is the chart appVersion. + tag: "3113" # replace me with "latest" when we release to prod once + +# -- Specify docker-registry secret names as an array +imagePullSecrets: [] + +# -- String to partially override neon-pg-sni-router.fullname template (will maintain the release name) +nameOverride: "" +# -- String to fully override neon-pg-sni-router.fullname template +fullnameOverride: "" + +# Neon proxy settings +settings: + # settings.destination -- append this domain zone to the transformed SNI hostname to get the destination address, e.g. "svc.cluster.local" + destination: "svc.cluster.local" + # settings.authEndpoint -- auth endpoint, e.g. "http://console.neon/authenticate_proxy_request/" + authEndpoint: "" + # settings.uri - psql session endpoint, e.g. "http://console.neon/psql_session/" + uri: "" + # settings.authBackend -- auth method used (console|link|postgres) + authBackend: "link" + # settings.domain -- domain used in TLS cert for client postgres connections + domain: "dummy" + # settings.sentryUrl -- url (will be converted into `SENTRY_DSN` environment variable) used by sentry to collect error/panic events in neon-pg-sni-router + sentryUrl: "" + # settings.sentryEnvironment -- "development" or "production". It will be visible in sentry in order to filter issues + sentryEnvironment: "development" + # settings.wssPort -- (int) numeric port used for wss/https connections. If null, wss server will not be started + wssPort: null + # settings.metricCollectionEndpoint -- (url) endpoint used to send metrics to. If null, metrics will not be sent. + metricCollectionEndpoint: "" + # settings.metricCollectionInterval -- (string) how often metrics should be sent. + metricCollectionInterval: "" + +serviceAccount: + # serviceAccount.create - Specifies whether a service account should be created + create: true + # serviceAccount.annotations -- Annotations to add to the service account + annotations: {} + # serviceAccount.name - The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + +# -- Annotations for neon-pg-sni-router pods +podAnnotations: {} + +# -- Additional labels for neon-pg-sni-router pods +podLabels: {} + # neon_service: proxy + # neon_env: staging + # neon_region: us-west-1 +# neon_region_slug: virginia + +# -- neon-pg-sni-router's pods Security Context +podSecurityContext: {} +# fsGroup: 2000 + +# -- container lifecycle hooks specification for neon-pg-sni-router container +containerLifecycle: {} + +# -- neon-pg-sni-router's containers Security Context +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true +# runAsUser: 1000 + +service: + # service.annotations -- Annotations to add to the service + annotations: {} + # service.type -- Service type + type: ClusterIP + # service.port -- Service management port + port: 7000 + # service.httpPort -- Http management port + httpPort: 9090 + +exposedService: + # exposedService.annotations -- Annotations to add to the exposed service + annotations: {} + # service.beta.kubernetes.io/aws-load-balancer-type: external + # service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: ip + # service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing + # external-dns.alpha.kubernetes.io/hostname: chart-example.local + # exposedService.type -- Exposed service type + type: LoadBalancer + # exposedService.port -- Exposed Service proxy port + port: 5432 + # exposedService.httpsPort -- (int) Exposed Service https port. If null, https server will not be exposed. + httpsPort: null + +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:'. + # + # resources.limits -- The resources limits for the container + # resources.requests The requested resources for the container + # + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m +# memory: 128Mi + +# -- Node labels for pod assignment. +nodeSelector: {} + +# -- Tolerations for pod assignment. +tolerations: [] + +# -- Affinity for pod assignment +affinity: {} + +metrics: + # metrics.enabled -- Enable prometheus metrcis autodiscovery + enabled: false + ## Prometheus Operator ServiceMonitor configuration + ## + serviceMonitor: + # metrics.serviceMonitor.enabled -- Create ServiceMonitor resource + enabled: false + + # metrics.serviceMonitor.namespace -- The namespace in which the ServiceMonitor will be created, if empty then Release.Namespace used + namespace: "" + + ## Interval at which metrics should be scraped. + ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint + ## + # metrics.serviceMonitor.interval -- Interval in which prometheus scrapes + interval: 10s + + ## Timeout after which the scrape is ended + ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint + ## + # metrics.serviceMonitor.scrapeTimeout -- Scrape Timeout duration for prometheus + scrapeTimeout: 10s + + ## ServiceMonitor selector labels + ## ref: https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack#prometheusioscrape + ## + # metrics.serviceMonitor.selector -- Additional labels to attach (used by Prometheus operator) + selector: {} + # selector: + # prometheus: neon +# -- Additional manifests that are created with the chart +extraManifests: []