-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Expanded upgrade test ** Install KUDO 0.11.1 ** Install a simple operator with a version 0.1.0 ** Upgrade KUDO current version ** Upgrade the operator to a version 0.2.0 ** Uninstall KUDO with kudo init --upgrade --dry-run --output yaml | kubectl delete -f - Signed-off-by: Andreas Neumann <aneumann@mesosphere.com>
- Loading branch information
1 parent
b8f7233
commit 9e56ebc
Showing
18 changed files
with
198 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,3 +68,4 @@ tags | |
[._]*.un~ | ||
kubeconfig | ||
.kube | ||
/test/upgrade/upgrade-to-current/old-kudo |
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 |
---|---|---|
@@ -1,13 +1,18 @@ | ||
apiVersion: kudo.dev/v1beta1 | ||
kind: Instance | ||
metadata: | ||
name: simple-op | ||
spec: | ||
operatorVersion: | ||
name: simple-op-0.1.0 | ||
status: | ||
planStatus: | ||
deploy: | ||
status: COMPLETE | ||
--- | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app: kudo-manager | ||
control-plane: controller-manager | ||
name: kudo-controller-manager | ||
namespace: kudo-system | ||
name: nginx-deployment | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- image: kudobuilder/controller:test | ||
replicas: 2 |
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,5 @@ | ||
apiVersion: kudo.dev/v1beta1 | ||
kind: TestStep | ||
commands: | ||
- command: ./old-kudo install --instance simple-op ./simple-op-0.1.0 | ||
namespaced: true |
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: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
labels: | ||
app: kudo-manager | ||
control-plane: controller-manager | ||
name: kudo-controller-manager | ||
namespace: kudo-system | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- image: kudobuilder/controller:test |
2 changes: 1 addition & 1 deletion
2
...pgrade/upgrade-to-current/01-upgrade.yaml → ...e/upgrade-to-current/02-upgrade-kudo.yaml
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
apiVersion: kudo.dev/v1beta1 | ||
kind: TestStep | ||
commands: | ||
- command: kubectl kudo init -v 4 --upgrade --kudo-image kudobuilder/controller:test --kudo-image-pull-policy IfNotPresent --unsafe-self-signed-webhook-ca | ||
- command: kubectl kudo init -v 4 --upgrade --kudo-image kudobuilder/controller:test --kudo-image-pull-policy IfNotPresent --unsafe-self-signed-webhook-ca --wait |
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,22 @@ | ||
apiVersion: kudo.dev/v1beta1 | ||
kind: Instance | ||
metadata: | ||
name: simple-op | ||
spec: | ||
operatorVersion: | ||
name: simple-op-0.2.0 | ||
status: | ||
planStatus: | ||
deploy: | ||
status: COMPLETE | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: nginx-deployment | ||
spec: | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
fixedLabel: fixedvalue |
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,5 @@ | ||
apiVersion: kudo.dev/v1beta1 | ||
kind: TestStep | ||
commands: | ||
- command: kubectl kudo upgrade ./simple-op-0.2.0 --instance simple-op -p replicas=1 -p unchangeable=fixedvalue | ||
namespaced: true |
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,26 @@ | ||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: instances.kudo.dev | ||
spec: | ||
group: kudo.dev | ||
names: | ||
kind: Instance | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: operators.kudo.dev | ||
spec: | ||
group: kudo.dev | ||
names: | ||
kind: Operator | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: operatorversions.kudo.dev | ||
spec: | ||
group: kudo.dev | ||
names: | ||
kind: OperatorVersion |
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,4 @@ | ||
apiVersion: kudo.dev/v1beta1 | ||
kind: TestStep | ||
commands: | ||
- script: kubectl kudo init --upgrade --kudo-image kudobuilder/controller:test --kudo-image-pull-policy IfNotPresent --unsafe-self-signed-webhook-ca --dry-run --output yaml | tee output.log | kubectl delete -f - |
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
24 changes: 24 additions & 0 deletions
24
test/upgrade/upgrade-to-current/simple-op-0.1.0/operator.yaml
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,24 @@ | ||
apiVersion: kudo.dev/v1beta1 | ||
name: "simple-op" | ||
operatorVersion: "0.1.0" | ||
kubernetesVersion: 1.13.0 | ||
maintainers: | ||
- name: Your name | ||
email: <your@email.com> | ||
url: https://kudo.dev | ||
tasks: | ||
- name: app | ||
kind: Apply | ||
spec: | ||
resources: | ||
- deployment.yaml | ||
plans: | ||
deploy: | ||
strategy: serial | ||
phases: | ||
- name: main | ||
strategy: parallel | ||
steps: | ||
- name: everything | ||
tasks: | ||
- app |
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,5 @@ | ||
apiVersion: kudo.dev/v1beta1 | ||
parameters: | ||
- name: replicas | ||
description: Number of replicas that should be run as part of the deployment | ||
default: 2 |
19 changes: 19 additions & 0 deletions
19
test/upgrade/upgrade-to-current/simple-op-0.1.0/templates/deployment.yaml
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: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: nginx-deployment | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: nginx | ||
replicas: {{ .Params.replicas }} # tells deployment to run 2 pods matching the template | ||
template: | ||
metadata: | ||
labels: | ||
app: nginx | ||
spec: | ||
containers: | ||
- name: nginx | ||
image: nginx:1.7.9 | ||
ports: | ||
- containerPort: 80 |
24 changes: 24 additions & 0 deletions
24
test/upgrade/upgrade-to-current/simple-op-0.2.0/operator.yaml
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,24 @@ | ||
apiVersion: kudo.dev/v1beta1 | ||
name: "simple-op" | ||
operatorVersion: "0.2.0" | ||
kubernetesVersion: 1.15.0 | ||
maintainers: | ||
- name: Your name | ||
email: <your@email.com> | ||
url: https://kudo.dev | ||
tasks: | ||
- name: app | ||
kind: Apply | ||
spec: | ||
resources: | ||
- deployment.yaml | ||
plans: | ||
deploy: | ||
strategy: serial | ||
phases: | ||
- name: main | ||
strategy: parallel | ||
steps: | ||
- name: everything | ||
tasks: | ||
- app |
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 @@ | ||
apiVersion: kudo.dev/v1beta1 | ||
parameters: | ||
- name: replicas | ||
description: Number of replicas that should be run as part of the deployment | ||
default: 2 | ||
- name: unchangeable | ||
description: An unchangeable parameter | ||
required: true | ||
immutable: true |
20 changes: 20 additions & 0 deletions
20
test/upgrade/upgrade-to-current/simple-op-0.2.0/templates/deployment.yaml
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,20 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: nginx-deployment | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: nginx | ||
replicas: {{ .Params.replicas }} # tells deployment to run 2 pods matching the template | ||
template: | ||
metadata: | ||
labels: | ||
app: nginx | ||
fixedLabel: {{ .Params.unchangeable }} | ||
spec: | ||
containers: | ||
- name: nginx | ||
image: nginx:1.7.9 | ||
ports: | ||
- containerPort: 80 |