-
Notifications
You must be signed in to change notification settings - Fork 0
/
tenancy-fixer.yaml
80 lines (80 loc) · 2.57 KB
/
tenancy-fixer.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
kind: Service
apiVersion: v1
metadata:
namespace: kubeflow-extension
name: tenancy-fixer
labels:
app: tenancy-fixer
spec:
ports:
- name: https
protocol: TCP
port: 443
targetPort: 8080
selector:
app: tenancy-fixer
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: tenancy-fixer
namespace: kubeflow-extension
labels:
app: tenancy-fixer
spec:
replicas: 1
selector:
matchLabels:
app: tenancy-fixer
template:
metadata:
labels:
app: tenancy-fixer
name: tenancy-fixer
namespace: kubeflow-extension
spec:
initContainers:
- name: pem-to-keystore
image: registry.access.redhat.com/redhat-sso-7/sso71-openshift:1.1-16
env:
- name: keyfile
value: /certs/tls.key
- name: crtfile
value: /certs/tls.crt
- name: keystore_pkcs12
value: /var/run/secrets/java.io/keystores/keystore.pkcs12
- name: keystore_jks
value: /var/run/secrets/java.io/keystores/keystore.jks
- name: password
# password is the default value in quarkus's CertificateConfig
value: password
command: ['/bin/bash']
args: ['-c', "openssl pkcs12 -export -inkey $keyfile -in $crtfile -out $keystore_pkcs12 -password pass:$password && keytool -importkeystore -noprompt -srckeystore $keystore_pkcs12 -srcstoretype pkcs12 -destkeystore $keystore_jks -storepass $password -srcstorepass $password"]
volumeMounts:
- name: certs-volume
mountPath: /certs
readOnly: true
- name: keystore-volume
mountPath: /var/run/secrets/java.io/keystores
containers:
- name: tenancy-fixer
image: keeyzar/tenancy-fixer-jvm
env:
- name: JAVA_OPTIONS
value: -Dquarkus.http.host=0.0.0.0
-Dquarkus.http.ssl-port=8080
-Dquarkus.http.ssl.certificate.key-store-file=/var/run/secrets/java.io/keystores/keystore.jks
-Dquarkus.http.ssl.certificate.key-store-password=password
-Djava.util.logging.manager=org.jboss.logmanager.LogManager
volumeMounts:
- name: certs-volume
mountPath: /certs
readOnly: true
- name: keystore-volume
mountPath: /var/run/secrets/java.io/keystores
volumes:
- name: certs-volume
secret:
secretName: tenancy-fixer-tls
- name: keystore-volume
emptyDir: {}