-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fix upgrade path 3.3.x -> 4.0.x (#539)
* fix: Fix upgrade path 3.3.x -> 4.0.x * changelog * changelog * reword warning * reword warning * quote bash args * noop Co-authored-by: Xenia Fischer <[email protected]> * Add udgrade test --------- Co-authored-by: Xenia Fischer <[email protected]>
- Loading branch information
Showing
15 changed files
with
248 additions
and
65 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
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/upgrade/10-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,19 @@ | ||
--- | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestAssert | ||
timeout: 600 | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: postgresql | ||
labels: | ||
app.kubernetes.io/name: postgresql | ||
--- | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: postgresql | ||
status: | ||
readyReplicas: 1 | ||
replicas: 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,10 @@ | ||
--- | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
commands: | ||
- script: >- | ||
helm install postgresql | ||
--version={{ test_scenario['values']['postgres'] }} | ||
--namespace $NAMESPACE | ||
-f helm-bitnami-postgresql-values.yaml | ||
--repo https://charts.bitnami.com/bitnami postgresql |
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,19 @@ | ||
--- | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestAssert | ||
timeout: 600 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: hive-metastore-default | ||
labels: | ||
{% if test_scenario['values']['hive-old'].find(",") > 0 %} | ||
# Yes, this *might* not work with custom images, I'm sorry! | ||
app.kubernetes.io/version: "{{ test_scenario['values']['hive-old'].split(',')[0] }}-stackable0.0.0-dev" | ||
{% else %} | ||
app.kubernetes.io/version: "{{ test_scenario['values']['hive-old'] }}-stackable0.0.0-dev" | ||
{% endif %} | ||
status: | ||
readyReplicas: 1 | ||
replicas: 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,35 @@ | ||
--- | ||
apiVersion: hive.stackable.tech/v1alpha1 | ||
kind: HiveCluster | ||
metadata: | ||
name: hive | ||
spec: | ||
image: | ||
{% if test_scenario['values']['hive-old'].find(",") > 0 %} | ||
custom: "{{ test_scenario['values']['hive-old'].split(',')[1] }}" | ||
productVersion: "{{ test_scenario['values']['hive-old'].split(',')[0] }}" | ||
{% else %} | ||
productVersion: "{{ test_scenario['values']['hive-old'] }}" | ||
{% endif %} | ||
pullPolicy: IfNotPresent | ||
clusterConfig: | ||
database: | ||
connString: jdbc:postgresql://postgresql:5432/hive | ||
credentialsSecret: hive-credentials | ||
dbType: postgres | ||
{% if lookup('env', 'VECTOR_AGGREGATOR') %} | ||
vectorAggregatorConfigMapName: vector-aggregator-discovery | ||
{% endif %} | ||
metastore: | ||
roleGroups: | ||
default: | ||
replicas: 1 | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: hive-credentials | ||
type: Opaque | ||
stringData: | ||
username: hive | ||
password: hive |
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,19 @@ | ||
--- | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestAssert | ||
timeout: 600 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: hive-metastore-default | ||
labels: | ||
{% if test_scenario['values']['hive-old'].find(",") > 0 %} | ||
# Yes, this *might* not work with custom images, I'm sorry! | ||
app.kubernetes.io/version: "{{ test_scenario['values']['hive-new'].split(',')[0] }}-stackable0.0.0-dev" | ||
{% else %} | ||
app.kubernetes.io/version: "{{ test_scenario['values']['hive-new'] }}-stackable0.0.0-dev" | ||
{% endif %} | ||
status: | ||
readyReplicas: 1 | ||
replicas: 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,13 @@ | ||
--- | ||
apiVersion: hive.stackable.tech/v1alpha1 | ||
kind: HiveCluster | ||
metadata: | ||
name: hive | ||
spec: | ||
image: | ||
{% if test_scenario['values']['hive-new'].find(",") > 0 %} | ||
custom: "{{ test_scenario['values']['hive-new'].split(',')[1] }}" | ||
productVersion: "{{ test_scenario['values']['hive-new'].split(',')[0] }}" | ||
{% else %} | ||
productVersion: "{{ test_scenario['values']['hive-new'] }}" | ||
{% endif %} |
Oops, something went wrong.