-
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.
Adding Ability to MergePatch CRDs properly (#488)
* adding ability to merge patch crds properly * added test for instance creation in an operator * added specific error case for UnsupportedMediaType StrategicMergePatch * added Kubernetes helper function and fixed linter * linter fix
- Loading branch information
1 parent
8de6e2e
commit 8f5f345
Showing
4 changed files
with
105 additions
and
2 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
50 changes: 50 additions & 0 deletions
50
test/integration/create-operator-in-operator/00-dream.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,50 @@ | ||
## Dream is the umbrella operator that tests the creation of instances within an operator | ||
apiVersion: kudo.k8s.io/v1alpha1 | ||
kind: Operator | ||
metadata: | ||
labels: | ||
controller-tools.k8s.io: "1.0" | ||
name: dream | ||
--- | ||
apiVersion: kudo.k8s.io/v1alpha1 | ||
kind: OperatorVersion | ||
metadata: | ||
labels: | ||
controller-tools.k8s.io: "1.0" | ||
name: dream-v1 | ||
spec: | ||
version: "1.0.0" | ||
connectionString: "" | ||
operator: | ||
name: dream | ||
kind: Operator | ||
templates: | ||
operator.yaml: | | ||
apiVersion: kudo.k8s.io/v1alpha1 | ||
kind: Instance | ||
metadata: | ||
name: operator | ||
spec: | ||
operatorVersion: | ||
kind: OperatorVersion | ||
name: test-operator-1.0 | ||
namespace: default | ||
parameters: | ||
REPLICAS: "0" | ||
tasks: | ||
operator: | ||
resources: | ||
- operator.yaml | ||
parameters: | ||
- name: Param | ||
description: "Sample parameter" | ||
default: "dream-in-a-dream" | ||
plans: | ||
deploy: | ||
strategy: serial | ||
phases: | ||
- name: dependencies | ||
steps: | ||
- name: operator | ||
tasks: | ||
- operator |
20 changes: 20 additions & 0 deletions
20
test/integration/create-operator-in-operator/01-assert.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: kudo.k8s.io/v1alpha1 | ||
kind: Instance | ||
metadata: | ||
name: dream1 | ||
status: | ||
status: COMPLETE | ||
--- | ||
apiVersion: kudo.k8s.io/v1alpha1 | ||
kind: Instance | ||
metadata: | ||
name: dream1-operator | ||
status: | ||
status: COMPLETE | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: dream1-operator-nginx | ||
spec: | ||
replicas: 0 |
11 changes: 11 additions & 0 deletions
11
test/integration/create-operator-in-operator/01-install.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,11 @@ | ||
apiVersion: kudo.k8s.io/v1alpha1 | ||
kind: Instance | ||
metadata: | ||
labels: | ||
controller-tools.k8s.io: "1.0" | ||
operator: dream | ||
name: dream1 | ||
spec: | ||
operatorVersion: | ||
name: dream-v1 | ||
kind: OperatorVersion |