diff options
author | Vincent Ambo <mail@tazj.in> | 2019-09-02T18·04+0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-02T18·04+0100 |
commit | 2f239426aa4b9783c301a0ecbb4a9a4fd8b8e6dd (patch) | |
tree | 6656efbc41e5dd9c90759b7773538ac064666d54 /infra/kubernetes/nginx/nginx.yaml | |
parent | 4bd6d528008c6a8a7357a2c40013931800582252 (diff) | |
parent | e2feae3387e5d95715bdd27cd62753a18abf16bd (diff) |
Merge pull request #2 from tazjin/refactor/nixos-nginx-cleanup r/73
Remove old NixOS config and move oslo.pub
Diffstat (limited to 'infra/kubernetes/nginx/nginx.yaml')
-rw-r--r-- | infra/kubernetes/nginx/nginx.yaml | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/infra/kubernetes/nginx/nginx.yaml b/infra/kubernetes/nginx/nginx.yaml new file mode 100644 index 000000000000..c107ab68764a --- /dev/null +++ b/infra/kubernetes/nginx/nginx.yaml @@ -0,0 +1,55 @@ +# Deploy an nginx instance which serves ... redirects. +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: nginx-conf +data: + nginx.conf: {{ insertFile "nginx.conf" | toJson }} +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: nginx + labels: + app: nginx +spec: + replicas: 2 + selector: + matchLabels: + app: nginx + template: + metadata: + labels: + app: nginx + config: {{ insertFile "nginx.conf" | sha1sum }} + spec: + containers: + - name: tazblog + image: nixery.local/shell/nginx + command: ["/bin/bash", "-c"] + args: + - | + echo 'nogroup:x:30000:nobody' >> /etc/group + echo 'nobody:x:30000:30000:nobody:/tmp:/bin/bash' >> /etc/passwd + exec nginx -c /etc/nginx/nginx.conf + volumeMounts: + - name: nginx-conf + mountPath: /etc/nginx + volumes: + - name: nginx-conf + configMap: + name: nginx-conf +--- +apiVersion: v1 +kind: Service +metadata: + name: nginx +spec: + type: NodePort + selector: + app: nginx + ports: + - protocol: TCP + port: 80 + targetPort: 80 |