-
Notifications
You must be signed in to change notification settings - Fork 165
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 copying custom manifests #265
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -193,8 +193,8 @@ rke2_disable_cloud_controller: false | |
# applicable only if rke2_disable_cloud_controller is true | ||
rke2_cloud_provider_name: "external" | ||
|
||
# Path to custom manifests deployed during the RKE2 installation | ||
# It is possible to use Jinja2 templating in the manifests | ||
# Path to folder with custom manifests deployed during the RKE2 installation | ||
# It is possible to use Jinja2 templating in the manifests, if the filename ends with .j2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It can be also yaml or yml.
This option was meant to be used for files with yaml (or yml) files. But user could use Jinja2 syntax in it and it would be templated. The actual bug here is that if the user will add |
||
rke2_custom_manifests: | ||
|
||
# Path to static pods deployed during the RKE2 installation | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -155,8 +155,8 @@ rke2_disable_cloud_controller: false | |
# applicable only if rke2_disable_cloud_controller is true | ||
rke2_cloud_provider_name: "external" | ||
|
||
# Path to custom manifests deployed during the RKE2 installation | ||
# It is possible to use Jinja2 templating in the manifests | ||
# Path to folder with custom manifests deployed during the RKE2 installation | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thin't it's better to keep it as a list of manifests. They can be in different folders or subfolders |
||
# It is possible to use Jinja2 templating in the manifests, if the filename ends with .j2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It can be also yaml or yml.
This option was meant to be used for files with yaml (or yml) files. But user could use Jinja2 syntax in it and it would be templated. The actual bug here is that if the user will add There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ahh, good point. Will fix. |
||
rke2_custom_manifests: | ||
|
||
# Path to static pods deployed during the RKE2 installation | ||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -142,11 +142,11 @@ | |||||||||||||||||||||||||||||||||
- name: Copy Custom Manifests | ||||||||||||||||||||||||||||||||||
ansible.builtin.template: | ||||||||||||||||||||||||||||||||||
src: "{{ item }}" | ||||||||||||||||||||||||||||||||||
dest: "{{ rke2_data_path }}/server/manifests/" | ||||||||||||||||||||||||||||||||||
dest: "{{ rke2_data_path }}/server/manifests/{{ item | basename | replace('.j2', '')}}" | ||||||||||||||||||||||||||||||||||
owner: root | ||||||||||||||||||||||||||||||||||
group: root | ||||||||||||||||||||||||||||||||||
mode: 0644 | ||||||||||||||||||||||||||||||||||
with_items: "{{ rke2_custom_manifests }}" | ||||||||||||||||||||||||||||||||||
mode: 0640 | ||||||||||||||||||||||||||||||||||
with_fileglob: "{{ rke2_custom_manifests }}/*" | ||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thin't it's better to keep it as a list of manifests. They can be in different folders or subfolders There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Makes sense. I guess you could have There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. well, i think this is outdated ansible-role-rke2/tasks/rke2.yml Lines 252 to 259 in 859a27f
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yep - with the same code I wrote! So now it includes the glob functionality that @MonolithProjects said he didn't want to implement. Was that on purpose? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No @simonfelding, i overlooked it. Seems like you included the code in #260 . Will check it tomorrow as it is probably breaking the Custom Manifests (#285) |
||||||||||||||||||||||||||||||||||
when: rke2_custom_manifests | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
- name: Copy Static Pods | ||||||||||||||||||||||||||||||||||
|
@@ -155,7 +155,7 @@ | |||||||||||||||||||||||||||||||||
dest: "{{ rke2_data_path }}/agent/pod-manifests/" | ||||||||||||||||||||||||||||||||||
owner: root | ||||||||||||||||||||||||||||||||||
group: root | ||||||||||||||||||||||||||||||||||
mode: 0644 | ||||||||||||||||||||||||||||||||||
mode: 0640 | ||||||||||||||||||||||||||||||||||
with_items: "{{ rke2_static_pods }}" | ||||||||||||||||||||||||||||||||||
when: rke2_static_pods | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
|
@@ -165,5 +165,5 @@ | |||||||||||||||||||||||||||||||||
dest: "/etc/default/rke2-{{ rke2_type }}" | ||||||||||||||||||||||||||||||||||
owner: root | ||||||||||||||||||||||||||||||||||
group: root | ||||||||||||||||||||||||||||||||||
mode: 0644 | ||||||||||||||||||||||||||||||||||
mode: 0640 | ||||||||||||||||||||||||||||||||||
when: rke2_environment_options is defined and rke2_environment_options|length > 0 |
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 thin't it's better to keep it as a list of manifests. They can be in different folders or subfolders