etcd-operator icon indicating copy to clipboard operation
etcd-operator copied to clipboard

installing crd manually

Open ldelossa opened this issue 5 years ago • 4 comments

Hello,

I want to run etcd-operator in a multitent fashion. I'd like a service account, role, and role binding all scoped to a tenant dub'd namespace. This involves me telling the operator not to install the CRD. How can the k8s administrator install the CRD manually a head of time, and the namespace scoped operator utilize the installed CRD.

ldelossa avatar Mar 29 '19 02:03 ldelossa

docker run --rm quay.io/coreos/etcd-operator:v0.9.4 etcd-operator --help 2>&1 | grep -i CRD
  -create-crd
    	The operator will not create the EtcdCluster CRD when this flag is set to false. (default true)

alex-goncharov avatar Apr 19 '19 13:04 alex-goncharov

I think @ldelossa wants to install the CRD without running etcd-operator, as I do. This is because getting etcd-operator to install the CRD requires that it has a ClusterRole, which we don't want to grant it. Also, there are some environments in which it's necessary to install the CRD in advance.

RJPercival avatar Jun 27 '19 15:06 RJPercival

This is what it installs....

apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: etcdclusters.etcd.database.coreos.com
spec:
  conversion:
    strategy: None
  group: etcd.database.coreos.com
  names:
    kind: EtcdCluster
    listKind: EtcdClusterList
    plural: etcdclusters
    shortNames:
    - etcd
    singular: etcdcluster
  preserveUnknownFields: true
  scope: Namespaced
  versions:
  - name: v1beta2
    served: true
    storage: true

laurelnaiad avatar Jan 19 '20 16:01 laurelnaiad

Yes, as a workaround I've extracted that and install it manually before deploying etcd-operator. However, this isn't foolproof, as any future changes to the CRD wouldn't be included, and so deployment could fail.

RJPercival avatar Jan 20 '20 08:01 RJPercival