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
What did you do?
Running operator-sdk new fails because a kubeconfig cannot be found.
What did you expect to see?
Generation of Helm Operator files (Dockerfile, yamls, etc.)
What did you see instead? Under which circumstances?
INFO[0000] Creating new Helm operator 'instance-operator'.
INFO[0000] Created helm-charts/instance
Error: failed to get kubernetes config: could not locate a kubeconfig
Usage:
operator-sdk new <project-name> [flags]
Flags:
--api-version string Kubernetes apiVersion and has a format of $GROUP_NAME/$VERSION (e.g app.example.com/v1alpha1) - used with "ansible" or "helm" types
--dep-manager string Dependency manager the new project will use (choices: "dep", "modules") (default "modules")
--generate-playbook Generate a playbook skeleton. (Only used for --type ansible)
--header-file string Path to file containing headers for generated Go files. Copied to hack/boilerplate.go.txt
--helm-chart string Initialize helm operator with existing helm chart (<URL>, <repo>/<name>, or local path)
--helm-chart-repo string Chart repository URL for the requested helm chart
--helm-chart-version string Specific version of the helm chart (default is latest version)
-h, --help help for new
--kind string Kubernetes CustomResourceDefintion kind. (e.g AppService) - used with "ansible" or "helm" types
--skip-git-init Do not init the directory as a git repository
--type string Type of operator to initialize (choices: "go", "ansible" or "helm") (default "go")
Global Flags:
--verbose Enable verbose logging
Environment
operator-sdk version:
0.8.1
Kubernetes version information:
1.15.0
Kubernetes cluster kind:
Additional context
I understand needing a kubeconfig for testing with up but this shouldn't be needed for creating a new Operator. My use case is that I have Docker systems where I can build/publish images but is separate from my kubernetes cluster. While I may be able to find a work around with a fake K8s config, I think there should be an official solution.
The text was updated successfully, but these errors were encountered:
@pgerv12 The reason the Helm operator project scaffolding using a kubeconfig is that it generates an RBAC role for the chart by rendering the default chart and then looking up the manifest resources using the Kubernetes discovery API.
Having said that, we have logic to handle generation errors by reverting to the default rules built into the SDK scaffolds. We could look into extending that logic to work in the case of a missing or broken kubeconfig as well.
Type of question
operator-sdk general context
Question
What did you do?
Running
operator-sdk new
fails because a kubeconfig cannot be found.What did you expect to see?
Generation of Helm Operator files (Dockerfile, yamls, etc.)
What did you see instead? Under which circumstances?
Environment
operator-sdk version:
0.8.1
Kubernetes version information:
1.15.0
Kubernetes cluster kind:
Additional context
I understand needing a kubeconfig for testing with
up
but this shouldn't be needed for creating a new Operator. My use case is that I have Docker systems where I can build/publish images but is separate from my kubernetes cluster. While I may be able to find a work around with a fake K8s config, I think there should be an official solution.The text was updated successfully, but these errors were encountered: