Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add helm chart for vcenter-connector #569

Closed
wants to merge 1 commit into from

Conversation

embano1
Copy link

@embano1 embano1 commented Dec 18, 2019

Description

This commit adds a helm chart for the OpenFaaS vcenter-connector.

The chart is a modified version of the kafka-connector helm chart provided in this repo.
This commit includes:

  • A README how to use the chart
  • A chart following the ones provided in the OpenFaaS faas-netes repository
  • vcenter-connector uses flags so values.yaml was modified to
    support flags (extraArgs)
  • Resource requests to guarantee compute resources for the connector
  • Updates to the Makefile to include this chart in the Helm chart
    index

Fixes: openfaas-incubator/vcenter-connector#32

Signed-off-by: Michael Gasch [email protected]

Motivation and Context

  • I have raised an issue to propose this change (required)

How Has This Been Tested?

Versions used:

kubectl version                                                                                                                                                                                                                           
Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.3", GitCommit:"b3cbbae08ec52a7fc73d334838e18d17e8512749", GitTreeState:"clean", BuildDate:"2019-11-14T04:24:34Z", GoVersion:"go1.12.13", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.3", GitCommit:"2d3c76f9091b6bec110a5e63777c332469e0cba2", GitTreeState:"clean", BuildDate:"2019-08-20T18:57:36Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}
helm version
version.BuildInfo{Version:"v3.0.1", GitCommit:"7c22ef9ce89e0ebeb7125ba2ebf7d421f3e82ffa", GitTreeState:"clean", GoVersion:"go1.13.4"}
openfaas/gateway:0.18.3

Deploy the chart (from local dev folder used in this commit) against a vCenter:

helm install vcenter-connector ./vcenter-connector --namespace openfaas --set extraArgs.vcenter=https://vcenter.ip/sdk

Verify the connector starts successfully:

kubectl logs -n openfaas deploy/vcenter-connector -f
2019/12/18 10:58:10 Object Folder:group-d1
2019/12/18 10:58:10 Event [0] &{{{{} 16307 16307 2019-12-18 10:58:08.769208 +0000 UTC VSPHERE.LOCAL\Administrator <nil> <nil> <nil> <nil> <nil> <nil> <nil> User VSPHERE.LOCAL\[email protected] logged in as Go-http-client/1.1 }} 10.30.3.204 Go-http-client/1.1 en_US 52557e10-f3c0-0534-10d1-b3198513d564}
2019/12/18 10:58:12 message: {"topic":"user.login.session","category":"info","source":"10.160.94.63","userName":"VSPHERE.LOCAL\\Administrator","createdTime":"2019-12-18T10:58:08.769208Z"}
2019/12/18 10:58:12 Message on topic: user.login.session
2019/12/18 10:58:19 Syncing topic map

Verify uninstallation:

helm uninstall vcenter-connector --namespace openfaas
release "vcenter-connector" uninstalled

The resulting deployment YAML created by helm using the defaults in values.yaml:

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  annotations:
    deployment.kubernetes.io/revision: "1"
  creationTimestamp: "2019-12-18T10:58:07Z"
  generation: 1
  labels:
    app: vcenter-connector
    app.kubernetes.io/component: vcenter-connector
    app.kubernetes.io/instance: vcenter-connector
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: vcenter-connector
    app.kubernetes.io/part-of: openfaas
    app.kubernetes.io/version: 0.4.0
    chart: vcenter-connector-0.4.0
    component: vcenter-connector
    helm.sh/chart: vcenter-connector-0.4.0
    heritage: Helm
    release: vcenter-connector
  name: vcenter-connector
  namespace: openfaas
  resourceVersion: "17004"
  selfLink: /apis/extensions/v1beta1/namespaces/openfaas/deployments/vcenter-connector
  uid: 73ce06a8-7ecd-4979-9ead-780f5e470c14
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: vcenter-connector
      component: vcenter-connector
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      annotations:
        prometheus.io.scrape: "false"
      creationTimestamp: null
      labels:
        app: vcenter-connector
        component: vcenter-connector
    spec:
      containers:
      - args:
        - --gateway=http://gateway.openfaas:8080
        - --insecure
        - --vc-pass-secret-name=vcenter-password
        - --vc-user-secret-name=vcenter-username
        - --vcenter=https://10.160.94.63/sdk
        command:
        - ./connector
        env:
        - name: gateway_url
          value: http://gateway.openfaas:8080
        - name: print_response
        - name: print_response_body
        - name: secret_mount_path
          value: /var/openfaas/secrets/
        - name: basic_auth
          value: "true"
        image: openfaas/vcenter-connector:0.4.0
        imagePullPolicy: IfNotPresent
        name: vcenter
        resources:
          requests:
            cpu: 100m
            memory: 120Mi
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /var/openfaas/secrets/
          name: auth-secrets-projected
          readOnly: true
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      terminationGracePeriodSeconds: 30
      volumes:
      - name: auth-secrets-projected
        projected:
          defaultMode: 420
          sources:
          - secret:
              items:
              - key: basic-auth-user
                path: basic-auth-user
              - key: basic-auth-password
                path: basic-auth-password
              name: basic-auth
          - secret:
              items:
              - key: vcenter-username
                path: vcenter-username
              - key: vcenter-password
                path: vcenter-password
              name: vcenter-secrets
status:
  availableReplicas: 1
  conditions:
  - lastTransitionTime: "2019-12-18T10:58:08Z"
    lastUpdateTime: "2019-12-18T10:58:08Z"
    message: Deployment has minimum availability.
    reason: MinimumReplicasAvailable
    status: "True"
    type: Available
  - lastTransitionTime: "2019-12-18T10:58:07Z"
    lastUpdateTime: "2019-12-18T10:58:08Z"
    message: ReplicaSet "vcenter-connector-99688cd46" has successfully progressed.
    reason: NewReplicaSetAvailable
    status: "True"
    type: Progressing
  observedGeneration: 1
  readyReplicas: 1
  replicas: 1
  updatedReplicas: 1

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have signed-off my commits with git commit -s
  • I have added tests to cover my changes.
  • All new and existing tests passed.

This commit adds a helm chart for the OpenFaaS
[vcenter-connector](https://github.com/openfaas-incubator/vcenter-connector).

The chart is a modified version of the `kafka-connector` helm chart provided in this repo.
This commit includes:

- [x] A README how to use the chart
- [x] A chart following the ones provided in the OpenFaaS `faas-netes` repository
- [x] vcenter-connector uses flags so `values.yaml` was modified to
support flags (`extraArgs`)
- [x] Resource requests to guarantee compute resources for the connector
- [x] Updates to the Makefile to include this chart in the Helm chart
index

Signed-off-by: Michael Gasch <[email protected]>
@alexellis
Copy link
Member

I would be supportive of adding a chart here, as it seems the main repo doesn't have one yet. https://github.com/openfaas-incubator/openfaas-vcenter-connector

Is this still required / beneficial for your VEBA product @embano1 ?

@embano1
Copy link
Author

embano1 commented Apr 24, 2020

Thank you Alex for getting back on this. No, this is not required anymore and I‘ll go ahead and close the PR.

@embano1 embano1 closed this Apr 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Add helm chart for configuration of options
2 participants