confd global configuration (otherwise specified as commandline options)
backend = "redis"
nodes = ["localhost:6379"]
client_key = "<<THE-XXXX-PASSWORD>>"
interval = 10
docker run --rm -ti --name rediscli \ | |
--net container:nginx \ | |
redis:alpine \ | |
redis-cli -h localhost -p 6379 -a THE-XXXX-PASSWORD set /myapp/suggestions/drink coffee |
# BUILD STAGE | |
# | |
FROM golang:1.8.3-alpine3.6 AS confd-build-stage | |
WORKDIR /go/src/github.com/kei-sato | |
RUN apk --update add git bash | |
RUN git clone --depth 1 https://github.com/kei-sato/http-echo.git \ | |
&& cd http-echo \ | |
&& go build -o bin/http-echo . \ | |
&& chmod +x bin/http-echo |
#!/bin/sh | |
set -ebm | |
setup_ssh() { | |
echo "Create App Services root password" | |
echo "root:Docker!" | chpasswd | |
echo "Create ssh host keys" | |
ssh-keygen -A |
# This is ssh server systemwide configuration file. | |
# required by Azure AppServices | |
# | |
Port 2222 | |
Ciphers aes128-cbc,3des-cbc,aes256-cbc | |
MACs hmac-sha1,hmac-sha1-96 | |
PermitRootLogin yes | |
PasswordAuthentication yes | |
ListenAddress 0.0.0.0 |
apiVersion: batch/v2alpha1 | |
kind: CronJob | |
metadata: | |
name: aws-registry-credential-cron | |
spec: | |
schedule: "* */8 * * *" | |
successfulJobsHistoryLimit: 2 | |
failedJobsHistoryLimit: 2 | |
jobTemplate: | |
spec: |
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: aws-registry-proxy-tpl | |
data: | |
registry.conf: |- | |
server { | |
listen 8080; | |
# http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size |
# Creates aws registry credentials for the first time | |
# https://medium.com/@xynova/keeping-aws-registry-pull-credentials-fresh-in-kubernetes-2d123f581ca6 | |
apiVersion: batch/v1 | |
kind: Job | |
metadata: | |
name: aws-registry-credential-job | |
spec: | |
backoffLimit: 4 | |
template: | |
spec: |
# Updates aws registry credentials | |
# https://medium.com/@xynova/keeping-aws-registry-pull-credentials-fresh-in-kubernetes-2d123f581ca6 | |
apiVersion: batch/v2alpha1 | |
kind: CronJob | |
metadata: | |
name: aws-registry-credential-cron | |
spec: | |
successfulJobsHistoryLimit: 2 | |
failedJobsHistoryLimit: 2 | |
schedule: "1 */8 * * *" |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: aws-registry-proxy | |
labels: | |
app: aws-registry-proxy | |
buildRef: latest | |
spec: | |
replicas: 2 |