Skip to content

Commit 9bfbb27

Browse files
Merge remote-tracking branch 'upstream/master' into inject-datastore-encryption-key
2 parents a24ac60 + 6d8e12a commit 9bfbb27

File tree

9 files changed

+73
-15
lines changed

9 files changed

+73
-15
lines changed

.circleci/config.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ version: 2.1
33
# Add additional CircleCI Orbs dependencies
44
orbs:
55
# https://circleci.com/orbs/registry/orb/circleci/kubernetes
6-
kubernetes: circleci/kubernetes@0.10.1
6+
kubernetes: circleci/kubernetes@0.11.0
77
# Pins Helm to v2.x
88
# TODO: Consider upgrading Helm to v3.0 (https://github.com/StackStorm/stackstorm-ha/issues/98)
99
# https://circleci.com/orbs/registry/orb/circleci/helm
10-
helm: circleci/[email protected].0
10+
helm: circleci/[email protected].3
1111
# https://circleci.com/orbs/registry/orb/ccpgames/minikube
1212
minikube: ccpgames/[email protected]
1313

@@ -17,7 +17,7 @@ jobs:
1717
working_directory: ~/stackstorm-ha
1818
docker:
1919
# Pin Helm to v2.x, see https://github.com/StackStorm/stackstorm-ha/issues/98
20-
- image: lachlanevenson/k8s-helm:v2.16.1
20+
- image: lachlanevenson/k8s-helm:v2.16.7
2121
steps:
2222
- checkout
2323
- run:
@@ -78,10 +78,17 @@ jobs:
7878
- kubernetes/install
7979
- minikube/minikube-install:
8080
# https://github.com/kubernetes/minikube/releases
81-
version: v1.5.2
81+
version: v1.10.1
82+
- run:
83+
name: Install dependencies
84+
command: |
85+
sudo apt update || true
86+
# K8s 1.18 requires conntrack
87+
# See: https://github.com/kubernetes/minikube/issues/7179
88+
sudo apt install -y conntrack
8289
- run:
8390
name: Create new K8s cluster
84-
command: sudo -E minikube start --vm-driver=none --cpus $(nproc) --memory 4096
91+
command: sudo -E minikube start --vm-driver=none
8592
environment:
8693
CHANGE_MINIKUBE_NONE_USER: true
8794
- helm/install-helm-on-cluster

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,25 @@
33
## In Development
44
* Allow injection of datastore key in cluster (#115) (by @AngryDeveloper)
55

6+
## v0.30.0
7+
* Pin st2 version to `v3.3dev` as a new latest development version (#129)
8+
* Migrate from `py2` `Ubuntu Xenial` to `py3` `Ubuntu Bionic` as a base StackStorm OS (StackStorm/st2-dockerfiles#16, #129)
9+
* Switch from MongoDB `3.4` to `4.0` for the mongodb-ha Helm chart (#129)
10+
* Update `etcd-operator` 3rd party chart from `0.10.0` to latest `0.10.3` (#129)
11+
* Update `rabbitmq-ha` 3rd party chart from `1.36.4` to `1.44.1` (#129)
12+
* Update `mongodb-replicaset` 3rd party chart from `3.9.6` to `3.14.0` (#129)
13+
* Update CI infrastructure env, run tests on updated Helm `v2.16.7`, latest minikube `v1.10.1` and K8s `1.18` (#129)
14+
15+
## v0.28.0
16+
* Added support for custom image repository (#131) (by @ytjohn)
17+
18+
## v0.27.0
19+
* Added support to toggle etcd-operator as a coordination backend (#127) (by @rrahman-nv)
20+
21+
## v0.26.0
22+
* Added custom annotations to sensorcontainer and actionrunner Pods (#123) (by @stefangusa)
23+
* Improve Helm values recommendations to configure 3rd party chart dependencies `rabbitmq-ha` and `mongodb-ha` in prod (#125) (by @stefangusa)
24+
625
## v0.25.0
726
* Change ingress name from `<release name>-ingress` to `<release name>-st2web-ingress`, useful when using `stackstorm-ha` as a requirement for another chart. (#112) (by @erenatas)
827
* Fix st2web ingress which should have been defined as an Integer instead of a String (#111) (by @erenatas)

Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
apiVersion: v1
22
# Update StackStorm version here to rely on other Docker images tags
3-
appVersion: 3.2dev
3+
appVersion: 3.3dev
44
name: stackstorm-ha
5-
version: 0.25.0
5+
version: 0.30.0
66
description: StackStorm K8s Helm Chart, optimized for running StackStorm in HA environment.
77
home: https://stackstorm.com/#product
88
icon: https://avatars1.githubusercontent.com/u/4969009

requirements.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
dependencies:
22
- name: rabbitmq-ha
3-
version: 1.36.4
3+
version: 1.44.1
44
repository: https://kubernetes-charts.storage.googleapis.com/
55
condition: rabbitmq-ha.enabled
66
- name: mongodb-replicaset
7-
version: 3.9.6
7+
version: 3.14.0
88
repository: https://kubernetes-charts.storage.googleapis.com/
99
alias: mongodb-ha
1010
condition: mongodb-ha.enabled
@@ -13,5 +13,7 @@ dependencies:
1313
repository: https://kubernetes-charts.storage.googleapis.com/
1414
condition: external-dns.enabled
1515
- name: etcd-operator
16-
version: 0.10.0
16+
version: 0.10.3
1717
repository: https://kubernetes-charts.storage.googleapis.com/
18+
condition: etcd-operator.enabled
19+

templates/_helpers.tpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ community
2323
{{- define "imageRepository" -}}
2424
{{- if required "Missing context '.Values.enterprise.enabled'!" .Values.enterprise.enabled -}}
2525
docker.stackstorm.com
26+
{{- else if .Values.image.repository -}}
27+
{{ .Values.image.repository }}
2628
{{- else -}}
2729
stackstorm
2830
{{- end -}}

templates/configmaps_st2-conf.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ data:
2020
st2.docker.conf: |
2121
[auth]
2222
api_url = http://{{ .Release.Name }}-st2api{{ template "enterpriseSuffix" . }}:9101/
23+
{{- if index .Values "etcd-operator" "enabled" }}
2324
[coordination]
2425
url = etcd://{{ index .Values "etcd-operator" "etcdCluster" "name" }}-client:2379
26+
{{- end }}
2527
{{- if index .Values "rabbitmq-ha" "enabled" }}
2628
[messaging]
2729
url = amqp://{{ required "rabbitmq-ha.rabbitmqUsername is required!" (index .Values "rabbitmq-ha" "rabbitmqUsername") }}:{{ required "rabbitmq-ha.rabbitmqPassword is required!" (index .Values "rabbitmq-ha" "rabbitmqPassword") }}@{{ .Release.Name }}-rabbitmq-ha-discovery:5672

templates/deployments.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,9 @@ spec:
880880
checksum/config: {{ include (print $.Template.BasePath "/configmaps_st2-conf.yaml") $ | sha256sum }}
881881
checksum/packs: {{ include (print $.Template.BasePath "/configmaps_packs.yaml") $ | sha256sum }}
882882
{{- if $.Values.secrets.st2.datastore_crypto_key }}
883-
checksum/datastore-key: {{ include (print $.Template.BasePath "/secrets_datastore_crypto_key.yaml") . | sha256sum }}
883+
checksum/datastore-key: {{ include (print $.Template.BasePath "/secrets_datastore_crypto_key.yaml") & | sha256sum }}
884+
{{- if .annotations }}
885+
{{ toYaml .annotations | indent 8 }}
884886
{{- end }}
885887
spec:
886888
imagePullSecrets:
@@ -1042,6 +1044,8 @@ spec:
10421044
checksum/ssh: {{ include (print $.Template.BasePath "/secrets_ssh.yaml") . | sha256sum }}
10431045
{{- if $.Values.secrets.st2.datastore_crypto_key }}
10441046
checksum/datastore-key: {{ include (print $.Template.BasePath "/secrets_datastore_crypto_key.yaml") . | sha256sum }}
1047+
{{- if .Values.st2actionrunner.annotations }}
1048+
{{ toYaml .Values.st2actionrunner.annotations | indent 8 }}
10451049
{{- end }}
10461050
spec:
10471051
{{- if .Values.st2actionrunner.hostAliases }}

tests/st2tests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ load "${BATS_HELPERS_DIR}/bats-file/load.bash"
77
@test 'st2 version deployed and python env are as expected' {
88
run st2 --version
99
assert_success
10-
# st2 3.1dev (7079635), on Python 2.7.12
10+
# st2 3.3dev (9ea417346), on Python 3.6.9
1111
assert_line --partial "st2 ${ST2_VERSION}"
12-
assert_line --partial 'on Python 2.7.12'
12+
assert_line --partial 'on Python 3.6.9'
1313
}
1414

1515
@test 'ST2_AUTH_URL service endpoint is accessible and working' {

values.yaml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
image:
88
# Image pull policy. Change to "IfNotPresent" when switching to stable images
99
pullPolicy: Always
10+
# st2 image repository. Set this to override the default ("stackstorm") or enterprise
11+
# docker image repository ("docker.stackstorm.com"). Applies to all st2 containers except
12+
# st2chatops and st2packs (which have their own override). This also does not impact
13+
# dependencies such as mongo or redis, which have their own helm chart settings.
14+
repository: ""
15+
1016

1117
##
1218
## StackStorm Enterprise settings (Optional)
@@ -108,6 +114,7 @@ st2:
108114
- name:
109115
livenessProbe: {}
110116
readinessProbe: {}
117+
annotations: {}
111118
# TODO: Find out recommended/default resources for this specific service (#5)
112119
resources: {}
113120
# Additional advanced settings to control pod/deployment placement
@@ -344,6 +351,7 @@ st2actionrunner:
344351
replicas: 5
345352
# TODO: Find out recommended/default resources for this specific service (#5)
346353
resources: {}
354+
annotations: {}
347355
# Additional advanced settings to control pod/deployment placement
348356
nodeSelector: {}
349357
tolerations: []
@@ -421,15 +429,16 @@ mongodb-ha:
421429
# Specify your external [database] connection parameters under st2.config
422430
enabled: true
423431
image:
424-
# StackStorm currently supports maximum MongoDB v3.4
425-
tag: 3.4
432+
# StackStorm currently supports maximum MongoDB v4.0
433+
tag: "4.0"
426434
auth:
427435
enabled: true
428436
# NB! It's highly recommended to change ALL defaults!
429437
adminUser: "admin"
430438
adminPassword: "XeL5Rxwj7F0Wt43tFZVTN7H8Sg5XDHmK"
431439
# Minimal key length is 6 symbols
432440
key: "82PItDpqroti5RngOA7UqbHH7c6bFUwy"
441+
resources: {}
433442

434443
##
435444
## RabbitMQ HA configuration (3rd party chart dependency)
@@ -444,6 +453,12 @@ rabbitmq-ha:
444453
rabbitmqUsername: admin
445454
# TODO: Use default random 24 character password, but need to fetch this string for use by downstream services
446455
rabbitmqPassword: 9jS+w1u07NbHtZke1m+jW4Cj
456+
# RabbitMQ Memory high watermark. See: http://www.rabbitmq.com/memory.html
457+
# Default values might not be enough for StackStorm deployment to work properly. We recommend to adjust these settings for you needs as well as enable Pod memory limits via "resources".
458+
#rabbitmqMemoryHighWatermark: 512MB
459+
#rabbitmqMemoryHighWatermarkType: absolute
460+
# Up to 255 character string, should be fixed so that re-deploying the chart does not fail (see: https://github.com/helm/charts/issues/12371)
461+
#rabbitmqErlangCookie: 8MrqQdCQ6AQ8U3MacSubHE5RqkSfvNaRHzvxuFcG
447462
persistentVolume:
448463
enabled: true
449464
# RabbitMQ application vhost, should match with 'ha' Queue Mirroring definition policy
@@ -452,6 +467,10 @@ rabbitmq-ha:
452467
# Enable Queue Mirroring between nodes
453468
# See https://www.rabbitmq.com/ha.html
454469
policies: '{"vhost":"/","name":"ha","pattern":"", "definition":{"ha-mode":"all","ha-sync-mode":"automatic","ha-sync-batch-size":10}}'
470+
# We recommend to set the memory limit for RabbitMQ-HA Pods in production deployments.
471+
# Make sure to also change the rabbitmqMemoryHighWatermark following the formula:
472+
# rabbitmqMemoryHighWatermark = 0.4 * resources.limits.memory
473+
resources: {}
455474

456475
##
457476
## Etcd HA configuration (3rd party chart dependency)
@@ -461,6 +480,9 @@ rabbitmq-ha:
461480
##
462481
etcd-operator:
463482
# we don't need backup & restore etcd for short-lived coordination operations
483+
# Change to `false` to disable in-cluster ectd deployment.
484+
# Specify your external [coordination] connection parameters under st2.config
485+
enabled: true
464486
deployments:
465487
backupOperator: false
466488
restoreOperator: false

0 commit comments

Comments
 (0)