-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: env-overrides with tests (#550)
* implemented env-var merge and added an integration test * added unit test for env-overrides * formatting * linting * changelog * added indoc to cargo.lock * refactor: use merged rolegroup-config * make function stand-alone
- Loading branch information
Showing
18 changed files
with
477 additions
and
11 deletions.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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,11 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: LimitRange | ||
metadata: | ||
name: limit-request-ratio | ||
spec: | ||
limits: | ||
- type: "Container" | ||
maxLimitRequestRatio: | ||
cpu: 5 | ||
memory: 1 |
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,9 @@ | ||
{% if test_scenario['values']['openshift'] == 'true' %} | ||
# see https://github.com/stackabletech/issues/issues/566 | ||
--- | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
commands: | ||
- script: kubectl patch namespace $NAMESPACE -p '{"metadata":{"labels":{"pod-security.kubernetes.io/enforce":"privileged"}}}' | ||
timeout: 120 | ||
{% endif %} |
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 @@ | ||
--- | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestAssert | ||
{% if lookup('env', 'VECTOR_AGGREGATOR') %} | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: vector-aggregator-discovery | ||
{% endif %} |
9 changes: 9 additions & 0 deletions
9
tests/templates/kuttl/overrides/01-install-vector-aggregator-discovery-configmap.yaml.j2
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,9 @@ | ||
{% if lookup('env', 'VECTOR_AGGREGATOR') %} | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: vector-aggregator-discovery | ||
data: | ||
ADDRESS: {{ lookup('env', 'VECTOR_AGGREGATOR') }} | ||
{% endif %} |
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,12 @@ | ||
--- | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestAssert | ||
timeout: 600 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: test-zk-server-default | ||
status: | ||
readyReplicas: 1 | ||
replicas: 1 |
28 changes: 28 additions & 0 deletions
28
tests/templates/kuttl/overrides/10-install-zookeeper.yaml.j2
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,28 @@ | ||
--- | ||
apiVersion: zookeeper.stackable.tech/v1alpha1 | ||
kind: ZookeeperCluster | ||
metadata: | ||
name: test-zk | ||
spec: | ||
image: | ||
productVersion: "{{ test_scenario['values']['zookeeper-latest'] }}" | ||
pullPolicy: IfNotPresent | ||
{% if lookup('env', 'VECTOR_AGGREGATOR') %} | ||
clusterConfig: | ||
vectorAggregatorConfigMapName: vector-aggregator-discovery | ||
{% endif %} | ||
servers: | ||
config: | ||
logging: | ||
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} | ||
roleGroups: | ||
default: | ||
replicas: 1 | ||
--- | ||
apiVersion: zookeeper.stackable.tech/v1alpha1 | ||
kind: ZookeeperZnode | ||
metadata: | ||
name: test-znode | ||
spec: | ||
clusterRef: | ||
name: test-zk |
Oops, something went wrong.