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

fix: proxy build release, tag major #155

Merged
merged 2 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
5 changes: 5 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ builds:
- CGO_ENABLED=0
- id: proxy
binary: proxy
main: ./proxy
goos:
- linux
env:
Expand Down Expand Up @@ -117,6 +118,10 @@ docker_manifests:
image_templates:
- ghcr.io/doodlescheduling/{{ .ProjectName }}:v{{ .Version }}-amd64
- ghcr.io/doodlescheduling/{{ .ProjectName }}:v{{ .Version }}-arm64v8
- name_template: ghcr.io/doodlescheduling/{{ .ProjectName }}/proxy:v{{ .Major }}
image_templates:
- ghcr.io/doodlescheduling/{{ .ProjectName }}/proxy:v{{ .Version }}-amd64
- ghcr.io/doodlescheduling/{{ .ProjectName }}/proxy:v{{ .Version }}-arm64v8
- name_template: ghcr.io/doodlescheduling/{{ .ProjectName }}/proxy:v{{ .Version }}
image_templates:
- ghcr.io/doodlescheduling/{{ .ProjectName }}/proxy:v{{ .Version }}-amd64
Expand Down
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ It is recommended to configure all realms to run with the proxy.

```yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
kind: Role
metadata:
name: keycloakrealm-proxy
rules:
Expand All @@ -331,8 +331,8 @@ metadata:
name: keycloakrealm-default
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: keycloakrealm-default
kind: Role
name: keycloakrealm-proxy
subjects:
- kind: ServiceAccount
name: keycloakrealm-default
Expand Down Expand Up @@ -372,14 +372,11 @@ spec:
fieldPath: metadata.namespace
- name: PROXY_ADDRESS
value: 127.0.0.1:8080
image: ghcr.io/doodlescheduling/keycloak-controller/proxy:v2.0.0
image: ghcr.io/doodlescheduling/keycloak-controller/proxy:v2
name: proxy
serviceAccount: keycloakrealm-default
```

**Note**: The proxy needs read access to keycloakrealms as well as patch access to the /status subresource.
In the example above there is a ClusterRole called keycloakrealm-proxy granting just that. This ClusterRole also is bundled in the helm chart, you may use {releaseName}-reconcile-proxy for the RoleBinding.

## Installation

### Helm
Expand Down
14 changes: 0 additions & 14 deletions chart/keycloak-controller/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,6 @@
{{- if .Values.clusterRBAC.enabled -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ template "keycloak-controller.fullname" . }}-reconcile-proxy
rules:
- apiGroups: ["keycloak.infra.doodle.com"]
resources:
- keycloakrealms
verbs: ["get"]
- apiGroups: ["keycloak.infra.doodle.com"]
resources:
- keycloakrealms/status
verbs: ["get", "update", "patch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ template "keycloak-controller.fullname" . }}
labels:
Expand Down
Loading