Skip to content

Commit

Permalink
Apply operator-crds.yaml before creating custom resources
Browse files Browse the repository at this point in the history
Add command to create/apply operator-crds.yaml before
custom-resources.yaml (installation, etc) to ensure CRDs
are present.

With the recent changes to the operator to manage CRDs, they are
no longer included in the tigera-operator.yaml manifest, so there
might be timing issues where the installation and other custom
resources are attempted to be created before their definitions are
present in the cluster.
  • Loading branch information
coutinhop committed Jan 7, 2025
1 parent 9865677 commit 8e7a23f
Show file tree
Hide file tree
Showing 18 changed files with 36 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,10 @@ The geeky details of what you get:

1. Install any extra [$[prodname] resources](../../reference/resources/index.mdx) needed at cluster start using [calicoctl](../../reference/clis/calicoctl/overview.mdx).

1. Install the Tigera custom resources. For more information on configuration options available in this manifest, see [the installation reference](../../reference/installation/api.mdx).
1. Install the Tigera custom resource definitions and custom resources. For more information on configuration options available in this manifest, see [the installation reference](../../reference/installation/api.mdx).

```bash
kubectl create -f $[filesUrl]/manifests/operator-crds.yaml
kubectl create -f $[filesUrl]/manifests/custom-resources.yaml
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,10 @@ A Linux host that meets the following requirements.
curl -O -L $[filesUrl]/manifests/custom-resources.yaml
```

1. Install the Tigera custom resources. For more information on configuration options available in this manifest, see [the installation reference](../../../reference/installation/api.mdx).
1. Install the Tigera custom resource definitions and custom resources. For more information on configuration options available in this manifest, see [the installation reference](../../../reference/installation/api.mdx).

```bash
kubectl create -f $[filesUrl]/manifests/operator-crds.yaml
kubectl create -f $[filesUrl]/manifests/custom-resources.yaml
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,10 @@ The geeky details of what you get:

1. Install any extra [$[prodname] resources](../../reference/resources/index.mdx) needed at cluster start using [calicoctl](../../reference/clis/calicoctl/overview.mdx).

1. Install the Tigera custom resources. For more information on configuration options available in this manifest, see [the installation reference](../../reference/installation/api.mdx).
1. Install the Tigera custom resource definitions and custom resources. For more information on configuration options available in this manifest, see [the installation reference](../../reference/installation/api.mdx).

```bash
kubectl create -f $[filesUrl]/manifests/operator-crds.yaml
kubectl create -f $[filesUrl]/manifests/custom-resources.yaml
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,10 @@ The following steps will outline the installation of $[prodname] networking on t
:::
1. Apply the updated custom resources:
1. Apply the Tigera custom resource definitions and updated custom resources:
```bash
kubectl create -f $[filesUrl]/manifests/operator-crds.yaml
kubectl create -f custom-resources.yaml
```

Expand Down
3 changes: 2 additions & 1 deletion calico-enterprise/getting-started/manifest-archive.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@ In the patch release archive, navigate to the `manifests` folder.
kubectl create -f <your-local-directory-archive>/manifests/tigera-prometheus-operator.yaml
```

3. Install Tigera custom resources.
3. Install Tigera custom resource definitions and custom resources.

```bash
kubectl create -f <your-local-directory-archive>/manifests/operator-crds.yaml
kubectl create -f <your-local-directory-archive>/manifests/custom-resources.yaml
```

Expand Down
3 changes: 2 additions & 1 deletion calico-enterprise/multicluster/change-cluster-type.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,10 @@ If you wish to retain LogStorage data for your managed cluster, verify that the
kubectl delete managedcluster <managed-cluster-name>
```
1. Install the Tigera custom resources.
1. Install the Tigera custom resource definitions and custom resources.
For more information, see [the installation reference](../reference/installation/api.mdx).
```bash
kubectl apply -f $[filesUrl]/manifests/operator-crds.yaml
kubectl apply -f $[filesUrl]/manifests/custom-resources.yaml
```
1. Monitor the progress with the following command:
Expand Down
3 changes: 2 additions & 1 deletion calico-enterprise/operations/ebpf/install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,10 @@ spec:
variant: TigeraSecureEnterprise
```

Then apply the edited file:
Then apply the Tigera custom resource definitions and the edited file:

```bash
kubectl create -f $[filesUrl]/manifests/operator-crds.yaml
kubectl create -f custom-resources.yaml
```

Expand Down
3 changes: 2 additions & 1 deletion calico/getting-started/kubernetes/k3s/multi-node-install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,10 @@ Due to the large size of the CRD bundle, `kubectl apply` might exceed request li

:::

Install $[prodname] by creating the necessary custom resource. For more information on configuration options available in this manifest, see [the installation reference](../../../reference/installation/api.mdx).
Install $[prodname] by creating the necessary custom resource definitions and custom resource. For more information on configuration options available in this manifest, see [the installation reference](../../../reference/installation/api.mdx).

```bash
kubectl create -f $[manifestsUrl]/manifests/operator-crds.yaml
kubectl create -f $[manifestsUrl]/manifests/custom-resources.yaml
```

Expand Down
3 changes: 2 additions & 1 deletion calico/getting-started/kubernetes/k3s/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,10 @@ Due to the large size of the CRD bundle, `kubectl apply` might exceed request li

:::

2. Install $[prodname] by creating the necessary custom resource. For more information on configuration options available in this manifest, see [the installation reference](../../../reference/installation/api.mdx).
2. Install $[prodname] by creating the necessary custom resource definitions and custom resource. For more information on configuration options available in this manifest, see [the installation reference](../../../reference/installation/api.mdx).

```bash
kubectl create -f $[manifestsUrl]/manifests/operator-crds.yaml
kubectl create -f $[manifestsUrl]/manifests/custom-resources.yaml
```

Expand Down
3 changes: 2 additions & 1 deletion calico/getting-started/kubernetes/kind.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ dev-worker2 NotReady <none> 4m v1.25.0 172.18.0.3 <
kubectl create -f $[manifestsUrl]/manifests/tigera-operator.yaml
```

2. Install $[prodname] by creating the necessary custom resource. For more information on configuration options available in this manifest, see [the installation reference](../../reference/installation/api.mdx).
2. Install $[prodname] by creating the necessary custom resource definitions and custom resource. For more information on configuration options available in this manifest, see [the installation reference](../../reference/installation/api.mdx).

Check failure on line 87 in calico/getting-started/kubernetes/kind.mdx

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'prodname'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'prodname'?", "location": {"path": "calico/getting-started/kubernetes/kind.mdx", "range": {"start": {"line": 87, "column": 14}}}, "severity": "ERROR"}

:::note

Expand All @@ -94,6 +94,7 @@ if you have replaced `pod-network-cidr` you must change it in this file as well.
:::

```bash
kubectl create -f $[manifestsUrl]/manifests/operator-crds.yaml
kubectl create -f $[manifestsUrl]/manifests/custom-resources.yaml
```

Expand Down
3 changes: 2 additions & 1 deletion calico/getting-started/kubernetes/minikube.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ minikube start --cni=calico

:::

3. Install $[prodname] by creating the necessary custom resource. For more information on configuration options available in this manifest, see [the installation reference](../../reference/installation/api.mdx).
3. Install $[prodname] by creating the necessary custom resource definitions and custom resource. For more information on configuration options available in this manifest, see [the installation reference](../../reference/installation/api.mdx).

:::note

Expand All @@ -79,6 +79,7 @@ minikube start --cni=calico
:::

```bash
kubectl create -f $[manifestsUrl]/manifests/operator-crds.yaml
kubectl create -f $[manifestsUrl]/manifests/custom-resources.yaml
```

Expand Down
3 changes: 2 additions & 1 deletion calico/getting-started/kubernetes/nftables.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Installing $[prodname] in nftables mode provides a networking and network policy
:::
1. Install $[prodname] by creating the necessary custom resource. For more information on configuration options available in this manifest, see [the installation reference](../../reference/installation/api.mdx).
1. Install $[prodname] by creating the necessary custom resource definitions and custom resource. For more information on configuration options available in this manifest, see [the installation reference](../../reference/installation/api.mdx).

Check failure on line 107 in calico/getting-started/kubernetes/nftables.mdx

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'prodname'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'prodname'?", "location": {"path": "calico/getting-started/kubernetes/nftables.mdx", "range": {"start": {"line": 107, "column": 14}}}, "severity": "ERROR"}
```bash
cat > custom-resources.yaml <<EOF
Expand Down Expand Up @@ -132,6 +132,7 @@ Installing $[prodname] in nftables mode provides a networking and network policy
```
```bash
kubectl create -f $[manifestsUrl]/manifests/operator-crds.yaml
kubectl create -f custom-resources.yaml
```
Expand Down
3 changes: 2 additions & 1 deletion calico/getting-started/kubernetes/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,10 @@ The geeky details of what you get:

:::

1. Install $[prodname] by creating the necessary custom resource. For more information on configuration options available in this manifest, see [the installation reference](../../reference/installation/api.mdx).
1. Install $[prodname] by creating the necessary custom resource definitions and custom resource. For more information on configuration options available in this manifest, see [the installation reference](../../reference/installation/api.mdx).

Check failure on line 103 in calico/getting-started/kubernetes/quickstart.mdx

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'prodname'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'prodname'?", "location": {"path": "calico/getting-started/kubernetes/quickstart.mdx", "range": {"start": {"line": 103, "column": 14}}}, "severity": "ERROR"}

```
kubectl create -f $[manifestsUrl]/manifests/operator-crds.yaml
kubectl create -f $[manifestsUrl]/manifests/custom-resources.yaml
```

Expand Down
3 changes: 2 additions & 1 deletion calico/getting-started/kubernetes/rancher.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ The geeky details of what you get:

:::

1. Install $[prodname] by creating the necessary custom resource. For more information on configuration options available in this manifest, see [the installation reference](../../reference/installation/api.mdx).
1. Install $[prodname] by creating the necessary custom resource definitions and custom resource. For more information on configuration options available in this manifest, see [the installation reference](../../reference/installation/api.mdx).

Check failure on line 57 in calico/getting-started/kubernetes/rancher.mdx

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'prodname'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'prodname'?", "location": {"path": "calico/getting-started/kubernetes/rancher.mdx", "range": {"start": {"line": 57, "column": 14}}}, "severity": "ERROR"}

```
kubectl create -f $[manifestsUrl]/manifests/operator-crds.yaml
kubectl create -f $[manifestsUrl]/manifests/custom-resources.yaml
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ $[prodname] can also be installed using raw manifests as an alternative to the o

If you wish to customize the $[prodname] install, customize the downloaded custom-resources.yaml manifest locally.

1. Create the manifest to install $[prodname].
1. Create the custom resource definitions and the manifest to install $[prodname].

Check failure on line 57 in calico/getting-started/kubernetes/self-managed-onprem/onpremises.mdx

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'prodname'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'prodname'?", "location": {"path": "calico/getting-started/kubernetes/self-managed-onprem/onpremises.mdx", "range": {"start": {"line": 57, "column": 73}}}, "severity": "ERROR"}

```
kubectl create -f $[manifestsUrl]/manifests/operator-crds.yaml
kubectl create -f custom-resources.yaml
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,10 @@ worker-2 NotReady <none> 5s v1.17.2
curl $[manifestsUrl]/manifests/custom-resources.yaml -O
```
3. If you wish to customize the $[prodname] install, customize the downloaded custom-resources.yaml manifest. Then create the manifest to install $[prodname].
3. If you wish to customize the $[prodname] install, customize the downloaded custom-resources.yaml manifest. Then create the custem resource definitions and downloaded manifest to install $[prodname].

Check failure on line 204 in calico/getting-started/kubernetes/self-managed-public-cloud/gce.mdx

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'prodname'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'prodname'?", "location": {"path": "calico/getting-started/kubernetes/self-managed-public-cloud/gce.mdx", "range": {"start": {"line": 204, "column": 35}}}, "severity": "ERROR"}

Check failure on line 204 in calico/getting-started/kubernetes/self-managed-public-cloud/gce.mdx

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Vale.Terms] Use 'YAML' instead of 'yaml'. Raw Output: {"message": "[Vale.Terms] Use 'YAML' instead of 'yaml'.", "location": {"path": "calico/getting-started/kubernetes/self-managed-public-cloud/gce.mdx", "range": {"start": {"line": 204, "column": 96}}}, "severity": "ERROR"}

Check failure on line 204 in calico/getting-started/kubernetes/self-managed-public-cloud/gce.mdx

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'custem'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'custem'?", "location": {"path": "calico/getting-started/kubernetes/self-managed-public-cloud/gce.mdx", "range": {"start": {"line": 204, "column": 127}}}, "severity": "ERROR"}

Check failure on line 204 in calico/getting-started/kubernetes/self-managed-public-cloud/gce.mdx

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'prodname'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'prodname'?", "location": {"path": "calico/getting-started/kubernetes/self-managed-public-cloud/gce.mdx", "range": {"start": {"line": 204, "column": 192}}}, "severity": "ERROR"}
```bash
kubectl create -f $[manifestsUrl]/manifests/operator-crds.yaml
kubectl create -f custom-resources.yaml
```
Expand Down
3 changes: 2 additions & 1 deletion calico/getting-started/kubernetes/windows-calico/rancher.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,10 @@ The following steps will outline the installation of $[prodname] networking on t
:::
1. Apply the updated custom resources:
1. Apply the custom resource definitions and the updated custom resources:
```bash
kubectl create -f $[manifestsUrl]/manifests/operator-crds.yaml
kubectl create -f custom-resources.yaml
```

Expand Down
3 changes: 2 additions & 1 deletion calico/operations/ebpf/install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,10 @@ metadata:
spec: {}
```

Then apply the edited file:
Then apply the custom resource definitions and the edited file:

```bash
kubectl create -f $[manifestsUrl]/manifests/operator-crds.yaml
kubectl create -f custom-resources.yaml
```

Expand Down

0 comments on commit 8e7a23f

Please sign in to comment.