Currently we generate a single file deploy/operator.yaml that has the CRD and deployment manifests:
$ cat deploy/operator.yaml
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: appservices.app.example.com
spec:
group: app.example.com
names:
kind: AppService
listKind: AppServiceList
plural: appservices
singular: appservice
scope: Namespaced
version: v1alpha1
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: app-operator
spec:
replicas: 1
template:
metadata:
labels:
name: app-operator
spec:
containers:
- name: app-operator
image: quay.io/coreos/operator-sdk-dev:app-operator
command:
- app-operator
The CRD is something that the user will only create once, but the operator Deployment is something the user might want to delete, edit and recreate multiple times.
For instance on my first run I forgot to specify the pull secret in the deployment manifest and had to edit the manifest and recreate it.
From a usability perspective it would be better to keep them as two separate files deploy/operator.yaml and deploy/<kind>-CRD.yaml and just specify in the README that the user should do the following:
$ kubectl create -f deploy/<kind>-CRD.yaml
$ kubectl -n <ns> -f deploy/operator.yaml
/cc @fanminshi @hongchaodeng
Currently we generate a single file
deploy/operator.yamlthat has the CRD and deployment manifests:The CRD is something that the user will only create once, but the operator Deployment is something the user might want to delete, edit and recreate multiple times.
For instance on my first run I forgot to specify the pull secret in the deployment manifest and had to edit the manifest and recreate it.
From a usability perspective it would be better to keep them as two separate files
deploy/operator.yamlanddeploy/<kind>-CRD.yamland just specify in the README that the user should do the following:/cc @fanminshi @hongchaodeng