Skip to content

Bundle CSV is not populated correctly when using DaemonSet #4325

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

Closed
n1r1 opened this issue Dec 16, 2020 · 1 comment
Closed

Bundle CSV is not populated correctly when using DaemonSet #4325

n1r1 opened this issue Dec 16, 2020 · 1 comment

Comments

@n1r1
Copy link

n1r1 commented Dec 16, 2020

Bug Report

What did you do?

Tried to create a CSV (by using make bundle) for a controller that should be deployed with DaemonSet

What did you expect to see?

CSV file that contains the DaemonSet specified in the manager.yaml under spec.install

What did you see instead? Under which circumstances?

apiVersion: operators.coreos.com/v1alpha1
kind: ClusterServiceVersion
spec:
  install:
    spec:
      deployments: []
    strategy: deployment

Steps to reproduce

To create a minimized workaround I followed the memcachd operator tutorial:

  1. mkdir memcached-operator
  2. cd memcached-operator
  3. operator-sdk init
  4. operator-sdk create api --group cache --version v1 --kind Memcached --resource=true --controller=true
  5. edit config/manager/manager.yaml and replace Deployment with DaemonSet
  6. make bundle

and now bundle/manifests/memcached-operator.clusterserviceversion.yaml will contain quite empty spec.install

Environment

Operator type:

/language go

Kubernetes cluster type: N/A

$ operator-sdk version
operator-sdk version: "v1.1.0", commit: "9d27e224efac78fcc9354ece4e43a50eb30ea968", kubernetes version: "v1.18.2", go version: "go1.15 linux/amd64", GOOS: "linux", GOARCH: "amd64"

$ go version (if language is Go)
go version go1.13.5 linux/amd64

$ kubectl version -
Client Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.0", GitCommit:"70132b0f130acc0bed193d9ba59dd186f0e634cf", GitTreeState:"clean", BuildDate:"2019-12-07T21:20:10Z", GoVersion:"go1.13.4", Compiler:"gc", Platform:"linux/amd64"}

@estroz
Copy link
Member

estroz commented Dec 16, 2020

The CSV spec's install strategy is clear about what it contains (a set of deployments), and if one isn't found by the genertor then the list will be empty. To include DaemonSets is more of an OLM feature request than an operator-sdk bug, and has been asked for before and has gotten this response: operator-framework/operator-lifecycle-manager#1022 (comment).

I suggest keeping your Deployment as-is.

@estroz estroz closed this as completed Dec 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants