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

[Chaos] - Add ansible to also provision chaos when installing #338

Merged
merged 10 commits into from
Feb 12, 2024

Conversation

see-quick
Copy link
Contributor

No description provided.

Copy link

github-actions bot commented Feb 8, 2024

Thanks for pull request!!!
hey @kornys @Frawless @obabec

Copy link
Member

@Frawless Frawless left a comment

Choose a reason for hiding this comment

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

You should create new task file for chaos I think. Adding it to infra doesn't sounds right. Maybe put it to strimzi instead?

@see-quick
Copy link
Contributor Author

You should create new task file for chaos I think. Adding it to infra doesn't sounds right. Maybe put it to strimzi instead?

I was also thinking about it. So I think it would be best to choose own chaos file then

@github-actions github-actions bot added the pipelines tekton pippelines related changes label Feb 12, 2024
Signed-off-by: see-quick <[email protected]>
Signed-off-by: see-quick <[email protected]>
kubeconfig: "{{ kubeconfig_path }}/{{ infra_context_name }}"
namespace: "{{ infra_ci_namespace }}"
state: present
definition: "{{ lookup('template', item) }}"
Copy link
Member

Choose a reason for hiding this comment

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

do not use definition if you using templates

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So should I change it to use resource_definition i.e., also change fileglob to loop and query...?

- name: Deploy chaos engineering resources for Tekton from Jinja2 templates
  kubernetes.core.k8s:
    kubeconfig: "{{ kubeconfig_path }}/{{ infra_context_name }}"
    namespace: "{{ infra_ci_namespace }}"
    state: present
    resource_definition: "{{ lookup('template', item) }}"
    verify_ssl: no
    apply: true
  loop: "{{ query('fileglob', 'templates/tekton/pipelines/chaos/*.j2') }}"

Copy link
Member

Choose a reason for hiding this comment

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

see other examples, instead of resource_definition use template

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

some ansible course would be useful :)

Copy link
Member

Choose a reason for hiding this comment

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

I think it is fine to use definition in that case, however, we use template even if we don't process it with Jinja because in case we add some variable it is not straightforward to find the issue. An example with fileglob is here https://github.com/skodjob/automation-hub/blob/main/install/roles/automation-hub/tasks/scenario-deployment/tekton/infra-tkn-pipelines.yaml#L28

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it is fine to use definition in that case, however, we use template even if we don't process it with Jinja because in case we add some variable

Thanks for the explanation I was wondering why you use a template even if you don't process it with Jinja. I will update it accordingly :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated @Frawless @kornys

Copy link
Member

@Frawless Frawless left a comment

Choose a reason for hiding this comment

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

Guess in the future it would make sense to use some variables for config the cluster names, etc. Have some chaos config part. But definitely not in this PR.

@see-quick
Copy link
Contributor Author

Guess in the future it would make sense to use some variables for config the cluster names, etc. Have some chaos config part. But definitely not in this PR.

For sure that's a good idea.

@see-quick see-quick merged commit 4b23397 into main Feb 12, 2024
3 checks passed
@see-quick see-quick deleted the chaos-tkn-pipelines-ansible branch February 12, 2024 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pipelines tekton pippelines related changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants