-
Notifications
You must be signed in to change notification settings - Fork 332
[DO NOT MERGE] add roman chart #2935
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
27aa1cc
f210fc3
401732d
91aee1a
5342ca0
7761be5
7330075
7f748a9
be72507
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Roman charts are now available. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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/ |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,24 @@ | ||||||
| apiVersion: v2 | ||||||
| name: roman | ||||||
| description: A Helm chart for Kubernetes | ||||||
|
|
||||||
| # A chart can be either an 'application' or a 'library' chart. | ||||||
| # | ||||||
| # Application charts are a collection of templates that can be packaged into versioned archives | ||||||
| # to be deployed. | ||||||
| # | ||||||
| # Library charts provide useful utilities or functions for the chart developer. They're included as | ||||||
| # a dependency of application charts to inject those utilities and functions into the rendering | ||||||
| # pipeline. Library charts do not define any templates and therefore cannot be deployed. | ||||||
| type: application | ||||||
|
|
||||||
| # This is the chart version. This version number should be incremented each time you make changes | ||||||
| # to the chart and its templates, including the app version. | ||||||
| # Versions are expected to follow Semantic Versioning (https://semver.org/) | ||||||
| version: 0.1.0 | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| # This is the version number of the application being deployed. This version number should be | ||||||
| # incremented each time you make changes to the application. Versions are not expected to | ||||||
| # follow Semantic Versioning. They should reflect the version the application is using. | ||||||
| # It is recommended to use it with quotes. | ||||||
| appVersion: "1.16.0" | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| This is the helm chart for deploying Roman(https://github.com/wireapp/roman) | ||
|
|
||
| Edit the values.yaml file and put required configuration. | ||
|
|
||
| Refer to the Roman repo README file for details on all the variables. | ||
|
|
||
| Also, Roman needs a PostgreSQL database, for the test purpose you can create a PostgreSQL deployment by using the bitnami/postgresql wrapper available at charts/postgresql |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| {{/* | ||
| Expand the name of the chart. | ||
| */}} | ||
| {{- define "roman.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 "roman.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 "roman.chart" -}} | ||
| {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Common labels | ||
| */}} | ||
| {{- define "roman.labels" -}} | ||
| helm.sh/chart: {{ include "roman.chart" . }} | ||
| {{ include "roman.selectorLabels" . }} | ||
| {{- if .Chart.AppVersion }} | ||
| app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
| {{- end }} | ||
| app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Selector labels | ||
| */}} | ||
| {{- define "roman.selectorLabels" -}} | ||
| app.kubernetes.io/name: {{ include "roman.name" . }} | ||
| app.kubernetes.io/instance: {{ .Release.Name }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Create the name of the service account to use | ||
| */}} | ||
| {{- define "roman.serviceAccountName" -}} | ||
| {{- if .Values.serviceAccount.create }} | ||
| {{- default (include "roman.fullname" .) .Values.serviceAccount.name }} | ||
| {{- else }} | ||
| {{- default "default" .Values.serviceAccount.name }} | ||
| {{- end }} | ||
| {{- end }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: roman | ||
| labels: | ||
| app: roman | ||
| spec: | ||
| replicas: {{ .Values.roman.replicaCount }} | ||
| selector: | ||
| matchLabels: | ||
| app: roman | ||
| template: | ||
| metadata: | ||
| labels: | ||
| app: roman | ||
| spec: | ||
| containers: | ||
| - name: roman | ||
| image: "{{ .Values.roman.image.repository }}:{{ .Values.roman.image.tag | default .Chart.AppVersion }}" | ||
| imagePullPolicy: IfNotPresent | ||
|
|
||
| ports: | ||
| - containerPort: 8080 | ||
| protocol: TCP | ||
| - containerPort: 8081 | ||
| protocol: TCP | ||
| - containerPort: 8082 | ||
| protocol: TCP | ||
|
|
||
| env: | ||
| - name: APP_KEY | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: "roman-secrets" | ||
| key: appKey | ||
|
|
||
| - name: ROMAN_PUB_KEY_BASE64 | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: "roman-secrets" | ||
| key: pubKeyBase64 | ||
|
|
||
| - name: PROXY_DOMAIN | ||
| value: "{{- if .Values.roman.proxyDomain }} {{ .Values.roman.proxyDomain }} {{- end }}" | ||
|
|
||
| - name: DB_URL | ||
| value: "{{ required "Must specify dbURL" .Values.roman.dbURL }}" | ||
|
|
||
| - name: WIRE_API_HOST | ||
| value: "{{ required "Must specify wireApiHost" .Values.roman.wireApiHost }}" | ||
|
|
||
| - name: DB_USER | ||
| value: "{{ required "Must specify dbUser" .Values.roman.dbUser }}" | ||
|
|
||
| - name: DB_PASSWORD | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: "roman-secrets" | ||
| key: dbPassword | ||
|
|
||
| startupProbe: | ||
| httpGet: | ||
| path: /api/status | ||
| port: 8080 | ||
| failureThreshold: 6 | ||
| periodSeconds: 5 | ||
|
|
||
| livenessProbe: | ||
| httpGet: | ||
| path: /api/status | ||
| port: 8080 | ||
|
|
||
| readinessProbe: | ||
| httpGet: | ||
| path: /api/status | ||
| port: 8080 | ||
|
|
||
| resources: | ||
| requests: | ||
| memory: "1500Mi" | ||
| cpu: 50m | ||
| limits: | ||
| memory: "1500Mi" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| apiVersion: extensions/v1beta1 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please change the ingress apiVersion for maximum kubernetes version compatibility as done in #3002: add some function to _helpers.tpl and adjust the ingress.yaml in the same fashion as done in that PR for other charts, e.g. the nginx-ingress-services one. |
||
| kind: Ingress | ||
| metadata: | ||
| name: roman | ||
| labels: | ||
| app: roman | ||
| annotations: | ||
| kubernetes.io/ingress.class: nginx | ||
| nginx.ingress.kubernetes.io/enable-cors: "true" | ||
| spec: | ||
| tls: | ||
| - hosts: | ||
| - "{{ required "Must specify host" .Values.roman.publicURL }}" | ||
| # secretName: "{{ include "roman.fullname" . }}" | ||
| rules: | ||
| - host: "{{ .Values.roman.publicURL }}" | ||
| http: | ||
| paths: | ||
| - path: / | ||
| pathType: Prefix | ||
| backend: | ||
| serviceName: roman | ||
| servicePort: 80 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| {{- if .Values.tls.issuerRef -}} | ||
| {{- if or .Values.tls.key .Values.tls.crt }} | ||
| {{- fail "ingress.issuer and ingress.{crt,key} are mutually exclusive" -}} | ||
| {{- end -}} | ||
| apiVersion: cert-manager.io/v1 | ||
| kind: Certificate | ||
| metadata: | ||
| name: roman | ||
| labels: | ||
| app: roman | ||
| spec: | ||
| dnsNames: | ||
| - {{ .Values.roman.publicURL }} | ||
| secretName: "{{ include "roman.fullname" . }}" | ||
| issuerRef: | ||
| {{- toYaml .Values.tls.issuerRef | nindent 4 }} | ||
| privateKey: | ||
| rotationPolicy: Always | ||
| algorithm: ECDSA | ||
| size: 384 | ||
| {{- else if and .Values.tls.key .Values.tls.crt -}} | ||
| apiVersion: v1 | ||
| kind: Secret | ||
| metadata: | ||
| name: "{{ include "roman.fullname" . }}" | ||
| labels: | ||
| app: roman | ||
| type: kubernetes.io/tls | ||
| data: | ||
| tls.key: {{ required "tls.key is required" .Values.tls.key | b64enc }} | ||
| tls.crt: {{ required "tls.crt is required" .Values.tls.crt | b64enc }} | ||
| {{- else -}} | ||
| {{- fail "must specify tls.key and tls.crt , or tls.issuerRef" -}} | ||
| {{- end -}} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| apiVersion: v1 | ||
| kind: Secret | ||
| metadata: | ||
| name: "roman-secrets" | ||
| type: Opaque | ||
| data: | ||
| appKey: "{{ required "Must specify serviceToken" .Values.roman.appKey | b64enc }}" | ||
| dbPassword: "{{ required "Must specify dbPassword" .Values.roman.dbPassword | b64enc }}" | ||
| pubKeyBase64: "{{ required "Must specify dbPassword" .Values.roman.pubKeyBase64 | b64enc }}" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: roman | ||
| labels: | ||
| app: roman | ||
| spec: | ||
| type: ClusterIP | ||
| ports: | ||
| - port: 80 | ||
| targetPort: 8080 | ||
| protocol: TCP | ||
| name: http | ||
| selector: | ||
| app: roman |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # Default values for roman. | ||
| # This is a YAML-formatted file. | ||
| # Declare variables to be passed into your templates. | ||
|
|
||
| roman: | ||
| replicaCount: 1 | ||
| image: | ||
| repository: quay.io/wire/roman | ||
| # Overrides the image tag whose default is the chart appVersion. | ||
| tag: staging | ||
| serviceToken: # Provide the roman service token. | ||
| # randomly generated for local testing | ||
| appKey: b53181dd-6400-4960-8988-f775545588ff-0949f503-421e-4588-a2c5-f64fd9c180fd | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would comment out most of these variables. It's useful for people installing the chart to have an idea of what an example value looks like; but it's not a good idea if people mistakenly use these default values as they forget to override them. It would be better to have the chart fail to install if a variable is missing. |
||
| wireApiHost: https://nginz-https.example.com | ||
| proxyDomain: | ||
| # random base 64 string used as certificate, replace with real one | ||
| pubKeyBase64: LS0tLS1CRUdJTiBQVcFQvWjcKMlczd1A1TzJveFVCTElDIEtFWS0tLS0tCg== | ||
| publicURL: roman.example.com # Link to the subdomain pointing to roman. | ||
| dbURL: jdbc:postgresql://postgresql:5432/externalPostgresql # Link to your Postgres server. | ||
| dbUser: # Provide your Postgres DB username. | ||
| dbPassword: # Provide your Postgres DB password. | ||
|
|
||
| tls: | ||
| issuerRef: | ||
| name: letsencrypt-http01 | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.