Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move st2web-enterprise Helm chart templates to main 'stackstorm-enter…
…prise-ha' helm
- Loading branch information
armab
committed
Aug 23, 2018
1 parent
44189af
commit b0b3440
Showing
9 changed files
with
259 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,4 +19,3 @@ | |
.project | ||
.idea/ | ||
*.tmproj | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Congratulations! You have just deployed StackStorm Enterprise HA! | ||
|
||
1. Get the application URL by running these commands: | ||
|
||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services st2web-enterprise-{{ .Release.Name }}) | ||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") | ||
echo https://$NODE_IP:$NODE_PORT/ | ||
|
||
|
||
# TODO: 2. Login with the following credentials |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: st2-urls-{{ .Release.Name }} | ||
annotations: | ||
description: StackStorm service URLs, used across entire st2 cluster | ||
labels: | ||
chart: {{ .Chart.Name }}-{{ .Chart.Version }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
data: | ||
# TODO: Template service URLs based on '{{ .Release.Name }}' | ||
ST2_AUTH_URL: http://st2auth-enterprise:9100/ | ||
ST2_API_URL: http://st2api-enterprise:9101/ | ||
ST2_STREAM_URL: http://st2stream-enterprise:9102/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: st2web-enterprise-{{ .Release.Name }} | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: st2web | ||
tier: frontend | ||
vendor: stackstorm | ||
support: enterprise | ||
release: {{ .Release.Name }} | ||
replicas: {{ .Values.st2web.replicaCount }} | ||
template: | ||
metadata: | ||
labels: | ||
app: st2web | ||
tier: frontend | ||
vendor: stackstorm | ||
support: enterprise | ||
chart: {{ .Chart.Name }}-{{ .Chart.Version }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
spec: | ||
containers: | ||
- name: st2web-enterprise | ||
image: "{{ .Values.st2web.image.repository }}:{{ .Values.st2web.image.tag }}" | ||
imagePullPolicy: {{ .Values.st2web.image.pullPolicy }} | ||
ports: | ||
- containerPort: 443 | ||
# Probe to check if app is running. Failure will lead to a pod restart. | ||
livenessProbe: | ||
httpGet: | ||
scheme: HTTPS | ||
path: / | ||
port: 443 | ||
initialDelaySeconds: 1 | ||
# Probe to check if app is ready to serve traffic. Failure will lead to temp stop serving traffic. | ||
# TODO: Failing to add readinessProbe, since st2 requires authorization (401) and we don't have `/healthz` endpoints yet (https://github.com/StackStorm/st2/issues/4020) | ||
# readinessProbe: | ||
# httpGet: | ||
# # Probes can't check several endpoints, - this should be implemented on app side (@see https://www.ianlewis.org/en/using-kubernetes-health-checks) | ||
# # Also multiple liveness checks are not available (@see https://github.com/kubernetes/kubernetes/issues/37218) | ||
# # So checking ST2_API only | ||
# scheme: HTTPS | ||
# path: /api/ | ||
# port: 443 | ||
# initialDelaySeconds: 3 | ||
envFrom: | ||
- configMapRef: | ||
name: st2-urls-{{ .Release.Name }} | ||
optional: true | ||
volumeMounts: | ||
- name: st2web-ssl-cert | ||
mountPath: /etc/ssl/st2/ | ||
readOnly: true | ||
resources: | ||
{{ toYaml .Values.st2web.resources | indent 10 }} | ||
volumes: | ||
- name: st2web-ssl-cert | ||
secret: | ||
secretName: st2web-{{ .Release.Name }} | ||
items: | ||
- key: ssl_certificate | ||
path: st2.crt | ||
# 0400 file permission | ||
mode: 256 | ||
- key: ssl_certificate_key | ||
path: st2.key | ||
# 0400 file permission | ||
mode: 256 | ||
{{- with .Values.nodeSelector }} | ||
nodeSelector: | ||
{{ toYaml . | indent 8 }} | ||
{{- end }} | ||
{{- with .Values.affinity }} | ||
affinity: | ||
{{ toYaml . | indent 8 }} | ||
{{- end }} | ||
{{- with .Values.tolerations }} | ||
tolerations: | ||
{{ toYaml . | indent 8 }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# TODO: Research & add 'ingress' spec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: st2web-{{ .Release.Name }} | ||
annotations: | ||
description: SSL Certificate, used in nginx to serve StackStorm Web UI and services on HTTPS | ||
labels: | ||
app: st2web | ||
tier: frontend | ||
vendor: stackstorm | ||
support: enterprise | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" | ||
release: "{{ .Release.Name }}" | ||
heritage: "{{ .Release.Service }}" | ||
type: Opaque | ||
data: | ||
# SSL Certificate used for StackStorm Web UI in nginx (HTTPS) | ||
ssl_certificate: {{ required "A valid secret 'ssl_certificate' is required for st2web!" .Values.secrets.st2web.ssl_certificate | b64enc | quote }} | ||
# SSL Certificate private key used for StackStorm Web UI in nginx (HTTPS) | ||
ssl_certificate_key: {{ required "A valid secret 'ssl_certificate_key' is required for st2web!" .Values.secrets.st2web.ssl_certificate_key | b64enc | quote }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
kind: Service | ||
apiVersion: v1 | ||
metadata: | ||
name: st2web-enterprise-{{ .Release.Name }} | ||
annotations: | ||
description: StackStorm st2web, - an admin Web UI and main entry point for external API requests | ||
labels: | ||
app: st2web | ||
tier: frontend | ||
vendor: stackstorm | ||
support: enterprise | ||
chart: {{ .Chart.Name }}-{{ .Chart.Version }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
spec: | ||
selector: | ||
app: st2web | ||
tier: frontend | ||
vendor: stackstorm | ||
support: enterprise | ||
release: {{ .Release.Name }} | ||
# TODO: Consider to template it, if needed | ||
type: NodePort | ||
ports: | ||
- protocol: TCP | ||
port: 443 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters