From 61ba135c91654d4c53146f1a123d2f4b0a6994bf Mon Sep 17 00:00:00 2001 From: Ashok Mudukutore Date: Thu, 26 Jul 2018 14:53:01 -0600 Subject: [PATCH] Merge pull request #727 from sjberman/docs Config example for credentials directory --- docs/README.rst | 4 ++ .../example-bigip-credentials-directory.yaml | 43 +++++++++++++++++++ .../sample-k8s-bigip-ctlr-secrets.yaml | 2 +- 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 docs/_static/config_examples/example-bigip-credentials-directory.yaml diff --git a/docs/README.rst b/docs/README.rst index e5f2ea69a..4c975bc0b 100644 --- a/docs/README.rst +++ b/docs/README.rst @@ -174,6 +174,9 @@ BIG-IP system It is important to not project the Secret keys to specific paths, as the controller looks for the "username", "password", and "url" files directly within the credentials directory. + See :fonticon:`fa fa-download` :download:`example-bigip-credentials-directory.yaml ` + for a deployment example. + .. _vxlan configs: VXLAN @@ -746,6 +749,7 @@ Example Configuration Files - :fonticon:`fa fa-download` :download:`sample-k8s-bigip-ctlr-secrets.yaml ` - :fonticon:`fa fa-download` :download:`sample-bigip-credentials-secret.yaml ` +- :fonticon:`fa fa-download` :download:`example-bigip-credentials-directory.yaml ` - :fonticon:`fa fa-download` :download:`example-vs-resource.configmap.yaml ` - :fonticon:`fa fa-download` :download:`example-vs-resource-udp.configmap.yaml ` - :fonticon:`fa fa-download` :download:`example-vs-resource.json ` diff --git a/docs/_static/config_examples/example-bigip-credentials-directory.yaml b/docs/_static/config_examples/example-bigip-credentials-directory.yaml new file mode 100644 index 000000000..ea4ae3f54 --- /dev/null +++ b/docs/_static/config_examples/example-bigip-credentials-directory.yaml @@ -0,0 +1,43 @@ +# Sample configuration for k8s-bigip-ctlr. BIG-IP configuration is mounted +# from the secret store into the controller. +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: k8s-bigip-ctlr + namespace: kube-system +spec: + replicas: 1 + template: + metadata: + name: k8s-bigip-ctlr + labels: + app: k8s-bigip-ctlr + spec: + serviceAccountName: bigip-ctlr-serviceaccount + containers: + - name: k8s-bigip-ctlr + image: "f5networks/k8s-bigip-ctlr" + command: ["/app/bin/k8s-bigip-ctlr"] + args: ["--running-in-cluster=true", + "--credentials-directory=/tmp/creds", + "--bigip-partition=k8s", + "--namespace=default", + ] + volumeMounts: + - name: bigip-creds + mountPath: "/tmp/creds" + readOnly: true + volumes: + - name: bigip-creds + secret: + secretName: bigip-credentials + imagePullSecrets: + - name: f5-docker-images + +--- + +apiVersion: v1 +kind: ServiceAccount +metadata: + name: bigip-ctlr-serviceaccount + namespace: kube-system diff --git a/docs/_static/config_examples/sample-k8s-bigip-ctlr-secrets.yaml b/docs/_static/config_examples/sample-k8s-bigip-ctlr-secrets.yaml index 8c84468cc..53819528e 100644 --- a/docs/_static/config_examples/sample-k8s-bigip-ctlr-secrets.yaml +++ b/docs/_static/config_examples/sample-k8s-bigip-ctlr-secrets.yaml @@ -17,7 +17,7 @@ spec: containers: - name: k8s-bigip-ctlr # Specify the path to your image here - image: "docker-registry/username/k8s-bigip-ctlr:v1.4.2" + image: "f5networks/k8s-bigip-ctlr" env: # Get sensitive values from the bigip-credentials secret - name: BIGIP_USERNAME