mirror of
https://github.com/netbirdio/kubernetes-operator.git
synced 2026-05-22 17:11:40 -07:00
Move helm references to netbirdio/helms
This commit is contained in:
@@ -25,3 +25,6 @@ go.work
|
||||
*.swp
|
||||
*.swo
|
||||
*~
|
||||
|
||||
# CRDs generated for testing
|
||||
crds/
|
||||
@@ -43,7 +43,7 @@ help: ## Display this help.
|
||||
|
||||
.PHONY: manifests
|
||||
manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
|
||||
$(CONTROLLER_GEN) crd paths="./..." output:crd:artifacts:config=helm/kubernetes-operator/crds
|
||||
$(CONTROLLER_GEN) crd paths="./..." output:crd:artifacts:config=crds
|
||||
|
||||
.PHONY: generate
|
||||
generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
|
||||
@@ -123,32 +123,19 @@ docker-buildx: ## Build and push docker image for the manager for cross-platform
|
||||
- $(CONTAINER_TOOL) buildx rm operator-builder
|
||||
rm Dockerfile.cross
|
||||
|
||||
.PHONY: build-installer
|
||||
build-installer: manifests ## Generate a consolidated YAML with CRDs and deployment.
|
||||
mkdir -p manifests
|
||||
$(HELM) template --include-crds kubernetes-operator helm/kubernetes-operator > manifests/install.yaml
|
||||
|
||||
##@ Deployment
|
||||
|
||||
ifndef ignore-not-found
|
||||
ignore-not-found = false
|
||||
endif
|
||||
|
||||
.PHONY: install
|
||||
install: manifests ## Install CRDs into the K8s cluster specified in ~/.kube/config.
|
||||
$(KUBECTL) apply -f helm/kubernetes-operator/crds
|
||||
|
||||
.PHONY: uninstall
|
||||
uninstall: manifests ## Uninstall CRDs from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
|
||||
$(KUBECTL) delete -f helm/kubernetes-operator/crds
|
||||
|
||||
.PHONY: deploy
|
||||
deploy: manifests ## Deploy controller to the K8s cluster specified in ~/.kube/config.
|
||||
$(HELM) install -n netbird --create-namespace kubernetes-operator --set operator.image.tag=$(word 2,$(subst :, ,${IMG})) helm/kubernetes-operator
|
||||
$(HELM) install -n netbird --create-namespace kubernetes-operator --set operator.image.tag=$(word 2,$(subst :, ,${IMG})) --repo https://netbirdio.github.io/helms kubernetes-operator
|
||||
|
||||
.PHONY: undeploy
|
||||
undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
|
||||
$(HELM) uninstall -n netbird kubernetes-operator
|
||||
$(HELM) uninstall -n netbird kubernetes-operator --no-hooks
|
||||
|
||||
##@ Dependencies
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ This operator easily provides NetBird access on Kubernetes clusters, allowing us
|
||||
|
||||
1. Add helm repository.
|
||||
```sh
|
||||
helm repo add netbirdio https://netbirdio.github.io/kubernetes-operator
|
||||
helm repo add netbirdio https://netbirdio.github.io/helms
|
||||
```
|
||||
2. (Recommended) Install [cert-manager](https://cert-manager.io/docs/installation/#default-static-install) for k8s API to communicate with the NetBird operator.
|
||||
```sh
|
||||
@@ -36,7 +36,7 @@ kubectl create namespace netbird
|
||||
kubectl -n netbird create secret generic netbird-mgmt-api-key --from-literal=NB_API_KEY=$(cat ~/nb-pat.secret)
|
||||
```
|
||||
4. (Recommended) Create a [`values.yaml`](examples/ingress/values.yaml) file, check `helm show values netbirdio/kubernetes-operator` for more info.
|
||||
5. Install using `helm install --create-namespace -f values.yaml -n netbird netbird-operator netbirdio/kubernetes-operator`.
|
||||
5. Install using `helm install --create-namespace -f values.yaml -n netbird kubernetes-operator netbirdio/kubernetes-operator`.
|
||||
6. (Recommended) Check pod status using `kubectl get pods -n netbird`.
|
||||
6. (Optional) Create an [`exposed-nginx.yaml`](examples/ingress/exposed-nginx.yaml) file to create a Nginx service for testing.
|
||||
7. (Optional) Apply the Nginx service:
|
||||
@@ -45,16 +45,6 @@ kubectl apply -f exposed-nginx.yaml
|
||||
```
|
||||
|
||||
> Learn more about the values.yaml options [here](helm/kubernetes-operator/values.yaml) and [Granting controller access to NetBird Management](docs/usage.md#granting-controller-access-to-netbird-management).
|
||||
#### Using install.yaml
|
||||
|
||||
> [!IMPORTANT]
|
||||
> install.yaml only includes a very basic template for deploying a stripped-down version of Kubernetes-operator.
|
||||
> This excludes any and all configurations for ingress capabilities and requires the cert-manager to be installed.
|
||||
|
||||
```sh
|
||||
kubectl create namespace netbird
|
||||
kubectl apply -n netbird -f https://raw.githubusercontent.com/netbirdio/kubernetes-operator/refs/heads/main/manifests/install.yaml
|
||||
```
|
||||
|
||||
### Version
|
||||
We have developed and executed tests against Kubernetes v1.31, but it should work with most recent Kubernetes version.
|
||||
|
||||
@@ -71,7 +71,7 @@ var _ = BeforeSuite(func() {
|
||||
|
||||
By("bootstrapping test environment")
|
||||
testEnv = &envtest.Environment{
|
||||
CRDDirectoryPaths: []string{filepath.Join("..", "..", "helm", "kubernetes-operator", "crds")},
|
||||
CRDDirectoryPaths: []string{filepath.Join("..", "..", "crds")},
|
||||
ErrorIfCRDPathMissing: true,
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ var _ = BeforeSuite(func() {
|
||||
|
||||
By("bootstrapping test environment")
|
||||
testEnv = &envtest.Environment{
|
||||
CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "helm", "kubernetes-operator", "crds")},
|
||||
CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "crds")},
|
||||
ErrorIfCRDPathMissing: false,
|
||||
|
||||
// WebhookInstallOptions: envtest.WebhookInstallOptions{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -52,11 +52,6 @@ var _ = Describe("Manager", Ordered, func() {
|
||||
_, err = utils.Run(cmd)
|
||||
Expect(err).NotTo(HaveOccurred(), "Failed to label namespace with restricted policy")
|
||||
|
||||
By("installing CRDs")
|
||||
cmd = exec.Command("make", "install", fmt.Sprintf("IMG=%s", projectImage))
|
||||
_, err = utils.Run(cmd)
|
||||
Expect(err).NotTo(HaveOccurred(), "Failed to install CRDs")
|
||||
|
||||
By("deploying the kubernetes-operator")
|
||||
cmd = exec.Command("make", "deploy", fmt.Sprintf("IMG=%s", projectImage))
|
||||
out, err := utils.Run(cmd)
|
||||
@@ -77,10 +72,6 @@ var _ = Describe("Manager", Ordered, func() {
|
||||
cmd = exec.Command("make", "undeploy")
|
||||
_, _ = utils.Run(cmd)
|
||||
|
||||
By("uninstalling CRDs")
|
||||
cmd = exec.Command("make", "uninstall")
|
||||
_, _ = utils.Run(cmd)
|
||||
|
||||
By("removing manager namespace")
|
||||
cmd = exec.Command("kubectl", "delete", "ns", namespace)
|
||||
_, _ = utils.Run(cmd)
|
||||
|
||||
Reference in New Issue
Block a user