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
* Have a Kubernetes cluster ready for development. We recommend `minikube` or `kind`.
27
28
29
+
### Adding new components - webhook, API
30
+
31
+
The repository structure MUST be compliant with `operator-sdk` scaffolding, which uses `kubebuilder` behind the scenes. This is to ensure a valid bundle generation and it makes it easy to maintain the project and add new components.
32
+
33
+
Refer to the [Operator SDK documentation](https://sdk.operatorframework.io/docs/building-operators/golang/) how to generate new APIs, Webhook and other parts of the project.
28
34
29
35
### Local run
30
36
@@ -40,41 +46,39 @@ When running `make run`, the webhooks aren't effective as it starts the manager
40
46
1. configure a proxy between the Kubernetes API server and your host, so that it can contact the webhook in your local machine
41
47
1. create the TLS certificates and place them, by default, on `/tmp/k8s-webhook-server/serving-certs/tls.crt`. The Kubernetes API server has also to be configured to trust the CA used to generate those certs.
42
48
43
-
In general, it's just easier to deploy the manager in a Kubernetes cluster instead. For that, you'll need the `cert-manager` installed. You can install it by running:
49
+
In general, it's just easier to deploy the operator in a Kubernetes cluster instead. For that, you'll need the `cert-manager` installed. You can install it by running:
44
50
45
51
```bash
46
52
make cert-manager
47
53
```
48
54
49
-
In pursuit of continuous improvement, a variable named `CERTMANAGER_VERSION`which can be run:
55
+
The environment variable `CERTMANAGER_VERSION` can be used to override the cert-manager version:
50
56
```bash
51
57
CERTMANAGER_VERSION=1.60 make cert-manager
52
58
```
53
59
54
-
By default, it will generate an image following the format `quay.io/${USER}/opentelemetry-operator:${VERSION}`. You can set the following env vars in front of the `make` command to override parts or the entirety of the image:
60
+
When deploying the operator into the cluster using `make deploy`, an image in the format `ghcr.io/${USER}/opentelemetry-operator` is generated. If this format isn't suitable, it can be overridden by:
55
61
56
-
*`IMG_PREFIX`, to override the registry, namespace and image name (`quay.io`)
62
+
*`IMG_PREFIX`, to override the registry, namespace and image name
57
63
*`USER`, to override the namespace
58
64
*`IMG_REPO`, to override the repository (`opentelemetry-operator`)
59
65
*`VERSION`, to override only the version part
60
66
*`IMG`, to override the entire image specification
61
67
62
-
Ensure the secret [regcred](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/) has been created to enable opentelemetry-operator-controller-manager deployment to pull images from your private `quay.io` registry.
IMG=docker.io/${USER}/opentelemetry-operator:latest make generate bundle container container-push deploy
66
70
```
67
71
68
-
Alternatively, you could create your repository with [Public Visibility](https://docs.projectquay.io/use_quay.html#creating-an-image-repository-via-the-ui).
72
+
Your operator will be available in the `opentelemetry-operator-system` namespace.
69
73
70
-
Once it's ready, the following can be used to build and deploy a manager, along with the required webhook configuration:
74
+
#### Using a private container registry
75
+
76
+
Ensure the secret [regcred](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/) has been created to enable opentelemetry-operator-controller-manager deployment to pull images from your private registry.
0 commit comments