diff --git a/README.md b/README.md index a30c0c8..ee68301 100644 --- a/README.md +++ b/README.md @@ -33,9 +33,11 @@ The following instructions show how to run and test `nats-connector` on Kubernet 2. Deploy the connector with: ```bash - kubectl apply -f ./yaml/kubernetes/connector-dep.yaml + arkade install nats-connector ``` + Or deploy via the [nats-connector Helm chart](https://github.com/openfaas/faas-netes/tree/master/chart/nats-connector) instead + 3. Deploy the `publish-message` function ```bash @@ -76,7 +78,7 @@ make build push ### Configuration -Configuration is by environment variable, which can be set in the Kubernetes YAML file: [yaml/kubernetes/connector-dep.yaml](./yaml/kubernetes/connector-dep.yaml) +Configuration of the binary is by environment variable. The names vary for the values.yaml file in [the Helm chart](https://github.com/openfaas/faas-netes/tree/master/chart/nats-connector). | Variable | Description | Default | | -------------------- | ------------------------------|--------------------------------------------------| @@ -87,4 +89,3 @@ Configuration is by environment variable, which can be set in the Kubernetes YAM | `upstream_timeout` | Timeout to wait for synchronous invocations | `60s` | | `rebuild_interval` | Interval at which to rebuild the map of topics <> functions | `5s` | | `topic_delimiter` | Used to separate items in `topics` variable | `,` | - diff --git a/yaml/connector-swarm.yaml b/yaml/connector-swarm.yaml deleted file mode 100644 index 7cf70c5..0000000 --- a/yaml/connector-swarm.yaml +++ /dev/null @@ -1,51 +0,0 @@ -version: "3.2" -services: - nats: - image: nats-streaming:0.11.2 - # Uncomment the following port mappings if you wish to expose the - # NATS client and/or management ports you must also add `-m 8222` to the command - ports: - - 4222:4222 - - 8222:8222 - command: "--store memory --cluster_id faas-connector" - networks: - - streaming - deploy: - resources: - limits: - memory: 125M - reservations: - memory: 50M - placement: - constraints: - - 'node.platform.os == linux' - - connector: - image: openfaas/nats-connector:0.2.0 - hostname: nats-connector - environment: - gateway_url: http://gateway:8080 - topics: "nats-test," - print_response: "true" - basic_auth: "true" - asynchronous_invocation: "false" - secret_mount_path: "/run/secrets/" - secrets: - - basic-auth-password - - basic-auth-user - networks: - - streaming - - func_functions - -networks: - streaming: - driver: overlay - attachable: true - func_functions: - external: true - -secrets: - basic-auth-user: - external: true - basic-auth-password: - external: true \ No newline at end of file diff --git a/yaml/kubernetes/connector-dep.yaml b/yaml/kubernetes/connector-dep.yaml deleted file mode 100644 index 67421fd..0000000 --- a/yaml/kubernetes/connector-dep.yaml +++ /dev/null @@ -1,50 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: nats-connector - component: nats-connector - name: nats-connector - namespace: openfaas -spec: - replicas: 1 - selector: - matchLabels: - app: nats-connector - component: nats-connector - template: - metadata: - labels: - app: nats-connector - component: nats-connector - spec: - containers: - - name: nats-connector - image: openfaas/nats-connector:0.2.2 - env: - - name: upstream_timeout - value: "1m1s" - - name: gateway_url - value: "http://gateway.openfaas:8080" - - name: topics - value: "nats-test," - - name: print_response - value: "true" - - name: print_response_body - value: "true" - - name: basic_auth - value: "true" - - name: secret_mount_path - value: "/var/secrets/" - - name: topic_delimiter - value: "," - - name: asynchronous_invocation - value: "false" - volumeMounts: - - name: auth - readOnly: true - mountPath: "/var/secrets/" - volumes: - - name: auth - secret: - secretName: basic-auth