Skip to content

Commit

Permalink
fix: proxy build release, tag major (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
raffis authored Dec 7, 2023
1 parent 4f16d61 commit 007f67e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 21 deletions.
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

0 comments on commit 007f67e

Please sign in to comment.