You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- CRD file names were previously of the form `<group>_<version>_<kind>_crd.yaml`. Now that CRD manifest `spec.version` is deprecated in favor of `spec.versions`, i.e. multiple versions can be specified in one CRD, CRD file names have the form `<full group>_<resource>_crd.yaml`. `<full group>` is the full group name of your CRD while `<group>` is the last subdomain of `<full group>`, ex. `foo.bar.com` vs `foo`. `<resource>` is the plural lower-caseCRDKind found at `spec.names.plural`.
Short: "Adds a Custom Resource Definition (CRD) and the Custom Resource (CR) files",
36
36
Long: `The operator-sdk add crd command will create a Custom Resource Definition (CRD) and the Custom Resource (CR) files for the specified api-version and kind.
Copy file name to clipboardExpand all lines: cmd/operator-sdk/scorecard/cmd.go
+1-1
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,7 @@ func NewCmd() *cobra.Command {
50
50
scorecardCmd.Flags().StringSlice(scplugins.CRManifestOpt, nil, "Path to manifest for Custom Resource (required) (specify flag multiple times for multiple CRs)")
51
51
scorecardCmd.Flags().String(scplugins.ProxyImageOpt, fmt.Sprintf("quay.io/operator-framework/scorecard-proxy:%s", strings.TrimSuffix(version.Version, "+git")), "Image name for scorecard proxy")
52
52
scorecardCmd.Flags().String(scplugins.ProxyPullPolicyOpt, "Always", "Pull policy for scorecard proxy image")
53
-
scorecardCmd.Flags().String(scplugins.CRDsDirOpt, scaffold.CRDsDir, "Directory containing CRDs (all CRD manifest filenames must have the suffix 'crd.yaml')")
**NOTE:** When running the Helm operator locally, the `up local` command will default to using the kubeconfig file specified by `$KUBECONFIG` with a fallback to `$HOME/.kube/config` if not set. In this case, the autogenerated RBAC definitions do not need to be applied to the cluster.
@@ -407,7 +407,7 @@ sed -i "" 's|REPLACE_IMAGE|quay.io/example/foo-operator:v0.0.1|g' deploy/operato
407
407
Deploy the foo-operator:
408
408
409
409
```sh
410
-
kubectl create -f deploy/crds/foo_v1alpha1_foo_crd.yaml # if CRD doesn't exist already
410
+
kubectl create -f deploy/crds/foo.example.com_foos_crd.yaml # if CRD doesn't exist already
Copy file name to clipboardExpand all lines: doc/operator-scope.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ Additionally the CustomResourceDefinition (CRD) scope can also be changed for cl
23
23
24
24
For each CRD that needs to be cluster-scoped, update its manifest to be cluster-scoped.
25
25
26
-
*`deploy/crds/<group>_<version>_<kind>_crd.yaml`
26
+
*`deploy/crds/<full group>_<resource>_crd.yaml`
27
27
* Set `spec.scope: Cluster`
28
28
29
29
To ensure that the CRD is always generated with `scope: Cluster`, add the tag `// +genclient:nonNamespaced` above the CRD's Go type defintion in `pkg/apis/<group>/<version>/<kind>_types.go`.
@@ -61,7 +61,7 @@ With the above changes the specified manifests should look as follows:
61
61
...
62
62
```
63
63
* `deploy/role_binding.yaml`:
64
-
```YAML
64
+
```YAML
65
65
kind: ClusterRoleBinding
66
66
apiVersion: rbac.authorization.k8s.io/v1
67
67
metadata:
@@ -75,7 +75,7 @@ With the above changes the specified manifests should look as follows:
0 commit comments