generated from ansible-collections/collection_template
-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
k8s - fix issue with server side apply (#549)
k8s - fix issue with server side apply SUMMARY Fix #548 and #547 ISSUE TYPE Bugfix Pull Request Reviewed-by: Mike Graves <[email protected]> Reviewed-by: Bikouo Aubin <None>
- Loading branch information
Showing
5 changed files
with
105 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
bugfixes: | ||
- k8s - Fix issue with server side apply with kubernetes release '25.3.0' (https://github.com/ansible-collections/kubernetes.core/issues/548). | ||
- k8s - Fix issue with check_mode when using server side apply (https://github.com/ansible-collections/kubernetes.core/issues/547). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
tests/integration/targets/k8s_apply/tasks/server_side_apply.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
- set_fact: | ||
kubernetes_version: "kubernetes=={{ item }}" | ||
virtualenv_path: "{{ virtualenv_src }}/venv{{ item | replace('.', '') }}" | ||
|
||
- name: Install kubernetes version | ||
pip: | ||
name: | ||
- '{{ kubernetes_version }}' | ||
virtualenv_command: "virtualenv --python {{ ansible_python_interpreter }}" | ||
virtualenv: "{{ virtualenv_path }}" | ||
|
||
- name: Update namespace using server side apply | ||
k8s: | ||
apply: true | ||
server_side_apply: | ||
field_manager: "ansible{{ item | replace('.', '') }}" | ||
force_conflicts: true | ||
definition: | ||
kind: Namespace | ||
apiVersion: v1 | ||
metadata: | ||
name: testing | ||
vars: | ||
ansible_python_interpreter: "{{ virtualenv_path }}/bin/python" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters