-
Notifications
You must be signed in to change notification settings - Fork 3
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
Conversation
There was a problem hiding this 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?
I was also thinking about it. So I think it would be best to choose own chaos file then |
install/roles/automation-hub/tasks/scenario-deployment/tekton/chaos-tkn-pipelines.yaml
Outdated
Show resolved
Hide resolved
Signed-off-by: see-quick <[email protected]>
Signed-off-by: see-quick <[email protected]>
Signed-off-by: see-quick <[email protected]>
Signed-off-by: see-quick <[email protected]>
1810688
to
1c30111
Compare
Signed-off-by: see-quick <[email protected]>
Signed-off-by: see-quick <[email protected]>
install/roles/automation-hub/tasks/scenario-deployment/tekton/chaos-tkn-pipelines.yaml
Outdated
Show resolved
Hide resolved
install/roles/automation-hub/tasks/scenario-deployment/tekton/chaos-tkn-pipelines.yaml
Outdated
Show resolved
Hide resolved
kubeconfig: "{{ kubeconfig_path }}/{{ infra_context_name }}" | ||
namespace: "{{ infra_ci_namespace }}" | ||
state: present | ||
definition: "{{ lookup('template', item) }}" |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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') }}"
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: see-quick <[email protected]>
Signed-off-by: see-quick <[email protected]>
Signed-off-by: see-quick <[email protected]>
There was a problem hiding this 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.
For sure that's a good idea. |
No description provided.