-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
oci patchs: Platform External and CCM manifests
- Loading branch information
Showing
23 changed files
with
624 additions
and
30 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
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
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
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
Submodule cloud_compute
updated
3 files
+16 −85 | tasks/oci.yml | |
+32 −10 | tasks/oci/cb_nlb_backend.yaml | |
+95 −0 | tasks/oci/create.yaml |
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,30 @@ | ||
--- | ||
- name: Patch | Create OCI CCM NS | ||
ansible.builtin.template: | ||
src: patches/oci-ccm-ns.yaml.j2 | ||
dest: "{{ config_install_dir }}/manifests/oci-cloud-controller-manager-00-namespace.yaml" | ||
mode: 0644 | ||
|
||
- name: Patch | Create OCI CCM RBAC | ||
ansible.builtin.template: | ||
src: patches/oci-cloud-controller-manager-rbac.yaml.j2 | ||
dest: "{{ config_install_dir }}/manifests/oci-cloud-controller-manager-01-rbac.yaml" | ||
mode: 0644 | ||
|
||
- name: Patch | Create OCI CCM Secret | ||
ansible.builtin.set_fact: | ||
oci_ccm_secret_data: "{{ lookup('template', 'patches/oci-ccm-secret-data.yaml.j2') | from_yaml }}" | ||
|
||
- name: Patch | Create OCI CCM Secret | ||
ansible.builtin.template: | ||
src: patches/oci-ccm-secret.yaml.j2 | ||
dest: "{{ config_install_dir }}/manifests/oci-cloud-controller-manager-01-secret.yaml" | ||
mode: 0644 | ||
vars: | ||
oci_compartment_id: oci_compartment_id | ||
|
||
- name: Patch | Create OCI CCM | ||
ansible.builtin.template: | ||
src: patches/oci-cloud-controller-manager.yaml.j2 | ||
dest: "{{ config_install_dir }}/manifests/oci-cloud-controller-manager-02.yaml" | ||
mode: 0644 |
12 changes: 12 additions & 0 deletions
12
roles/config/tasks/patches-manifests/line_regex_patch.yaml
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,12 @@ | ||
--- | ||
- name: Config | Patch manifests | Line regex | ||
ansible.builtin.lineinfile: | ||
path: "{{ config_install_dir }}{{ patch_spec.manifest }}" | ||
# search_string: "{{ patch_spec.search_string }}" | ||
# line: "{{ patch_spec.line }}" | ||
backrefs: true | ||
regexp: "{{ patch_spec.regexp }}" | ||
line: "{{ patch_spec.line }}" | ||
loop: "{{ cfg_patch_line_regex_patch_specs }}" | ||
loop_control: | ||
loop_var: patch_spec |
6 changes: 6 additions & 0 deletions
6
roles/config/tasks/patches-manifests/platform-external-kcmo.yaml
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,6 @@ | ||
--- | ||
- name: Patch | Create KCMO Config for External provider | ||
ansible.builtin.template: | ||
src: patches/cm-kcmo-external.yaml.j2 | ||
dest: "{{ config_install_dir }}/manifests/kube-controller-manager-operator-configmap.yaml" | ||
mode: 0644 |
31 changes: 31 additions & 0 deletions
31
roles/config/tasks/patches-manifests/platform-external-kubelet.yaml
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,31 @@ | ||
--- | ||
- debug: var=bin_oc | ||
|
||
- name: get pod sha | ||
ansible.builtin.shell: | | ||
{{ bin_oc }} adm release info \ | ||
-a {{ config_pull_secret_file }} \ | ||
--image-for='pod' "quay.io/openshift-release-dev/ocp-release:{{ config_cluster_version }}" | ||
environment: "{{ config_installer_environment | d(omit) }}" | ||
register: _cmd_release_info | ||
|
||
- debug: var=_cmd_release_info | ||
|
||
- ansible.builtin.set_fact: | ||
_cloud_provider_name: external | ||
_pod_image: "{{ _cmd_release_info.stdout }}" | ||
_mc_kubelet_workaround: "" | ||
|
||
# _mc_kubelet_workaround: > | ||
# #KUBELET_PROVIDERID=$(curl -H "Authorization: Bearer Oracle" -sL http://169.254.169.254/opc/v2/instance/ | jq -r .id) | ||
|
||
- name: Crete kubelet config | ||
ansible.builtin.template: | ||
src: patches/mc-kubelet.yaml.j2 | ||
dest: "{{ config_install_dir }}/openshift/99_openshift-machineconfig_02-{{ _machine_config_role }}-kubelet.yaml" | ||
#dest: "/tmp/99_openshift-machineconfig_02-{{ _machine_config_role }}-kubelet.yaml" | ||
loop_control: | ||
loop_var: _machine_config_role | ||
loop: | ||
- master | ||
- worker |
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,22 @@ | ||
--- | ||
|
||
- ansible.builtin.include_tasks: ./yaml_patch_exec.yaml | ||
loop: "{{ cfg_patch_yaml_patch_specs }}" | ||
loop_control: | ||
loop_var: patch_spec | ||
|
||
# - name: patch | reading file {{ config_install_dir + cfg_patch_generic_update.filename }} | ||
# set_fact: | ||
# patch_file: "{{ lookup('file', config_install_dir + cfg_patch_generic_update.filename) | from_yaml }}" | ||
|
||
# - debug: var=patch_file | ||
# - debug: var=cfg_patch_generic_update.patch | ||
|
||
# - name: patch | patching content | ||
# set_fact: | ||
# new_content: "{{ patch_file | combine(cfg_patch_generic_update.patch|from_json, recursive=True) }}" | ||
|
||
# - name: patch | saving file {{ config_install_dir + cfg_patch_generic_update.filename }} | ||
# copy: | ||
# dest: "{{ config_install_dir + cfg_patch_generic_update.filename }}" | ||
# content: "{{ new_content | to_nice_yaml(indent=2) }}" |
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,18 @@ | ||
--- | ||
# generic update executor | ||
|
||
- name: patch | reading file {{ config_install_dir + patch_spec.manifest }} | ||
set_fact: | ||
patch_file: "{{ lookup('file', config_install_dir + patch_spec.manifest) | from_yaml }}" | ||
|
||
- debug: var=patch_file | ||
- debug: var=patch_spec.patch | ||
|
||
- name: patch | patching content | ||
set_fact: | ||
new_content: "{{ patch_file | combine(patch_spec.patch|from_json, recursive=True) }}" | ||
|
||
- name: patch | saving file {{ config_install_dir + patch_spec.manifest }} | ||
copy: | ||
dest: "{{ config_install_dir + patch_spec.manifest }}" | ||
content: "{{ new_content | to_nice_yaml(indent=2) }}" |
Oops, something went wrong.