Compare commits
29 Commits
oidc-test-
...
hydra-hpa
Author | SHA1 | Date | |
---|---|---|---|
4cbc6c3972 | |||
8b02e8a875 | |||
caa180747e | |||
4d29851350 | |||
d88cc2de65 | |||
435597f9f1 | |||
ee2bb1ea45 | |||
63c5d7259c | |||
815917c306 | |||
bc6fe46e1c | |||
1b1cc27916 | |||
d37e85000f | |||
d9570ec8d0 | |||
d56ae059a3 | |||
5ec48c8b22 | |||
aaae6e2f20 | |||
081e854454 | |||
3dba6c0d69 | |||
8c6dc30bde | |||
4ff0f83880 | |||
e93bc069d3 | |||
a56089efe5 | |||
c4998279d5 | |||
6de80b1d9c | |||
2f3cf60974 | |||
bf865b02e2 | |||
063b575117 | |||
38d3f1c1df | |||
6acda0553e |
@ -29,7 +29,7 @@ vars:
|
||||
fieldref:
|
||||
fieldpath: metadata.name
|
||||
|
||||
patchesJson6902:
|
||||
patches:
|
||||
- target:
|
||||
group: apps
|
||||
version: v1
|
||||
@ -42,3 +42,9 @@ patchesJson6902:
|
||||
kind: Job
|
||||
name: hydra-migrate
|
||||
path: patches/hydra-migrate-job.yaml
|
||||
- target:
|
||||
group: batch
|
||||
version: v1
|
||||
kind: CronJob
|
||||
name: hydra-janitor
|
||||
path: patches/hydra-janitor-cronjob.yaml
|
||||
|
@ -0,0 +1,21 @@
|
||||
- op: add
|
||||
path: "/spec/jobTemplate/spec/template/spec/containers/0/env/-"
|
||||
value:
|
||||
name: HYDRA_DATABASE_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: hydra-postgres-user
|
||||
key: username
|
||||
- op: add
|
||||
path: "/spec/jobTemplate/spec/template/spec/containers/0/env/-"
|
||||
value:
|
||||
name: HYDRA_DATABASE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: hydra-postgres-user
|
||||
key: password
|
||||
- op: add
|
||||
path: "/spec/jobTemplate/spec/template/spec/containers/0/env/-"
|
||||
value:
|
||||
name: DSN
|
||||
value: "postgres://$(HYDRA_DATABASE_USER):$(HYDRA_DATABASE_PASSWORD)@$(HYDRA_DATABASE_SERVICE_NAME)-rw:5432/hydra?sslmode=disable"
|
@ -7,7 +7,7 @@ resources:
|
||||
- ./resources/oauth2-client.yaml
|
||||
|
||||
configMapGenerator:
|
||||
- name: oidc-test-env
|
||||
- name: oidc-test
|
||||
literals:
|
||||
- LOG_LEVEL=0
|
||||
- HTTP_ADDRESS=0.0.0.0:8080
|
||||
|
@ -24,7 +24,7 @@ spec:
|
||||
resources: {}
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: oidc-test-env
|
||||
name: oidc-test
|
||||
env:
|
||||
- name: OIDC_CLIENT_ID
|
||||
valueFrom:
|
||||
|
@ -2,19 +2,12 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- ../../overlays/base
|
||||
- ../../overlays/full
|
||||
- ./resources/ingress.yaml
|
||||
- ./resources/saml-idp.yaml
|
||||
- ./resources/self-signed-issuer.yaml
|
||||
- ./resources/port-forwarder.yaml
|
||||
|
||||
components:
|
||||
- ../../components/hydra-cnpg-database
|
||||
- ../../components/oidc-test
|
||||
#- ../../components/hydra-oidc
|
||||
- ../../components/hydra-saml
|
||||
|
||||
|
||||
patchesJson6902:
|
||||
- target:
|
||||
version: v1
|
||||
@ -38,7 +31,7 @@ patchesJson6902:
|
||||
path: patches/hydra-secret.yaml
|
||||
- target:
|
||||
version: v1
|
||||
kind: Secret
|
||||
kind: ConfigMap
|
||||
name: oidc-test
|
||||
path: patches/oidc-test.yaml
|
||||
- target:
|
||||
|
@ -3,4 +3,4 @@
|
||||
value: https://ssokustom/oauth2/callback
|
||||
- op: replace
|
||||
path: "/spec/postLogoutRedirectUris/0"
|
||||
value: https://ssokustom/oauth2/callback
|
||||
value: https://ssokustom
|
@ -1,6 +1,3 @@
|
||||
- op: replace
|
||||
path: "/data/LOG_LEVEL"
|
||||
value: 0
|
||||
- op: replace
|
||||
path: "/data/OIDC_REDIRECT_URL"
|
||||
value: https://ssokustom/oauth2/callback
|
||||
|
5
kustomization.yaml
Normal file
5
kustomization.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- ./overlays/base
|
@ -14,3 +14,4 @@ components:
|
||||
- ../../components/hydra-oidc
|
||||
- ../../components/hydra-saml
|
||||
- ../../components/hydra-sql
|
||||
- ../../components/oidc-test
|
@ -9,6 +9,8 @@ resources:
|
||||
- ./resources/hydra-serviceaccount.yaml
|
||||
- ./resources/hydra-migrate-job.yaml
|
||||
- ./resources/hydra-maester
|
||||
- ./resources/hydra-janitor-cronjob.yaml
|
||||
- ./resources/hydra-hpa.yaml
|
||||
|
||||
secretGenerator:
|
||||
- name: hydra-secret
|
||||
|
@ -55,6 +55,9 @@ spec:
|
||||
name: hydra-public
|
||||
- containerPort: 4445
|
||||
name: hydra-admin
|
||||
resources: {}
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
restartPolicy: Always
|
||||
|
||||
|
26
resources/hydra/resources/hydra-hpa.yaml
Normal file
26
resources/hydra/resources/hydra-hpa.yaml
Normal file
@ -0,0 +1,26 @@
|
||||
apiVersion: autoscaling/v2
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: hydra
|
||||
labels:
|
||||
io.kompose.service: hydra
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: hydra
|
||||
minReplicas: 1
|
||||
maxReplicas: 3
|
||||
metrics:
|
||||
- type: Resource
|
||||
resource:
|
||||
name: memory
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: 80
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: 80
|
34
resources/hydra/resources/hydra-janitor-cronjob.yaml
Normal file
34
resources/hydra/resources/hydra-janitor-cronjob.yaml
Normal file
@ -0,0 +1,34 @@
|
||||
apiVersion: batch/v1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: hydra-janitor
|
||||
labels:
|
||||
app.kubernetes.io/name: hydra-janitor
|
||||
spec:
|
||||
concurrencyPolicy: Forbid
|
||||
schedule: "0 */1 * * *"
|
||||
jobTemplate:
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: hydra-janitor
|
||||
spec:
|
||||
restartPolicy: OnFailure
|
||||
serviceAccountName: hydra-sa
|
||||
containers:
|
||||
- name: janitor
|
||||
image: reg.cadoles.com/proxy_cache/oryd/hydra:v2.0.3
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: hydra-env
|
||||
imagePullPolicy: IfNotPresent
|
||||
command: ["hydra"]
|
||||
env: []
|
||||
args:
|
||||
- janitor
|
||||
- --read-from-env
|
||||
- --grants
|
||||
- --requests
|
||||
- --tokens
|
||||
resources: {}
|
Reference in New Issue
Block a user