{"id":18672896,"url":"https://github.com/projectsyn/lieutenant-keycloak-idp-controller","last_synced_at":"2025-11-06T22:30:38.622Z","repository":{"id":208409423,"uuid":"721559182","full_name":"projectsyn/lieutenant-keycloak-idp-controller","owner":"projectsyn","description":"Controller that runs in a Lieutenant cluster and manages the creation of Keycloak OIDC clients for every registered cluster.","archived":false,"fork":false,"pushed_at":"2025-02-13T18:46:32.000Z","size":752,"stargazers_count":0,"open_issues_count":12,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-02-13T19:36:58.321Z","etag":null,"topics":["vshn-project-ocp","vshn-team-aldebaran"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/projectsyn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-21T10:08:39.000Z","updated_at":"2023-11-21T10:15:25.000Z","dependencies_parsed_at":"2023-12-14T00:33:48.525Z","dependency_job_id":"b712a215-e6a4-46d9-b8a3-5350281a9a7c","html_url":"https://github.com/projectsyn/lieutenant-keycloak-idp-controller","commit_stats":null,"previous_names":["projectsyn/lieutenant-keycloak-idp-controller"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectsyn%2Flieutenant-keycloak-idp-controller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectsyn%2Flieutenant-keycloak-idp-controller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectsyn%2Flieutenant-keycloak-idp-controller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectsyn%2Flieutenant-keycloak-idp-controller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/projectsyn","download_url":"https://codeload.github.com/projectsyn/lieutenant-keycloak-idp-controller/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239513379,"owners_count":19651322,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["vshn-project-ocp","vshn-team-aldebaran"],"created_at":"2024-11-07T09:13:24.194Z","updated_at":"2025-02-18T16:48:14.282Z","avatar_url":"https://github.com/projectsyn.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lieutenant-keycloak-idp-controller\n\nLieutenant Keycloak IDP Controller is a Kubernetes controller that runs in a Lieutenant cluster and manages the creation of Keycloak OIDC clients for every registered cluster.\n\n## Getting Started\nYou’ll need a Kubernetes cluster to run against. You can use [KIND](https://sigs.k8s.io/kind) to get a local cluster for testing, or run against a remote cluster.\n**Note:** Your controller will automatically use the current context in your kubeconfig file (i.e. whatever cluster `kubectl cluster-info` shows).\n\n### Running on the cluster\n1. Install Instances of Custom Resources:\n\n```sh\n# install the CRDs into the cluster\nkubectl apply -k https://github.com/projectsyn/lieutenant-operator//config/crd\n\n# apply some objects to the cluster to your discretion\nkubectl apply -f config/samples/\n```\n\n2. Build and push your image to the location specified by `IMG`:\n\n```sh\nmake docker-build docker-push IMG=\u003csome-registry\u003e/lieutenant-keycloak-idp-controller:tag\n```\n\n3. Deploy the controller to the cluster with the image specified by `IMG`:\n\n```sh\nmake deploy IMG=\u003csome-registry\u003e/lieutenant-keycloak-idp-controller:tag\n```\n\n### Uninstall CRDs\nTo delete the CRDs from the cluster:\n\n```sh\nmake uninstall\n```\n\n### Undeploy controller\nUnDeploy the controller from the cluster:\n\n```sh\nmake undeploy\n```\n\n### How it works\nThis project aims to follow the Kubernetes [Operator pattern](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/).\n\nIt uses [Controllers](https://kubernetes.io/docs/concepts/architecture/controller/),\nwhich provide a reconcile function responsible for synchronizing resources until the desired state is reached on the cluster.\n\n### Test It Out\n1. Install the CRDs into the cluster:\n\n```sh\nmake install\n```\n\n2. Run your controller (this will run in the foreground, so switch to a new terminal if you want to leave it running):\n\n```sh\nmake run\n```\n\n**NOTE:** You can also run this in one step by running: `make install run`\n\n### Modifying the API definitions\nIf you are editing the API definitions, generate the manifests such as CRs or CRDs using:\n\n```sh\nmake manifests\n```\n\n**NOTE:** Run `make --help` for more information on all potential `make` targets\n\nMore information can be found via the [Kubebuilder Documentation](https://book.kubebuilder.io/introduction.html)\n\n## VSHN Development Infrastructure\n\nFor a full E2E development setup the VSHN infrastructure has you covered.\n\n1. Create your isolated realm on the testing Keycloak \u003chttps://id.test.vshn.net/auth/admin/master/console/#/master/add-realm\u003e.\n2. Create a user for the controller in the admin realm \u003chttps://id.test.vshn.net/auth/admin/master/console/#/master/users/add-user\u003e.\nConfigure as follows:\n![User Details](./docs/keycloak-config/user-details.png \"User Details\")\n![User Password](./docs/keycloak-config/user-pw.png \"User Password\")\n![User Roles](./docs/keycloak-config/user-roles.png \"User Roles\")\n3. [Sign in](https://kb.vshn.ch/corp-tech/projectsyn/how-tos/connect-to-lieutenant-clusters.html) to the `lieutenant-dev` cluster at \u003chttps://syn-lieutenant-dev.apps.cloudscale-lpg-2.appuio.cloud/\u003e.\n4. Run the controller with the following command:\n```sh\nREALM=your-realm-name\nKEYCLOAK_USER=your-controller-user\nKEYCLOAK_PASSWORD=your-controller-password\n\nmake 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\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojectsyn%2Flieutenant-keycloak-idp-controller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprojectsyn%2Flieutenant-keycloak-idp-controller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojectsyn%2Flieutenant-keycloak-idp-controller/lists"}