Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include CRDs in the -o yaml --dry-run #932

Merged
merged 2 commits into from
Oct 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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