Skip to content

Commit

Permalink
update docs for mount option
Browse files Browse the repository at this point in the history
  • Loading branch information
usamaahmadkhan committed Apr 30, 2019
1 parent fda956f commit 0a90a00
Show file tree
Hide file tree
Showing 2 changed files with 104 additions and 82 deletions.
159 changes: 78 additions & 81 deletions deployments/kubernetes/ingressmonitorcontroller.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
---
# Source: ingressmonitorcontroller/templates/role.yaml

---
# Source: ingressmonitorcontroller/templates/deployment.yaml
apiVersion: extensions/v1beta1
kind: Deployment
# Source: ingressmonitorcontroller/templates/configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: ingressmonitorcontroller
annotations:
configmap.reloader.stakater.com/reload: ingressmonitorcontroller

labels:
app: ingressmonitorcontroller
chart: "ingressmonitorcontroller-v1.0.67"
Expand All @@ -19,46 +15,34 @@ metadata:
group: com.stakater.platform
provider: stakater

name: ingressmonitorcontroller
spec:
replicas: 1
revisionHistoryLimit: 2
selector:
matchLabels:
app: ingressmonitorcontroller
release: "RELEASE-NAME"
group: com.stakater.platform
provider: stakater

template:
metadata:
labels:
app: ingressmonitorcontroller
chart: "ingressmonitorcontroller-v1.0.67"
release: "RELEASE-NAME"
heritage: "Tiller"
version: v1.0.67

group: com.stakater.platform
provider: stakater

spec:
containers:
- env:
- name: CONFIG_FILE_PATH
value: /etc/IngressMonitorController/config.yaml
image: "stakater/ingressmonitorcontroller:v1.0.67"
imagePullPolicy: IfNotPresent
name: ingressmonitorcontroller
volumeMounts:
- mountPath: /etc/IngressMonitorController
name: config-volume
serviceAccountName: ingressmonitorcontroller
volumes:
- configMap:
name: ingressmonitorcontroller
name: config-volume
data:
config.yaml: |-
providers:
- name: UptimeRobot
apiKey: your-api-key
apiURL: https://google.com
username: null
password: null
alertContacts: some-alert-contacts
enableMonitorDeletion: true
monitorNameTemplate: "{{.Namespace}}-{{.IngressName}}"
---
# Source: ingressmonitorcontroller/templates/serviceaccount.yaml

apiVersion: v1
kind: ServiceAccount
metadata:
labels:
app: ingressmonitorcontroller
chart: "ingressmonitorcontroller-v1.0.62"
release: "RELEASE-NAME"
heritage: "Tiller"
version: v1.0.62

group: com.stakater.platform
provider: stakater

name: ingressmonitorcontroller
---
# Source: ingressmonitorcontroller/templates/clusterrole.yaml

Expand Down Expand Up @@ -90,9 +74,6 @@ rules:
- list
- get
- watch
---
# Source: ingressmonitorcontroller/templates/rolebinding.yaml

---
# Source: ingressmonitorcontroller/templates/clusterrolebinding.yaml

Expand All @@ -109,12 +90,13 @@ subjects:
name: ingressmonitorcontroller
namespace: default
---
# Source: ingressmonitorcontroller/templates/configmap.yaml
apiVersion: v1
kind: ConfigMap
# Source: ingressmonitorcontroller/templates/deployment.yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: ingressmonitorcontroller
annotations:
configmap.reloader.stakater.com/reload: ingressmonitorcontroller

labels:
app: ingressmonitorcontroller
chart: "ingressmonitorcontroller-v1.0.67"
Expand All @@ -125,33 +107,48 @@ metadata:
group: com.stakater.platform
provider: stakater

data:
config.yaml: |-
providers:
- name: UptimeRobot
apiKey: your-api-key
apiURL: https://google.com
username: null
password: null
accountEmail: null
alertContacts: some-alert-contacts
enableMonitorDeletion: true
monitorNameTemplate: "{{.Namespace}}-{{.IngressName}}"
name: ingressmonitorcontroller
spec:
replicas: 1
revisionHistoryLimit: 2
selector:
matchLabels:
app: ingressmonitorcontroller
release: "RELEASE-NAME"
group: com.stakater.platform
provider: stakater

template:
metadata:
labels:
app: ingressmonitorcontroller
chart: "ingressmonitorcontroller-v1.0.62"
release: "RELEASE-NAME"
heritage: "Tiller"
version: v1.0.62

group: com.stakater.platform
provider: stakater

spec:
containers:
- env:
- name: CONFIG_FILE_PATH
value: /etc/IngressMonitorController/config.yaml
image: "stakater/ingressmonitorcontroller:v1.0.62"
imagePullPolicy: IfNotPresent
name: ingressmonitorcontroller
volumeMounts:
- mountPath: /etc/IngressMonitorController
name: config-volume
serviceAccountName: ingressmonitorcontroller
volumes:
- configMap:
name: ingressmonitorcontroller
name: config-volume
---
# Source: ingressmonitorcontroller/templates/role.yaml

---
# Source: ingressmonitorcontroller/templates/serviceaccount.yaml
# Source: ingressmonitorcontroller/templates/rolebinding.yaml

apiVersion: v1
kind: ServiceAccount
metadata:
labels:
app: ingressmonitorcontroller
chart: "ingressmonitorcontroller-v1.0.67"
release: "RELEASE-NAME"
heritage: "Tiller"
version: v1.0.67

group: com.stakater.platform
provider: stakater

name: ingressmonitorcontroller
27 changes: 26 additions & 1 deletion docs/Deploying-to-Kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Following are the available options that you can use to customize the controller
| secrets | An array of secrets that you want to mount to your controller |
| enableMonitorDeletion | A safeguard flag that is used to enable or disable monitor deletion on ingress deletion (Useful for prod environments where you don't want to remove monitor on ingress deletion) |
| watchNamespace | Name of the namespace if you want to monitor ingresses only in that namespace. Defaults to null |
| mount | `"secret"` or `"configMap"`. How to pass user credentials, API keys etc. |

For the list of providers, there are a number of options that you need to specify. The table below lists them:

Expand Down Expand Up @@ -65,7 +66,31 @@ The Ingress Monitor Controller can be deployed with vanilla manifests or Helm Ch

#### Configuring

The configuration discussed in the above section needs to be done by modifying `config.yaml` data for the ConfigMap resource in the `ingressmonitorcontroller.yaml` file.
The configuration discussed in the above section needs to be done by modifying `config.yaml` data for the ConfigMap resource in the `ingressmonitorcontroller.yaml` file.

##### Using Secrets

To pass user credentials/ API keys in secrets:

1. Open [values.yaml](https://github.com/stakater/IngressMonitorController/blob/master/deployments/kubernetes/chart/ingressmonitorcontroller/values.yaml) file by navigating to `deployments/kubernetes/chart/ingressmonitorcontroller/`

2. Set `mount` equals to `"secret"` and pass the data in the data section at the bottom.

3. Run `helm template . > file_to_generate.yaml`

4. Deploy using the `Deploying` section below.

##### Using ConfigMap

To pass user credentials/ API keys in secrets:

1. Open [values.yaml](https://github.com/stakater/IngressMonitorController/blob/master/deployments/kubernetes/chart/ingressmonitorcontroller/values.yaml) file by navigating to `deployments/kubernetes/chart/ingressmonitorcontroller/`

2. Set `mount` equals to `"configMap"` and pass the data in the data section at the bottom.

3. Run `helm template . > file_to_generate.yaml`

4. Deploy using the `Deploying` section below.

##### Running for a single namespace

Expand Down

0 comments on commit 0a90a00

Please sign in to comment.