From d9b668002c46411cca29b929d9d0edeae42e8d4c Mon Sep 17 00:00:00 2001 From: Bobby Rullo Date: Tue, 8 Sep 2015 14:53:53 -0700 Subject: [PATCH] contrib/k8s: get yaml up-to-date with latest k8s --- .../{authd-overlord-rc.yaml => dex-overlord-rc.yaml} | 10 ++++++++-- ...erlord-service.yaml => dex-overlord-service.yaml} | 2 +- .../k8s/{authd-worker-rc.yaml => dex-worker-rc.yaml} | 4 ++-- ...d-worker-service.yaml => dex-worker-service.yaml} | 8 ++++++-- contrib/k8s/postgres-rc.yaml | 12 ++++-------- contrib/k8s/postgres-service.yaml | 4 ++-- 6 files changed, 23 insertions(+), 17 deletions(-) rename contrib/k8s/{authd-overlord-rc.yaml => dex-overlord-rc.yaml} (52%) rename contrib/k8s/{authd-overlord-service.yaml => dex-overlord-service.yaml} (89%) rename contrib/k8s/{authd-worker-rc.yaml => dex-worker-rc.yaml} (70%) rename contrib/k8s/{authd-worker-service.yaml => dex-worker-service.yaml} (59%) diff --git a/contrib/k8s/authd-overlord-rc.yaml b/contrib/k8s/dex-overlord-rc.yaml similarity index 52% rename from contrib/k8s/authd-overlord-rc.yaml rename to contrib/k8s/dex-overlord-rc.yaml index f05611ad..8966375e 100644 --- a/contrib/k8s/authd-overlord-rc.yaml +++ b/contrib/k8s/dex-overlord-rc.yaml @@ -1,4 +1,4 @@ -apiVersion: v1beta3 +apiVersion: v1 kind: ReplicationController metadata: labels: @@ -19,7 +19,13 @@ spec: containers: - image: quay.io/coreos/dex name: dex-overlord - command: ["/opt/dex/bin/dex-overlord", "-key-secret", "XXXXXXXXXXXXX", "-db-url", "postgres://postgres@auth-postgres.default.tectonic.local:5432/auth?sslmode=disable"] + command: ["/opt/dex/bin/dex-overlord", "-key-secrets", "eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHg=", "-db-url", "postgres://postgres@dex-postgres.default:5432/postgres?sslmode=disable"] ports: - containerPort: 5557 name: overlord-port + livenessProbe: + httpGet: + path: /health + port: 5557 + initialDelaySeconds: 15 + timeoutSeconds: 1 diff --git a/contrib/k8s/authd-overlord-service.yaml b/contrib/k8s/dex-overlord-service.yaml similarity index 89% rename from contrib/k8s/authd-overlord-service.yaml rename to contrib/k8s/dex-overlord-service.yaml index 5df40a9f..a5cb0f74 100644 --- a/contrib/k8s/authd-overlord-service.yaml +++ b/contrib/k8s/dex-overlord-service.yaml @@ -1,4 +1,4 @@ -apiVersion: v1beta3 +apiVersion: v1 kind: Service metadata: labels: diff --git a/contrib/k8s/authd-worker-rc.yaml b/contrib/k8s/dex-worker-rc.yaml similarity index 70% rename from contrib/k8s/authd-worker-rc.yaml rename to contrib/k8s/dex-worker-rc.yaml index 1c0397b7..6d26f841 100644 --- a/contrib/k8s/authd-worker-rc.yaml +++ b/contrib/k8s/dex-worker-rc.yaml @@ -1,4 +1,4 @@ -apiVersion: v1beta3 +apiVersion: v1 kind: ReplicationController metadata: labels: @@ -19,7 +19,7 @@ spec: containers: - image: quay.io/coreos/dex name: dex-worker - command: ["/opt/dex/bin/dex-worker", "-issuer", "http://dex-worker.default.tectonic.local:5556", "-key-secret", "XXXXXXXXXXX", "-db-url", "postgres://postgres@auth-postgres.default.tectonic.local:5432/auth?sslmode=disable"] + command: ["/opt/dex/bin/dex-worker", "-issuer", "http://dex-worker.default:5556", "-key-secrets", "eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHg=", "-db-url", "postgres://postgres@dex-postgres.default:5432/postgres?sslmode=disable", "-email-cfg", "/opt/dex/email/emailer.json", "-listen", "http://0.0.0.0:5556"] ports: - containerPort: 5556 name: worker-port diff --git a/contrib/k8s/authd-worker-service.yaml b/contrib/k8s/dex-worker-service.yaml similarity index 59% rename from contrib/k8s/authd-worker-service.yaml rename to contrib/k8s/dex-worker-service.yaml index 020fd2a9..514ddb4e 100644 --- a/contrib/k8s/authd-worker-service.yaml +++ b/contrib/k8s/dex-worker-service.yaml @@ -1,4 +1,4 @@ -apiVersion: v1beta3 +apiVersion: v1 kind: Service metadata: labels: @@ -6,8 +6,12 @@ metadata: role: worker name: dex-worker spec: + type: "NodePort" ports: - - port: 5556 + - name: "worker" + port: 5556 + nodePort: 30556 + selector: app: dex role: worker diff --git a/contrib/k8s/postgres-rc.yaml b/contrib/k8s/postgres-rc.yaml index cdb1c8c2..7f7cf76c 100644 --- a/contrib/k8s/postgres-rc.yaml +++ b/contrib/k8s/postgres-rc.yaml @@ -1,9 +1,9 @@ -apiVersion: v1beta3 +apiVersion: v1 kind: ReplicationController metadata: labels: app: postgres - name: auth-postgres + name: dex-postgres spec: replicas: 1 selector: @@ -14,12 +14,8 @@ spec: app: postgres spec: containers: - - image: quay.io/sym3tri/postgres-dev:9.4 - name: auth-postgres - env: - - name: DATABASES - key: DATABASES - value: auth + - image: postgres + name: dex-postgres ports: - containerPort: 5432 name: postgres-port diff --git a/contrib/k8s/postgres-service.yaml b/contrib/k8s/postgres-service.yaml index f3fb7b5e..09e1d27f 100644 --- a/contrib/k8s/postgres-service.yaml +++ b/contrib/k8s/postgres-service.yaml @@ -1,9 +1,9 @@ -apiVersion: v1beta3 +apiVersion: v1 kind: Service metadata: labels: app: postgres - name: auth-postgres + name: dex-postgres spec: ports: - port: 5432