Skip to content

Instantly share code, notes, and snippets.

@scottisloud
Last active June 27, 2023 17:12
Show Gist options
  • Select an option

  • Save scottisloud/ee9ff825689f39a900386df573038b04 to your computer and use it in GitHub Desktop.

Select an option

Save scottisloud/ee9ff825689f39a900386df573038b04 to your computer and use it in GitHub Desktop.
yaml modified for provided TLS cert
apiVersion: apps/v1
kind: Deployment
metadata:
name: op-connect
spec:
selector:
matchLabels:
app: op-connect
template:
metadata:
labels:
app: op-connect
spec:
volumes:
- name: shared-data
emptyDir: {}
- name: credentials
secret:
secretName: op-credentials
initContainers:
- name: sqlite-permissions
image: alpine:3.12
command:
- "/bin/sh"
- "-c"
args:
- "mkdir -p /home/opuser/.op/data && chown -R 999 /home/opuser && chmod -R 700 /home/opuser && chmod -f -R 600 /home/opuser/.op/config || :"
volumeMounts:
- mountPath: /home/opuser/.op/data
name: shared-data
containers:
- name: connect-api
image: 1password/connect-api:1.5.7
resources:
limits:
memory: "128Mi"
cpu: "0.2"
ports:
- name: connect-api
containerPort: 8080
env:
- name: OP_SESSION
value: /home/opuser/.config/1password-credentials.json
- name: OP_TLS_CERT_FILE
value: /home/opuser/.config/cert.pem
- name: OP_TLS_KEY_FILE
value: /home/opuser/.config/key.pem
volumeMounts:
- mountPath: /home/opuser/.op/data
name: shared-data
- mountPath: /home/opuser/.config
name: credentials
readOnly: true
livenessProbe:
httpGet:
path: /heartbeat
port: connect-api
initialDelaySeconds: 3
periodSeconds: 3
readinessProbe:
httpGet:
path: /health
port: connect-api
initialDelaySeconds: 5
periodSeconds: 5
- name: connect-sync
image: 1password/connect-sync:1.5.7
resources:
limits:
memory: "128Mi"
cpu: "0.2"
ports:
- name: connect-sync
containerPort: 8081
env:
- name: OP_SESSION
value: /home/opuser/.config/1password-credentials.json
- name: OP_HTTP_PORT
value: "8081"
volumeMounts:
- mountPath: /home/opuser/.op/data
name: shared-data
- mountPath: /home/opuser/.config
name: credentials
readOnly: true
livenessProbe:
httpGet:
path: /heartbeat
port: connect-sync
initialDelaySeconds: 3
periodSeconds: 3
readinessProbe:
httpGet:
path: /health
port: connect-sync
initialDelaySeconds: 5
periodSeconds: 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment