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

fix: update ChaosEngine crd manifest file in graphql server #4205

Merged
merged 4 commits into from
Oct 4, 2023

Conversation

namkyu1999
Copy link
Member

Proposed changes

Currently, the litmus-graphql-server uses an old CRD manifest file. So when you execute the experiment in Litmus version 3.0.0-beta12, you can see the error logs below.

{"mainLogs":"W1003 08:59:55.273647 1 client_config.go:552] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work.\n2023/10/03 08:59:55 Error Creating Resource : ChaosEngine.litmuschaos.io 'pod-network-loss-h6srhrls' is invalid: [spec.experiments[0].spec.probe[0].runProperties.interval: Invalid value: 'string': spec.experiments[0].spec.probe[0].runProperties.interval in body must be of type integer: 'string', spec.experiments[0].spec.probe[0].runProperties.probeTimeout: Invalid value: 'string': spec.experiments[0].spec.probe[0].runProperties.probeTimeout in body must be of type integer: 'string']\n"}

In this PR, I updated ChaosEngine manifest file.
I used this file (https://github.com/litmuschaos/chaos-operator/blob/master/deploy/crds/chaosengine_crd.yaml)

Types of changes

What types of changes does your code introduce to Litmus? Put an x in the boxes that apply

  • New feature (non-breaking change which adds functionality)
  • Bugfix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices applies)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING doc
  • I have signed the commit for DCO to be passed.
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have added necessary documentation (if appropriate)

Dependency

  • Please add the links to the dependent PR need to be merged before this (if any).

Special notes for your reviewer:

Signed-off-by: namkyu1999 <lak9348@konkuk.ac.kr>
@Saranya-jena
Copy link
Contributor

@namkyu1999
Copy link
Member Author

@namkyu1999 did you try applying this crd: https://github.com/litmuschaos/litmus/blob/master/mkdocs/docs/3.0.0-beta12/litmus-portal-crds-3.0.0-beta12.yml ?

Hi @Saranya-jena, As you said, if we apply that crd file to all target clusters, it works fine, because once the crd is defined, even if we update to an old manifest in the future, the crd won't change. But if we download the control plane and don't download the crd as you should, the graphql server will create a manifest using the old crd file, so we need that pr.

@namkyu1999
Copy link
Member Author

namkyu1999 commented Oct 4, 2023

Some variable types changed in this pr litmuschaos/chaos-operator#459. But the crd version has not changed. So anyone who already applied old version of ChaosEngine CRD will face the same problem.

file or directory on the host machine
that is directly exposed to the container.
This is generally used for system agents
or other privileged things that are
allowed to see the host machine. Most
containers will NOT need this. More
info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
# TODO(jonesdl) We need to restrict
--- TODO(jonesdl) We need to restrict
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
--- TODO(jonesdl) We need to restrict
### TODO(jonesdl) We need to restrict

Please change it! Backend manifest parser will break the manifest as it breaks on "---"

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the comments, I updated it :)

Signed-off-by: namkyu1999 <lak9348@konkuk.ac.kr>
@Saranya-jena Saranya-jena merged commit ca926e1 into litmuschaos:master Oct 4, 2023
14 checks passed
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.

None yet

7 participants