Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial controller implementation #4

Merged
merged 18 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ clean: ## Cleans up the generated resources

.PHONY: run
run: manifests generate fmt vet ## Run a controller from your host.
go run ./main.go
go run ./main.go $(RUN_ARGS)

###
### Assets
Expand Down
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,23 @@ make manifests
**NOTE:** Run `make --help` for more information on all potential `make` targets

More information can be found via the [Kubebuilder Documentation](https://book.kubebuilder.io/introduction.html)

## VSHN Development Infrastructure

For a full E2E development setup the VSHN infrastructure has you covered.

1. Create your isolated realm on the testing Keycloak <https://id.test.vshn.net/auth/admin/master/console/#/master/add-realm>.
2. Create a user for the controller in the admin realm <https://id.test.vshn.net/auth/admin/master/console/#/master/users/add-user>.
Configure as follows:
![User Details](./docs/keycloak-config/user-details.png "User Details")
![User Password](./docs/keycloak-config/user-pw.png "User Password")
![User Roles](./docs/keycloak-config/user-roles.png "User Roles")
3. [Sign in](https://kb.vshn.ch/corp-tech/projectsyn/how-tos/connect-to-lieutenant-clusters.html) to the `lieutenant-dev` cluster at <https://syn-lieutenant-dev.apps.cloudscale-lpg-2.appuio.cloud/>.
4. Run the controller with the following command:
```sh
REALM=your-realm-name
KEYCLOAK_USER=your-controller-user
KEYCLOAK_PASSWORD=your-controller-password

make RUN_ARGS="--keycloak-realm=$REALM --keycloak-base-url=https://id.test.vshn.net --keycloak-user=$KEYCLOAK_USER --keycloak-password=$KEYCLOAK_PASSWORD --keycloak-login-realm=master --keycloak-legacy-wildfly-support=true --vault-address=https://vault-dev.syn.vshn.net/ --vault-token=$(kubectl create token -n lieutenant lieutenant-keycloak-idp-controller)" run
```
3 changes: 2 additions & 1 deletion config/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ kind: Kustomization
resources:
- ../rbac
- ../manager
- ../prometheus
# We deploy lieutenant in its own vCluster and do not have a Prometheus operator there
# - ../prometheus
patches:
- path: manager_auth_proxy_patch.yaml
1 change: 0 additions & 1 deletion config/default/manager_auth_proxy_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,3 @@ spec:
- "--health-probe-bind-address=:8081"
- "--metrics-bind-address=127.0.0.1:8080"
- "--leader-elect"
- "--namespace=$(POD_NAMESPACE)"
1 change: 0 additions & 1 deletion config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ spec:
containers:
- args:
- --leader-elect
- --namespace=$(POD_NAMESPACE)
env:
- name: POD_NAMESPACE
valueFrom:
Expand Down
Loading
Loading