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

BC-5724 update hydra #935

Merged
merged 7 commits into from
Aug 20, 2024
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
2 changes: 1 addition & 1 deletion ansible/group_vars/all/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ configuration_all:
client: false
nuxtclient: false
HYDRA_URI:
value: "http://hydra-svc:4445"
value: "http://hydra-svc:4445/admin"
server: true
client: false
nuxtclient: false
Expand Down
2 changes: 0 additions & 2 deletions ansible/group_vars/develop/hydra.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
HYDRA_DNS_PREFIX: oauth-
HYDRA_IMAGE_NAME: oryd/hydra
HYDRA_IMAGE_TAG: v1.11.10-amd64
3 changes: 0 additions & 3 deletions ansible/group_vars/infra/hydra.yml

This file was deleted.

3 changes: 0 additions & 3 deletions ansible/group_vars/loadtest/hydra.yml

This file was deleted.

3 changes: 0 additions & 3 deletions ansible/group_vars/production/hydra.yml

This file was deleted.

3 changes: 0 additions & 3 deletions ansible/group_vars/reference/hydra.yml

This file was deleted.

2 changes: 1 addition & 1 deletion ansible/host_vars/prod-brb/pod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ CLAMAV_REPLICAS: 1
CLIENT_REPLICAS: 20
ETHERPAD_NGINX_REPLICAS: 1
ETHERPAD_REPLICAS: 1
HYDRA_REPLICAS: 4
HYDRA_REPLICAS: 2
LIBREOFFICE_REPLICAS: 1
MAILDROP_REPLICAS: 1
NUXTCLIENT_REPLICAS: 4
Expand Down
2 changes: 1 addition & 1 deletion ansible/host_vars/prod-dbc/pod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ CLAMAV_REPLICAS: 1
CLIENT_REPLICAS: 10
ETHERPAD_NGINX_REPLICAS: 1
ETHERPAD_REPLICAS: 1
HYDRA_REPLICAS: 1
HYDRA_REPLICAS: 2
LIBREOFFICE_REPLICAS: 1
MAILDROP_REPLICAS: 1
NUXTCLIENT_REPLICAS: 4
Expand Down
2 changes: 1 addition & 1 deletion ansible/host_vars/prod-nbc/pod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ CLAMAV_REPLICAS: 1
CLIENT_REPLICAS: 10
ETHERPAD_NGINX_REPLICAS: 1
ETHERPAD_REPLICAS: 1
HYDRA_REPLICAS: 1
HYDRA_REPLICAS: 2
LIBREOFFICE_REPLICAS: 1
MAILDROP_REPLICAS: 1
NUXTCLIENT_REPLICAS: 4
Expand Down
2 changes: 1 addition & 1 deletion ansible/host_vars/prod-thr/pod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ CLAMAV_REPLICAS: 1
CLIENT_REPLICAS: 15
ETHERPAD_NGINX_REPLICAS: 1
ETHERPAD_REPLICAS: 1
HYDRA_REPLICAS: 6
HYDRA_REPLICAS: 2
LIBREOFFICE_REPLICAS: 1
MAILDROP_REPLICAS: 1
NUXTCLIENT_REPLICAS: 4
Expand Down
3 changes: 3 additions & 0 deletions ansible/roles/hydra/defaults/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
HYDRA_DNS_PREFIX: oauth.
HYDRA_IMAGE_NAME: docker.io/oryd/hydra
HYDRA_IMAGE_TAG: v2.0.3-amd64
19 changes: 13 additions & 6 deletions ansible/roles/hydra/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@
template: svc.yml.j2
tags:
- service

- name: Ingress
kubernetes.core.k8s:
kubeconfig: ~/.kube/config
namespace: "{{ NAMESPACE }}"
template: ingress.yml.j2
tags:
- ingress

- name: Configmap
kubernetes.core.k8s:
kubeconfig: ~/.kube/config
Expand All @@ -61,7 +61,7 @@
apply: yes
tags:
- configmap

- name: Secret by 1Password
kubernetes.core.k8s:
kubeconfig: ~/.kube/config
Expand All @@ -70,7 +70,7 @@
when: ONEPASSWORD_OPERATOR is defined and ONEPASSWORD_OPERATOR|bool
tags:
- 1password

- name: remove old Job
kubernetes.core.k8s:
kubeconfig: ~/.kube/config
Expand All @@ -96,12 +96,19 @@
template: job.yml.j2
tags:
- job

- name: Deployment
kubernetes.core.k8s:
kubeconfig: ~/.kube/config
namespace: "{{ NAMESPACE }}"
template: deployment.yml.j2
tags:
- deployment


- name: Pod Monitor
kubernetes.core.k8s:
kubeconfig: ~/.kube/config
namespace: "{{ NAMESPACE }}"
template: pod-monitor.yml.j2
tags:
- prometheus
1 change: 0 additions & 1 deletion ansible/roles/hydra/templates/configmap.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ data:
URLS_POST_LOGOUT_REDIRECT: https://{{ DOMAIN }}/logout/
SERVE_TLS_ALLOW_TERMINATION_FROM: "10.0.0.0/8,172.16.0.0/12,192.168.0.0/16"
OIDC_SUBJECT_IDENTIFIERS_SUPPORTED_TYPES: "public,pairwise"
SC_FRONTEND: "https://{{ DOMAIN }}"
SQA_OPT_OUT: "true"
LOG_LEVEL: "info"
{% if WITH_BRANCH_POSTGRES_DB_MANAGEMENT|bool %}
Expand Down
4 changes: 4 additions & 0 deletions ansible/roles/hydra/templates/deployment.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ spec:
args: ["serve", "all"]
ports:
- containerPort: 4444
name: http
protocol: TCP
- containerPort: 4445
name: http-admin
protocol: TCP
livenessProbe:
httpGet:
path: /health/alive
Expand Down
14 changes: 14 additions & 0 deletions ansible/roles/hydra/templates/pod-monitor.yml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: hydra-pod-monitor
namespace: {{ NAMESPACE }}
labels:
app: hydra
spec:
selector:
matchLabels:
app: hydra
podMetricsEndpoints:
- port: http-admin
path: /admin/metrics/prometheus
Loading