Created
May 28, 2018 20:50
-
-
Save cjimti/f006a4f57dd2ef6245866bf5ba0250fd to your computer and use it in GitHub Desktop.
Example k8s Configuration for txToken
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: authtoken | |
namespace: default | |
labels: | |
app: authtoken | |
spec: | |
selector: | |
app: authtoken | |
ports: | |
- protocol: "TCP" | |
port: 80 | |
targetPort: 80 | |
type: ClusterIP | |
--- | |
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: authtoken | |
namespace: default | |
labels: | |
app: authtoken | |
data: | |
txtoken.yml: |- | |
port: 80 | |
debug: false | |
encKey: "4uydXMddQINg2o4C8M6R2OMImt089hdLl26Y5Rzz2Nf909yRVLdQ2A0LQ05m5M4W" | |
remote: https://auth.example.com/login/ | |
expHours: 1 | |
getTokenRoute: "/txtoken/getToken" | |
checkTokenRoute: "/txtoken/checkToken" | |
requestTokenData: | |
authorization: "internal" | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: authtoken | |
namespace: default | |
labels: | |
app: authtoken | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: authtoken | |
template: | |
metadata: | |
labels: | |
app: authtoken | |
spec: | |
containers: | |
- name: authtoken | |
image: txn2/txtoken:latest | |
imagePullPolicy: Always | |
env: | |
- name: CFG_FILE | |
value: "/etc/config/txtoken.yml" | |
ports: | |
- name: http | |
containerPort: 80 | |
volumeMounts: | |
- name: config-volume | |
mountPath: /etc/config | |
volumes: | |
- name: config-volume | |
configMap: | |
name: authtoken | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
name: authtoken | |
namespace: default | |
labels: | |
app: authtoken | |
spec: | |
rules: | |
- host: some.example.com | |
http: | |
paths: | |
- backend: | |
serviceName: authtoken | |
servicePort: 80 | |
path: /txtoken/ | |
tls: | |
- hosts: | |
- some.example.com | |
secretName: some-example-production-tls |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment