Skip to content

Commit

Permalink
install|doc|tests/e2e: Update operator version
Browse files Browse the repository at this point in the history
In order to switch to `main` kata-containers payload we need to
switch to use the latest operator. There isn't a released version of it yet that supports
the peer pods and nydus-snapshotter changes required,
so switch to the latest branch for now

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
  • Loading branch information
stevenhorsman authored and wainersm committed May 17, 2024
1 parent ced41b0 commit a5e37f4
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/cloud-api-adaptor/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ image-with-arch: .git-commit ## Build the per arch image
.PHONY: deploy
deploy: ## Deploy cloud-api-adaptor using the operator, according to install/overlays/$(CLOUD_PROVIDER)/kustomization.yaml file.
ifneq ($(CLOUD_PROVIDER),)
kubectl apply -k "github.com/confidential-containers/operator/config/release?ref=v0.8.0"
kubectl apply -k "github.com/confidential-containers/operator/config/samples/ccruntime/peer-pods?ref=v0.8.0"
kubectl apply -k "github.com/confidential-containers/operator/config/default"
kubectl apply -k "github.com/confidential-containers/operator/config/samples/ccruntime/peer-pods"
kubectl apply -k install/overlays/$(CLOUD_PROVIDER)
else
$(error CLOUD_PROVIDER is not set)
Expand Down
28 changes: 21 additions & 7 deletions src/cloud-api-adaptor/install/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

If using AWS, create VPC and AMI. Similarly for other providers create the
necessary resources.

* **Setup Kubernetes cluster in the cloud**

At least one node in the cluster must have the "worker" role.
Expand All @@ -19,7 +19,7 @@
```

If "worker" role is missing, execute the following command to set the role.

```
export NODENAME=<node-name>
kubectl label node $NODENAME node.kubernetes.io/worker=
Expand Down Expand Up @@ -56,16 +56,30 @@ Alternatively the manual approach, if you want to pick a specific CoCo release/r

- Deploy the CoCo operator

- Follow the instructions in the ["Deploy the Operator" section](https://github.com/confidential-containers/operator/blob/main/docs/INSTALL.md#deploy-the-operator) of the CoCo Operator's INSTALL.md file.
<!-- TODO - uncomment when 0.9 is released
- Either deploy a release version of the peer pods enabled CoCo operator, by running the following command where
`<RELEASE_VERSION>` needs to be substituted with the desired [release tag](https://github.com/confidential-containers/operator/tags):
> **Note:** the release version needs to be `v0.9.0` or after
```
export RELEASE_VERSION=<RELEASE_VERSION>
kubectl apply -k github.com/confidential-containers/operator/config/overlays/peerpods/default?ref=<RELEASE_VERSION>
```
- Alternatively i-->
- Install the latest development version with:
```
kubectl apply -k "github.com/confidential-containers/operator/config/default"
```

- Create the peer pods variant of the CC custom resource to install the required pieces of CC and create the `kata-remote` `RuntimeClass`
- Again, either deploy a release version of the Confidential Containers peer pod customer resource with, by running the following command where `<RELEASE_VERSION>` needs to be substituted with the desired [release tag](https://github.com/confidential-containers/operator/tags):
> **Note:** the release version needs to be `v0.6.0` or after
<!-- TODO - uncomment when 0.9 is released
- Either deploy a release version of the Confidential Containers peer pod customer resource with, by running the following command where `<RELEASE_VERSION>` needs to be substituted with the desired [release tag](https://github.com/confidential-containers/operator/tags):
> **Note:** the release version needs to be `v0.9.0` or after
```
export RELEASE_VERSION=<RELEASE_VERSION>
kubectl apply -k github.com/confidential-containers/operator/config/samples/ccruntime/peer-pods?ref=<RELEASE_VERSION>
```
- Alternatively install the latest development version with:
- Alternatively i-->
- Install the latest development version with:
```
kubectl apply -k "github.com/confidential-containers/operator/config/samples/ccruntime/peer-pods"
```
Expand Down Expand Up @@ -96,7 +110,7 @@ Alternatively the manual approach, if you want to pick a specific CoCo release/r
```
A successful install should show all the PODs with "Running" status under the `confidential-containers-system`
namespace.

```
NAME READY STATUS RESTARTS AGE
cc-operator-controller-manager-546574cf87-phbdv 2/2 Running 0 43m
Expand Down
8 changes: 4 additions & 4 deletions src/cloud-api-adaptor/test/provisioner/provision.go
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ func (p *CloudAPIAdaptor) Delete(ctx context.Context, cfg *envconf.Config) error
}

log.Info("Uninstall CCRuntime CRD")
cmd := exec.Command("kubectl", "delete", "-k", "github.com/confidential-containers/operator/config/samples/ccruntime/peer-pods?ref=v0.8.0")
cmd := exec.Command("kubectl", "delete", "-k", "github.com/confidential-containers/operator/config/samples/ccruntime/peer-pods")
cmd.Env = append(os.Environ(), fmt.Sprintf("KUBECONFIG="+cfg.KubeconfigFile()))
stdoutStderr, err := cmd.CombinedOutput()
log.Tracef("%v, output: %s", cmd, stdoutStderr)
Expand All @@ -475,7 +475,7 @@ func (p *CloudAPIAdaptor) Delete(ctx context.Context, cfg *envconf.Config) error
deployments := &appsv1.DeploymentList{Items: []appsv1.Deployment{*p.controllerDeployment}}

log.Info("Uninstall the controller manager")
cmd = exec.Command("kubectl", "delete", "-k", "github.com/confidential-containers/operator/config/release?ref=v0.8.0")
cmd = exec.Command("kubectl", "delete", "-k", "github.com/confidential-containers/operator/config/default")
cmd.Env = append(os.Environ(), fmt.Sprintf("KUBECONFIG="+cfg.KubeconfigFile()))
stdoutStderr, err = cmd.CombinedOutput()
log.Tracef("%v, output: %s", cmd, stdoutStderr)
Expand Down Expand Up @@ -522,7 +522,7 @@ func (p *CloudAPIAdaptor) Deploy(ctx context.Context, cfg *envconf.Config, props

log.Info("Install the controller manager")
// TODO - find go idiomatic way to apply/delete remote kustomize and apply to this file
cmd := exec.Command("kubectl", "apply", "-k", "github.com/confidential-containers/operator/config/release?ref=v0.8.0")
cmd := exec.Command("kubectl", "apply", "-k", "github.com/confidential-containers/operator/config/default")
cmd.Env = append(os.Environ(), fmt.Sprintf("KUBECONFIG="+cfg.KubeconfigFile()))
stdoutStderr, err := cmd.CombinedOutput()
log.Tracef("%v, output: %s", cmd, stdoutStderr)
Expand All @@ -541,7 +541,7 @@ func (p *CloudAPIAdaptor) Deploy(ctx context.Context, cfg *envconf.Config, props
return err
}

cmd = exec.Command("kubectl", "apply", "-k", "github.com/confidential-containers/operator/config/samples/ccruntime/peer-pods?ref=v0.8.0")
cmd = exec.Command("kubectl", "apply", "-k", "github.com/confidential-containers/operator/config/samples/ccruntime/peer-pods")
cmd.Env = append(os.Environ(), fmt.Sprintf("KUBECONFIG="+cfg.KubeconfigFile()))
stdoutStderr, err = cmd.CombinedOutput()
log.Tracef("%v, output: %s", cmd, stdoutStderr)
Expand Down

0 comments on commit a5e37f4

Please sign in to comment.