Skip to content

Commit d8711ba

Browse files
embano1alexellis
authored andcommitted
Add instructions for basic auth and DRS workaround
- detailed information for basic_auth enabled OpenFaaS deployment - work around the DRS powered on issue Signed-off-by: Michael Gasch <[email protected]>
1 parent fdb9ec8 commit d8711ba

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ Functions can subscribe to events in vCenter through the "topic" [annotations](h
3434

3535
In the following example we will subscribe to the event "vm.powered.on" by adding an annotation to our function of "vm.powered.on". The function will then add a specific tag to any VM when it is powered on.
3636

37+
**Note:** In a DRS-enabled cluster the event is called `drs...` and the example would not work as it's a different event type. If you run this example in a DRS cluster you can use `vm.powered.off` throughout the example below as a workaround.
38+
3739
1) Create a category/tag to be attached to a VM when it is powered on. Since we need the unique tag ID (i.e. vSphere URN) we will use [govc](https://github.com/vmware/govmomi/tree/master/govc) for this job. You can also use vSphere APIs (REST/SOAP) to retrieve the URN.
3840

3941
```bash
@@ -85,7 +87,7 @@ URL: http://127.0.0.1:8080/function/pytag-fn
8587
8688
6) Download and deploy the OpenFaaS vCenter Connector deployment manifest in a separate
8789
88-
> **Note:** The deployment assumes you have [basic authentication](https://docs.openfaas.com/reference/authentication/#for-the-api-gateway) configured for the OpenFaaS gateway. Thus, the deployment assumes a secret `basic-auth` to be available (`volumes` section in the YAML). If you don't use authentication for the gateway, remove the volumes section as the deployment would fail, not being able to mount the secret to the pod.
90+
> **Note:** The deployment assumes you have basic authentication configured for OpenFaaS on Kubernetes as per [this guide](https://github.com/openfaas/faas-netes/blob/67f61a468bc73833e53b626fa5243f5d539a9e00/yaml/README.md#L5). Thus, the deployment assumes a secret `gateway-basic-auth` to be available (`volumes` section in the YAML). If you don't use authentication for the gateway, remove the volumes section as the deployment would fail, not being able to mount the secret to the deployment.
8991

9092
```bash
9193
git clone https://github.com/openfaas-incubator/vcenter-connector

yaml/kubernetes/connector-dep.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ spec:
2424
- name: secret_mount_path
2525
value: "/var/secrets/"
2626
volumeMounts:
27-
- name: auth
27+
- name: gateway-basic-auth
2828
readOnly: true
2929
mountPath: "/var/secrets/"
3030
# if you do not have authentication enabled for OpenFaaS comment this out
3131
volumes:
32-
- name: auth
32+
- name: gateway-basic-auth
3333
secret:
34-
secretName: basic-auth
34+
secretName: gateway-basic-auth

0 commit comments

Comments
 (0)