Skip to content

Commit

Permalink
Include CRDs in the -o yaml --dry-run (#932)
Browse files Browse the repository at this point in the history
  • Loading branch information
alenkacz authored Oct 11, 2019
1 parent d81e57e commit 7ae2a6a
Show file tree
Hide file tree
Showing 2 changed files with 226 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/kudoctl/cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func (initCmd *initCmd) run() error {
if err != nil {
return err
}
mans = prereq
mans = append(mans, prereq...)

deploy, err := cmdInit.ManagerManifests(opts)
if err != nil {
Expand Down
225 changes: 225 additions & 0 deletions pkg/kudoctl/cmd/testdata/deploy-kudo.yaml.golden
Original file line number Diff line number Diff line change
@@ -1,3 +1,228 @@
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
app: kudo-manager
controller-tools.k8s.io: "1.0"
name: operators.kudo.dev
spec:
group: kudo.dev
names:
kind: Operator
plural: operators
singular: operator
scope: Namespaced
validation:
openAPIV3Schema:
properties:
apiVersion:
type: string
kind:
type: string
meta:
type: object
spec:
properties:
description:
type: string
kubernetesVersion:
type: string
kudoVersion:
type: string
maintainers:
items:
properties:
email:
type: string
name:
type: string
type: object
url:
type: string
type: object
status:
type: object
version: v1alpha1
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
app: kudo-manager
controller-tools.k8s.io: "1.0"
name: operatorversions.kudo.dev
spec:
group: kudo.dev
names:
kind: OperatorVersion
plural: operatorversions
singular: operatorversion
scope: Namespaced
validation:
openAPIV3Schema:
properties:
apiVersion:
type: string
kind:
type: string
meta:
type: object
spec:
properties:
connectionString:
description: ConnectionString defines a mustached string that can be
used to connect to an instance of the Operator
type: string
crdVersion:
type: string
dependencies:
items:
properties:
crdVersion:
description: 'Version captures the requirements for what versions
of the above object are allowed Example: ^3.1.4'
type: string
referenceName:
description: Name specifies the name of the dependency. Referenced
via this in defaults.config
type: string
required:
- referenceName
- crdVersion
type: object
type: array
operator:
type: object
parameters:
items:
properties:
default:
description: Default is a default value if no paramter is provided
by the instance
type: string
description:
description: Description captures a longer description of how
the variable will be used
type: string
displayName:
description: Human friendly crdVersion of the parameter name
type: string
name:
description: 'Name is the string that should be used in the template
file for example, if `name: COUNT` then using the variable `.Params.COUNT`'
type: string
required:
description: Required specifies if the parameter is required to
be provided by all instances, or whether a default can suffice
type: boolean
trigger:
description: Trigger identifies the plan that gets executed when
this parameter changes in the Instance object. Default is `update`
if present, or `deploy` if not present
type: string
type: object
type: array
plans:
description: Plans specify a map a plans that specify how to
type: object
tasks:
type: object
templates:
description: List of go templates YAML files that define the application
operator instance
type: object
upgradableFrom:
description: UpgradableFrom lists all OperatorVersions that can upgrade
to this OperatorVersion
items:
type: object
type: array
type: object
status:
type: object
version: v1alpha1
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
app: kudo-manager
controller-tools.k8s.io: "1.0"
name: instances.kudo.dev
spec:
group: kudo.dev
names:
kind: Instance
plural: instances
singular: instance
scope: Namespaced
validation:
openAPIV3Schema:
properties:
apiVersion:
type: string
kind:
type: string
meta:
type: object
spec:
properties:
OperatorVersion:
description: Operator specifies a reference to a specific Operator object
type: object
dependencies:
description: Dependency references specific
items:
properties:
crdVersion:
description: 'Version captures the requirements for what versions
of the above object are allowed Example: ^3.1.4'
type: string
referenceName:
description: Name specifies the name of the dependency. Referenced
via this in defaults.config
type: string
required:
- referenceName
- crdVersion
type: object
type: array
parameters:
type: object
type: object
status:
properties:
aggregatedStatus:
type: object
planStatus:
type: object
type: object
version: v1alpha1
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

---
apiVersion: v1
kind: Namespace
Expand Down

0 comments on commit 7ae2a6a

Please sign in to comment.