add prometheus

This commit is contained in:
mr
2025-06-24 09:40:45 +02:00
parent 3ca23c0645
commit 7ad4bf0b5d
7 changed files with 120 additions and 55 deletions

View File

@@ -88,7 +88,7 @@ ingress:
# -- Configure ingress for the proxy port.
public:
# -- En-/Disable the proxy ingress.
enabled: false
enabled: true
className: ""
annotations: {}
# kubernetes.io/ingress.class: nginx
@@ -105,7 +105,7 @@ ingress:
admin:
# -- En-/Disable the api ingress.
enabled: false
enabled: true
className: ""
annotations: {}
# If you do want to specify annotations, uncomment the following
@@ -557,7 +557,7 @@ cronjob:
# -- If you want to mount external volume
extraVolumes: []
# - name: my-volume
# - name: my-volumep
# secret:
# secretName: my-secret
extraVolumeMounts: []

View File

@@ -58,6 +58,26 @@ nats:
storageClassName: kind-sc
prometheus:
replicaCount: 1
image:
repository: prom/prometheus
tag: v2.52.0
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 9090
resources:
limits:
cpu: 500m
memory: 512Mi
requests:
cpu: 200m
memory: 256Mi
openldap:
enabled: true
test:
@@ -118,7 +138,7 @@ openldap:
objectClass: posixGroup
cn: everybody
memberUid: admin
gidNumber: 2003
gidNumber: 2002
02-ldapadmin.ldif : |-
dn: cn=ldapadmin,ou=groups,dc=example,dc=com
@@ -144,29 +164,24 @@ openldap:
homeDirectory: /home/ldapadmin
03-opencloudadmin.ldif : |-
dn: cn=admin,ou=groups,dc=example,dc=com
objectClass: top
objectClass: posixGroup
cn: admin
memberUid: admin
gidNumber: 2002
dn: uid=admin,ou=users,dc=example,dc=com
givenName: John
sn: Doe
uid: admin
mail: john.doe@example.com
cn: JohnDoe
objectClass: person
dn: uid=admin,ou=Users,dc=example,dc=com
objectClass: inetOrgPerson
objectClass: posixAccount
userPassword:: e0NSWVBUfSQ2JDdTZ0daU1FXJGw1ZWRTTHVDaDV6a0NvUlllZzFLd3MwUHRKQ
jJQL09CQWdoc0RkbWhzTXJPcEpCbzR3b01yNWJQcjlubi8udWdzM25LcHlKQmt2eHVJWFM0eUQ1
cnox
uidNumber: 2002
gidNumber: 2002
loginShell: /bin/bash
homeDirectory: /home/admin
cn: Admin
sn: Istrator
uid: admin
userPassword: admin
mail: admin@example.com
ou: Users
dn: ou=AppRoles,dc=example,dc=com
objectClass: organizationalunit
ou: AppRoles
description: AppRoles
dn: ou=App1,ou=AppRoles,dc=example,dc=com
objectClass: organizationalunit
ou: App1
description: App1
# ldap user manager configuration
ldapUserManager:
@@ -221,9 +236,9 @@ hydra:
config:
dsn: memory
urls:
login: https://localhost-login/authentication/login
consent: https://localhost-consent/consent/consent
logout: https://localhost-logout/authentication/logout
#login: https://localhost-login/authentication/login
#consent: https://localhost-consent/consent/consent
#logout: https://localhost-logout/authentication/logout
self:
issuer: http://dev-hydra-public:4444/

View File

@@ -145,27 +145,44 @@ openldap:
homeDirectory: /home/ldapadmin
03-opencloudadmin.ldif : |-
dn: cn=admin,ou=groups,dc=example,dc=com
objectClass: top
objectClass: posixGroup
cn: admin
memberUid: admin
gidNumber: 2002
dn: uid=admin,ou=users,dc=example,dc=com
givenName: John
sn: Doe
uid: admin
mail: john.doe@example.com
cn: JohnDoe
objectClass: person
dn: uid=admin,ou=Users,dc=example,dc=com
objectClass: inetOrgPerson
objectClass: posixAccount
userPassword: diiVei8y
uidNumber: 2002
gidNumber: 2002
loginShell: /bin/bash
homeDirectory: /home/admin
cn: Admin
sn: Istrator
uid: admin
userPassword: admin
mail: admin@example.com
ou: Users
dn: ou=AppRoles,dc=example,dc=com
objectClass: organizationalunit
ou: AppRoles
description: AppRoles
dn: ou=App1,ou=AppRoles,dc=example,dc=com
objectClass: organizationalunit
ou: App1
description: App1
prometheus:
replicaCount: 1
image:
repository: prom/prometheus
tag: v2.52.0
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 9090
resources:
limits:
cpu: 500m
memory: 512Mi
requests:
cpu: 200m
memory: 256Mi
# ldap user manager configuration
ldapUserManager:

View File

@@ -12,11 +12,11 @@ data:
OC_AUTH_CONNECTOR_HOST: "{{ .Release.Name }}-hydra-admin.{{ .Release.Namespace }}"
OC_AUTH_CONNECTOR_PUBLIC_HOST: "{{ .Release.Name }}-hydra-public.{{ .Release.Namespace }}"
OC_AUTH_CONNECTOR_PORT: "4444"
OC_AUTH_CONNECTOR_ADMIN_PORT: "4445"
OC_AUTH_CONNECTOR_ADMIN_PORT: "4445/admin"
OC_PERMISSION_CONNECTOR_READ_HOST: "{{ .Release.Name }}-keto-read.{{ .Release.Namespace }}"
OC_PERMISSION_CONNECTOR_WRITE_HOST: "{{ .Release.Name }}-keto-write.{{ .Release.Namespace }}"
OC_PERMISSION_CONNECTOR_PORT: "80"
OC_PERMISSION_CONNECTOR_ADMIN_PORT: "80"
OC_PERMISSION_CONNECTOR_ADMIN_PORT: "80/admin"
OC_LDAP_ENDPOINTS: "{{ .Release.Name }}-openldap.{{ .Release.Namespace }}.svc.cluster.local:389"
OC_LDAP_BINDDN: "{{ index .Values.ocAuth.ldap.bindDn }}"
OC_LDAP_BINDPW: "{{ index .Values.ocAuth.ldap.binPwd }}"

View File

@@ -0,0 +1,22 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "my-prometheus.fullname" . }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ include "my-prometheus.name" . }}
template:
metadata:
labels:
app: {{ include "my-prometheus.name" . }}
spec:
containers:
- name: prometheus
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- containerPort: 9090
resources:
{{- toYaml .Values.resources | nindent 12 }}

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "my-prometheus.fullname" . }}
spec:
type: {{ .Values.service.type }}
selector:
app: {{ include "my-prometheus.name" . }}
ports:
- port: {{ .Values.service.port }}
targetPort: 9090