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

Store SSL certificate on secret #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
10 changes: 10 additions & 0 deletions MongoosePush/templates/mongoosepush-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: Secret
metadata:
name: mongoosepush-secret
type: Opaque
data:
rest_cert.pem: >-
Q2VydGlmaWNhdGU6CiAgICBEYXRhOgogICAgICAgIFZlcnNpb246IDMgKDB4MikKICAgICAgICBTZXJpYWwgTnVtYmVyOiAxICgweDEpCiAgICAgICAgU2lnbmF0dXJlIEFsZ29yaXRobTogc2hhMjU2V2l0aFJTQUVuY3J5cHRpb24KICAgICAgICBJc3N1ZXI6IEM9UEwsIFNUPU1hbG9wb2xza2EsIEw9S3Jha293LCBDTj1Nb25nb29zZUlNIEZha2UgQ0EKICAgICAgICBWYWxpZGl0eQogICAgICAgICAgICBOb3QgQmVmb3JlOiBEZWMgMTIgMDc6MDk6NTYgMjAyMiBHTVQKICAgICAgICAgICAgTm90IEFmdGVyIDogU2VwICA3IDA3OjA5OjU2IDIwMjUgR01UCiAgICAgICAgU3ViamVjdDogQz1QTCwgU1Q9TWFsb3BvbHNrYSwgTD1LcmFrb3csIENOPU1vbmdvb3NlSU0KICAgICAgICBTdWJqZWN0IFB1YmxpYyBLZXkgSW5mbzoKICAgICAgICAgICAgUHVibGljIEtleSBBbGdvcml0aG06IHJzYUVuY3J5cHRpb24KICAgICAgICAgICAgICAgIFJTQSBQdWJsaWMtS2V5OiAoMjA0OCBiaXQpCiAgICAgICAgICAgICAgICBNb2R1bHVzOgogICAgICAgICA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VdjAzTk51Yi9PRGRNbm5BUW9QMVF2V08wSy9RdEY4ZGdrVDJVSjJOd0V3NEp2Y3EyNwpyS0JxS2s0U3ovTUNnWUJPellxMjZuWk1Mc1ZYZ1pha0dFSjlleU1PVG53WURwNmNuQURNV1ZKTzRvQ1V6Slc4ClcvRlJHallUOXAzQ0VjNTQ3RkN1SnB2YjNKbE9KaG5OVkJhQmIrWHJ6YUJOaXhFc1YxL3dHb1c3S1RVR2hHYzUKcERwTnoxVW1tMlMyV25qNFBFR1BCcUZSOHpQWm5NZnVrVDM1dTJiK1JKcTcvSEVXTWtqMXE3VTBHUUtCZ1FEWgpQcDdaNjZlUi9VODhJOWZDdXFFaUtwYWVmeFF2QndNdlhkODl2MFNjWVhmZ2g0d1drclgwelFCWG5nKy9OY2NsClFNMks2Z2diMy9xYWtTeDJsK0pYMlpHQzNHK1ZScUxNWWZlVUpITFZOaUpXWW9sRnQ1TE50S2VYVWhFZjJQbjUKMUhsbzBxYUtyS1owQlJ2WVA5ZkZ1dlF2Uml3VFU2UWVMT0F3MG9aS293S0JnSGNsazJMU1NldVNQVGU4VEludAptb0ZpK3F2Z01HZTdYTitzaGRoVFFPK2RuRCtTK1VZZVNpR3JyRkduMW1CaEtEaWFKU1hVbEMwYi9sRGpVY1lMClEyY3lzcEdtUUtId2pKbklCL1RBQWlRSHN0dVBqSHdiWFRUeXA3MWxKN0JpUDVQVWF0ekN0c0NTRTQ4c3JTTFEKaElyazVvQVQyby9hb0JNcFlCME95SlZmCi0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0=
12 changes: 10 additions & 2 deletions MongoosePush/templates/mongoosepush.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ apiVersion: apps/v1
kind: ReplicaSet
metadata:
name: mongoosepush
namespace: default
spec:
replicas: 1
selector:
Expand All @@ -20,19 +19,28 @@ spec:
env:
- name: PUSH_APNS_ENABLED
value: "false"
- name: PUSH_HTTPS_CERTFILE
value: /opt/app/priv/ssl/rest_cert.pem
- name: PUSH_HTTPS_KEYFILE
value: /opt/app/priv/ssl/rest_key.pem
volumeMounts:
- name: config-map
mountPath: /opt/app/priv/fcm
- name: secret
readOnly: true
mountPath: /opt/app/priv/ssl
volumes:
- name: config-map
configMap:
name: mongoosepush-cm
- name: secret
secret:
secretName: mongoosepush-secret
---
apiVersion: v1
kind: Service
metadata:
name: mongoosepush
namespace: default
spec:
clusterIP: None
ports:
Expand Down