-
Notifications
You must be signed in to change notification settings - Fork 3
update helm charts #82
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
Changes from all commits
744e82d
4a36668
f73de44
35e4c03
6119852
2f58eee
a303488
2f0bb23
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| name: Test | ||
|
|
||
| on: | ||
| push: | ||
| branches: [master] | ||
| pull_request: | ||
| branches: [master] | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version: "1.25" | ||
|
|
||
| - name: Run tests | ||
| run: make test |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,6 +50,24 @@ data: | |
| } | ||
| ] | ||
| } | ||
| ], | ||
| "identityProviders": [ | ||
| {{- range $index, $idp := .Values.keycloak.identityProviders }} | ||
| {{- if $index }},{{ end }} | ||
| { | ||
| "alias": {{ $idp.alias | quote }}, | ||
| "providerId": {{ $idp.providerId | quote }}, | ||
| "enabled": {{ $idp.enabled | default true }}, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In Helm templates, the |
||
| "trustEmail": {{ $idp.trustEmail | default false }}, | ||
STRRL marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "config": { | ||
| "clientId": {{ $idp.config.clientId | quote }}, | ||
| "clientSecret": {{ $idp.config.clientSecret | quote }} | ||
STRRL marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| {{- if $idp.config.defaultScope }}, | ||
| "defaultScope": {{ $idp.config.defaultScope | quote }} | ||
| {{- end }} | ||
| } | ||
| } | ||
| {{- end }} | ||
| ] | ||
| } | ||
| {{- end }} | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -61,11 +61,17 @@ spec: | |||||
| value: {{ .Values.headscale.config.unix_socket | quote }} | ||||||
| {{- if .Values.keycloak.enabled }} | ||||||
| - name: KEYCLOAK_URL | ||||||
| # If Keycloak is enabled in chart, point to the internal service. | ||||||
| # Note: For OIDC browser flow to work, this internal URL must be reachable by browser too (e.g. tunneling/VPN), | ||||||
| # OR the user must manually set coordinator.oidc.url to a public URL and keycloak.service.type/Ingress accordingly. | ||||||
| # Here we default to the service DNS for backend communication. | ||||||
| {{- if .Values.keycloak.ingress.enabled }} | ||||||
| {{- if .Values.keycloak.ingress.tls.secretName }} | ||||||
|
||||||
| {{- if .Values.keycloak.ingress.tls.secretName }} | |
| {{- if and .Values.keycloak.ingress.tls .Values.keycloak.ingress.tls.secretName }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If keycloak.ingress.host is not provided, this will result in an invalid URL (https://). Consider adding a check to ensure the host is set when ingress is enabled.
STRRL marked this conversation as resolved.
Show resolved
Hide resolved
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,36 @@ | ||||||||||||||||||||||||||||||
| {{- if and .Values.keycloak.enabled .Values.keycloak.ingress.enabled -}} | ||||||||||||||||||||||||||||||
| {{- $fullName := include "wonder-mesh-net.fullname" . -}} | ||||||||||||||||||||||||||||||
| {{- $svcPort := .Values.keycloak.service.port -}} | ||||||||||||||||||||||||||||||
| apiVersion: networking.k8s.io/v1 | ||||||||||||||||||||||||||||||
| kind: Ingress | ||||||||||||||||||||||||||||||
| metadata: | ||||||||||||||||||||||||||||||
| name: {{ $fullName }}-keycloak | ||||||||||||||||||||||||||||||
| labels: | ||||||||||||||||||||||||||||||
| {{- include "wonder-mesh-net.labels" . | nindent 4 }} | ||||||||||||||||||||||||||||||
| app.kubernetes.io/component: keycloak | ||||||||||||||||||||||||||||||
| {{- with .Values.keycloak.ingress.annotations }} | ||||||||||||||||||||||||||||||
| annotations: | ||||||||||||||||||||||||||||||
| {{- toYaml . | nindent 4 }} | ||||||||||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||||||||||
| spec: | ||||||||||||||||||||||||||||||
| {{- if .Values.keycloak.ingress.className }} | ||||||||||||||||||||||||||||||
| ingressClassName: {{ .Values.keycloak.ingress.className }} | ||||||||||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||||||||||
| {{- if .Values.keycloak.ingress.tls.secretName }} | ||||||||||||||||||||||||||||||
| tls: | ||||||||||||||||||||||||||||||
| - hosts: | ||||||||||||||||||||||||||||||
| - {{ .Values.keycloak.ingress.host | quote }} | ||||||||||||||||||||||||||||||
| secretName: {{ .Values.keycloak.ingress.tls.secretName }} | ||||||||||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||||||||||
|
Comment on lines
+19
to
+24
|
||||||||||||||||||||||||||||||
| {{- if .Values.keycloak.ingress.tls.secretName }} | |
| tls: | |
| - hosts: | |
| - {{ .Values.keycloak.ingress.host | quote }} | |
| secretName: {{ .Values.keycloak.ingress.tls.secretName }} | |
| {{- end }} | |
| {{- with .Values.keycloak.ingress.tls }} | |
| {{- if .secretName }} | |
| tls: | |
| - hosts: | |
| - {{ $.Values.keycloak.ingress.host | quote }} | |
| secretName: {{ .secretName }} | |
| {{- end }} | |
| {{- end }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -443,10 +443,20 @@ func (s *Server) Run() error { | |
|
|
||
| slog.Info("initializing ACL policy") | ||
| ctx := context.Background() | ||
| if err := s.wonderNetService.InitializeACLPolicy(ctx); err != nil { | ||
| slog.Warn("initialize ACL policy", "error", err) | ||
| } else { | ||
| var aclErr error | ||
| for i := 0; i < 10; i++ { | ||
| if err := s.wonderNetService.InitializeACLPolicy(ctx); err != nil { | ||
| aclErr = err | ||
| slog.Warn("initialize ACL policy, retrying", "error", err, "attempt", i+1) | ||
| time.Sleep(time.Duration(i+1) * time.Second) | ||
| continue | ||
| } | ||
| slog.Info("ACL policy initialized successfully") | ||
| aclErr = nil | ||
| break | ||
| } | ||
|
Comment on lines
+447
to
+457
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This retry loop can block the server startup for up to 55 seconds. If the coordinator is running in Kubernetes, this might cause liveness or readiness probes to fail and restart the pod before it can successfully initialize. Consider using a shorter total timeout or ensuring that health checks can still pass during this initialization phase. |
||
| if aclErr != nil { | ||
| slog.Error("initialize ACL policy, giving up after retries", "error", aclErr) | ||
| } | ||
|
|
||
| httpServer := &http.Server{ | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.