Skip to content
This repository was archived by the owner on Jan 25, 2019. It is now read-only.

helm-app-operator: transitioning to use controller-runtime #46

Merged
merged 4 commits into from
Oct 11, 2018
Merged

helm-app-operator: transitioning to use controller-runtime #46

merged 4 commits into from
Oct 11, 2018

Conversation

joelanford
Copy link
Member

  • Updated helm-app-operator to use controller-runtime APIs (e.g. config, manager, controller, reconciler, etc.)
    • Ported cmd/helm-app-operator/main.go to cmd/manager/main.go
    • Ported pkg/stub/handler.go to pkg/helm/controller/reconcile.go
    • Updated pkg/helm/client.go to use manager.Manager
  • Fixed v1alpha1.StatusFor and added passing test.

func NewInstallerFromEnv(storageBackend *storage.Storage, tillerKubeClient *kube.Client) (schema.GroupVersionKind, Installer, error) {
apiVersion := os.Getenv(APIVersionEnvVar)
kind := os.Getenv(KindEnvVar)
chartDir := os.Getenv(HelmChartEnvVar)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know the changes form this PR are temporary, but these envs could be unset.
Not sure what happens in that case with an nil valued gvk.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. The controller eventually panicked trying to add the watches, which I think was the behavior before as well. Updated with some validation.

@hasbro17
Copy link
Collaborator

Copy link
Collaborator

@hasbro17 hasbro17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@joelanford joelanford merged commit 5a7f6f8 into operator-framework:master Oct 11, 2018
@joelanford joelanford deleted the controller-runtime branch October 11, 2018 01:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants