Fully working oc-k8s

This commit is contained in:
mr
2026-02-05 08:43:21 +01:00
parent 5acf96919c
commit 7fb81e9829
16 changed files with 253 additions and 163 deletions

View File

@@ -15,11 +15,6 @@ spec:
labels:
app: oc-catalog
spec:
volumes:
- name: oc-pem
secret:
secretName: oc-peer-pem
optional: true
{{- if or (eq .Values.env "prod") (eq .Values.env "staging") }}
imagePullSecrets:
- name: regcred
@@ -31,6 +26,9 @@ spec:
- configMapRef:
name: opencloud-config
ports:
- containerPort: 4002
name: libp2p
protocol: TCP
- name: http
containerPort: 8080
protocol: TCP
@@ -47,8 +45,4 @@ spec:
port: 8080
initialDelaySeconds: 10
periodSeconds: 30
volumeMounts:
- name: oc-pem
mountPath: /app/pem
readOnly: true
{{- end }}

View File

@@ -7,6 +7,9 @@ metadata:
app: oc-catalog-svc
spec:
ports:
- port: 4002
targetPort: 4002
name: libp2p
- name: http
port: 8080
protocol: TCP

View File

@@ -19,21 +19,12 @@ spec:
imagePullSecrets:
- name: regcred
{{- end }}
volumes:
- name: oc-pem
secret:
secretName: oc-peer-pem
optional: true
containers:
- image: "{{ .Values.ocPeer.image }}"
name: oc-peer
envFrom:
- configMapRef:
name: opencloud-config
volumeMounts:
- name: oc-pem
mountPath: /app/pem
readOnly: true
livenessProbe:
httpGet:
path: /oc/version
@@ -41,6 +32,9 @@ spec:
initialDelaySeconds: 10
periodSeconds: 30
ports:
- containerPort: 4001
name: libp2p
protocol: TCP
- name: http
containerPort: 8080
protocol: TCP

View File

@@ -7,6 +7,9 @@ metadata:
app: oc-peer-svc
spec:
ports:
- port: 4001
targetPort: 4001
name: libp2p
- name: http
port: 8080
protocol: TCP

View File

@@ -3,10 +3,13 @@ kind: ConfigMap
metadata:
name: opencloud-config
data:
OC_NAME: "{{ .Values.host }}"
OC_HOSTNAME: "{{ .Values.scheme }}://{{ .Values.host }}:{{ .Values.hostPort }}"
OC_NAMESPACE: "{{ .Release.Namespace }}"
OC_ADMIN_ROLE: "{{ .Values.ocAuth.keto.adminRole }}"
OC_PUBLIC_KEY_PATH: "/keys/public/public.pem"
OC_PRIVATE_KEY_PATH: "/keys/private/private.pem"
OC_PSK_PATH: "/etc/psk/psk"
OC_PUBLIC_KEY_PATH: "/etc/keys/public.pem"
OC_PRIVATE_KEY_PATH: "/etc/keys/private.pem"
OC_OAUTH2_CLIENT_SECRET_NAME: "{{ .Values.ocAuth.hydra.openCloudOauth2ClientSecretName }}"
OC_AUTH: "{{ .Values.ocAuth.authType }}"
OC_AUTH_CONNECTOR_HOST: "{{ .Release.Name }}-hydra-admin.{{ .Release.Namespace }}"
@@ -21,6 +24,7 @@ data:
OC_LDAP_BINDDN: "{{ index .Values.ocAuth.ldap.bindDn }}"
OC_LDAP_BINDPW: "{{ index .Values.ocAuth.ldap.binPwd }}"
OC_LDAP_BASEDN: "{{ index .Values.ocAuth.ldap.baseDn }}"
OC_LDAP_USER_BASEDN: "{{ index .Values.ocAuth.ldap.userBaseDn }}"
OC_LDAP_ROLE_BASEDN: "{{ index .Values.ocAuth.ldap.roleBaseDn }}"
OC_MONGO_URL: "mongodb://{{ index .Values.mongodb.auth.rootUser }}:{{ index .Values.mongodb.auth.rootPassword }}@{{ .Release.Name }}-mongodb.{{ .Release.Namespace }}:27017/{{ index .Values.mongodb.auth.databases 0 }}"
OC_MONGO_DATABASE: "{{ index .Values.mongodb.auth.databases 0 }}"