You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26-16Lines changed: 26 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,9 +26,22 @@ The following event types (incl. their subtypes) are supported and can be used t
26
26
27
27
For further details and naming see the [vSphere Web Services API](https://code.vmware.com/apis/358/vsphere#/doc/vim.event.Event.html) documentation.
28
28
29
-
## Other configuration
29
+
## Credentials
30
30
31
-
### Credentials
31
+
### Credentials within Kubernetes
32
+
33
+
When using the connector in Kubernetes, you will need to create a secret for the connector in the `openfaas` namespace.
34
+
35
+
```sh
36
+
kubectl create secret generic vcenter-secrets \
37
+
-n openfaas \
38
+
--from-literal vcenter-username=user \
39
+
--from-literal vcenter-password=pass
40
+
```
41
+
42
+
At runtime these secrets will be mounted at `/var/openfaas/secrets/`. See [/yaml/kubernetes/connector-dep.yml](/yaml/kubernetes/connector-dep.yml) for more.
43
+
44
+
### Using credentials outside of Kubernetes
32
45
33
46
You can pass credentials via arguments (not recommended).
34
47
@@ -38,26 +51,19 @@ You can pass credentials via arguments (not recommended).
38
51
-vc-pass="test1234" \
39
52
```
40
53
41
-
Or use a secret and pass the name:
54
+
Or use a file and pass the name:
42
55
43
56
```sh
57
+
export secret_mount_path="/tmp/secrets/`
58
+
44
59
./vcenter-connector \
45
60
-vc-user="" \
46
61
-vc-pass="" \
47
62
-vc-user-secret-name=vcenter-username \
48
63
-vc-password-secret-name=vcenter-password
49
64
```
50
65
51
-
Use `kubectl` to create the secrets you need ahead of time in the namespace where you deploy the connector.
52
-
53
-
```sh
54
-
kubectl create secret generic vcenter-secrets \
55
-
-n openfaas \
56
-
--from-literal vcenter-username=user \
57
-
--from-literal vcenter-password=pass
58
-
```
59
-
60
-
Now mount your secret at `/var/openfaas/secrets/` in your Kubernetes Deployment YAML file.
66
+
The default path is `/var/openfaas/secrets/` which can be overridden by setting the `secret_mount_path` environment variable.
61
67
62
68
## Example
63
69
@@ -69,8 +75,12 @@ MIT
69
75
70
76
## Acknowledgements
71
77
72
-
Thanks to VMware's Doug MacEachern for the awesome [govmomi](https://github.com/vmware/govmomi) project providing Golang bindings for vCenter and the [vcsim simulator tool](https://github.com/vmware/govmomi/blob/master/vcsim/README.md).
78
+
This project is hosted and maintained by [OpenFaaS Ltd](https://www.openfaas.com/)
79
+
80
+
It makes use of the following components:
73
81
74
-
Thanks to Karol Stępniewski for showing me a demo of events being consumed in OpenFaaS via vCenter over a year ago at KubeCon in Austin. Parts of his "event-driver" originally developed in the Dispatch project have been adapted for this OpenFaaS event-connector including a method to convert camel case event names into names separated by a dot. I wanted to include this for compatibility between the two systems.
82
+
* [govmomi](https://github.com/vmware/govmomi) project providing Golang bindings for vCenter by Doug MacEachern, VMware
83
+
* [vcsim](https://github.com/vmware/govmomi/blob/master/vcsim/README.md) simulator tool by Doug MacEachern, VMware
75
84
76
-
Other acknowledgements: Michael Gasch (VMware) and Ivana Yocheva (VMware).
85
+
The contact for VMware is [Michael Gasch (VMware)](https://github.com/embano1)
86
+
The contact for OpenFaaS Ltd is [Alex Ellis](https://github.com/alexellis)
0 commit comments