Skip to content

Commit c29e216

Browse files
committed
Update acknowledgements and secret mount path
- update documentation on use of secrets - update acknowledgements and contact-points Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
1 parent 017cab4 commit c29e216

File tree

2 files changed

+28
-18
lines changed

2 files changed

+28
-18
lines changed

README.md

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,22 @@ The following event types (incl. their subtypes) are supported and can be used t
2626

2727
For further details and naming see the [vSphere Web Services API](https://code.vmware.com/apis/358/vsphere#/doc/vim.event.Event.html) documentation.
2828

29-
## Other configuration
29+
## Credentials
3030

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
3245

3346
You can pass credentials via arguments (not recommended).
3447

@@ -38,26 +51,19 @@ You can pass credentials via arguments (not recommended).
3851
-vc-pass="test1234" \
3952
```
4053

41-
Or use a secret and pass the name:
54+
Or use a file and pass the name:
4255

4356
```sh
57+
export secret_mount_path="/tmp/secrets/`
58+
4459
./vcenter-connector \
4560
-vc-user="" \
4661
-vc-pass="" \
4762
-vc-user-secret-name=vcenter-username \
4863
-vc-password-secret-name=vcenter-password
4964
```
5065
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.
6167
6268
## Example
6369
@@ -69,8 +75,12 @@ MIT
6975
7076
## Acknowledgements
7177
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:
7381
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
7584
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)

yaml/kubernetes/connector-dep.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ spec:
2424
- name: basic_auth
2525
value: "true"
2626
- name: secret_mount_path
27-
value: "/var/secrets/"
27+
value: "/var/openfaas/secrets/"
2828
volumeMounts:
2929
- name: auth-secrets-projected
3030
readOnly: true
31-
mountPath: "/var/secrets/"
31+
mountPath: "/var/openfaas/secrets/"
3232
volumes:
3333
- name: auth-secrets-projected
3434
projected:

0 commit comments

Comments
 (0)