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

Operator SDK Version 1.34.1 Fails to Scaffold Ansible Projects #6750

Closed
Tracked by #6767
acornett21 opened this issue Mar 6, 2024 · 9 comments
Closed
Tracked by #6767

Operator SDK Version 1.34.1 Fails to Scaffold Ansible Projects #6750

acornett21 opened this issue Mar 6, 2024 · 9 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. language/ansible Issue is related to an Ansible operator project

Comments

@acornett21
Copy link
Contributor

Bug Report

What did you do?

Run The below

mkdir memcached-operator
cd memcached-operator
operator-sdk init --domain example.com --plugins ansible

What did you expect to see?

A fully scaffold project

What did you see instead? Under which circumstances?

The SDK errors

INFO[0000] Writing kustomize manifests for you to edit... 
Error: failed to initialize project: unable to scaffold with "base.ansible.sdk.operatorframework.io/v1": error updating init manifests: error updating kustomization.yaml files: remove config/default/kustomization.yaml patch and vars blocks: unable to find the content to be replaced

Environment

Operator type:

/language ansible

Kubernetes cluster type:

$ operator-sdk version
operator-sdk version: "v1.34.1", commit: "edaed1e5057db0349568e0b02df3743051b54e68", kubernetes version: "1.28.0", go version: "go1.21.7", GOOS: "linux", GOARCH: "amd64"

$ go version (if language is Go)
Any

$ kubectl version
NA

Possible Solution

Additional context

Copy link

openshift-ci bot commented Mar 6, 2024

@acornett21: The label(s) language/ansible cannot be applied, because the repository doesn't have them.

In response to this:

Bug Report

What did you do?

Run The below

mkdir memcached-operator
cd memcached-operator
operator-sdk init --domain example.com --plugins ansible

What did you expect to see?

A fully scaffold project

What did you see instead? Under which circumstances?

The SDK errors

INFO[0000] Writing kustomize manifests for you to edit... 
Error: failed to initialize project: unable to scaffold with "base.ansible.sdk.operatorframework.io/v1": error updating init manifests: error updating kustomization.yaml files: remove config/default/kustomization.yaml patch and vars blocks: unable to find the content to be replaced

Environment

Operator type:

/language ansible

Kubernetes cluster type:

$ operator-sdk version
operator-sdk version: "v1.34.1", commit: "edaed1e5057db0349568e0b02df3743051b54e68", kubernetes version: "1.28.0", go version: "go1.21.7", GOOS: "linux", GOARCH: "amd64"

$ go version (if language is Go)
Any

$ kubectl version
NA

Possible Solution

Additional context

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@PYLochou
Copy link

PYLochou commented Mar 7, 2024

Same problem here, on macOS (arm64):

% operator-sdk version
operator-sdk version: "v1.34.1", commit: "edaed1e5057db0349568e0b02df3743051b54e68", kubernetes version: "v1.28.0", go version: "go1.21.7", GOOS: "darwin", GOARCH: "arm64"

% kustomize version
v5.3.0

@lerminou
Copy link

same problem here, works with the 1.33

@kuwv
Copy link

kuwv commented Mar 19, 2024

I just ran into this. I was able to create the scaffold about a 1-2 months ago. Unfortunately, the brew installation does not support multiple version installs.

@oceanc80 oceanc80 added the kind/bug Categorizes issue or PR as related to a bug. label May 10, 2024
@openshift-ci openshift-ci bot added the language/ansible Issue is related to an Ansible operator project label May 15, 2024
@grokspawn grokspawn transferred this issue from operator-framework/ansible-operator-plugins May 15, 2024
@acornett21
Copy link
Contributor Author

Updating the ansible version and releasing operator-sdk did not fix this issue, since the root cause analysis seems to be incorrect. The issue is that operator-sdk pulls in a newer dependency of kubebuilder then the ansible plugin is expecting, see dep here.

If one updates this to the version that operator-sdk is running v3.13.1-0.20240119130530-7fba82c768f8, all of the tests fail with the same reason as operator-sdk does.

@gusmb
Copy link

gusmb commented May 16, 2024

Same issue here:

FATA[0000] failed to initialize project: unable to scaffold with "base.ansible.sdk.operatorframework.io/v1": error updating init manifests: error updating kustomization.yaml files: remove config/default/kustomization.yaml patch and vars blocks: unable to find the content to be replaced
$ operator-sdk version
operator-sdk version: "v1.34.2", commit: "81dd3cb24b8744de03d312c1ba23bfc617044005", kubernetes version: "1.28.0", go version: "go1.21.10", GOOS: "linux", GOARCH: "amd64"

@kuwv
Copy link

kuwv commented May 17, 2024

I was able to install an earlier release locally and continue. Hope this gets resolved soon though.

@acornett21
Copy link
Contributor Author

The root cause is fixed in 1.34.3 of the ansible-plugin
https://github.com/operator-framework/ansible-operator-plugins/releases/tag/v1.34.3

@PYLochou
Copy link

I confirm it works now on macOS with operator-sdk 1.35 and kustomize 5.4.2. Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. language/ansible Issue is related to an Ansible operator project
Projects
None yet
Development

No branches or pull requests

6 participants