Skip to content

Commit

Permalink
add elements one by one in the json array
Browse files Browse the repository at this point in the history
  • Loading branch information
okozachenko1203 committed Dec 15, 2023
1 parent 88a17d1 commit e0ac422
Showing 1 changed file with 37 additions and 17 deletions.
54 changes: 37 additions & 17 deletions magnum_cluster_api/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -1610,27 +1610,47 @@ def get_object(self) -> objects.ClusterClass:
},
{
"op": "add",
"path": "/spec/template/spec/kubeadmConfigSpec/files",
"path": "/spec/template/spec/kubeadmConfigSpec/files/-",
"valueFrom": {
"template": textwrap.dedent(
"""\
- path: "/etc/containerd/config.toml"
owner: "root:root"
permissions: "0644"
content: "{{ .containerdConfig }}"
encoding: "base64"
- path: "/etc/kubernetes/cloud.conf"
owner: "root:root"
permissions: "0600"
content: "{{ .cloudControllerManagerConfig }}"
encoding: "base64"
- path: "/etc/kubernetes/cloud_ca.crt"
owner: "root:root"
permissions: "0600"
content: "{{ .cloudCaCert }}"
encoding: "base64"
path: "/etc/containerd/config.toml"
owner: "root:root"
permissions: "0644"
content: "{{ .containerdConfig }}"
encoding: "base64"
"""
),
)
},
},
{
"op": "add",
"path": "/spec/template/spec/kubeadmConfigSpec/files/-",
"valueFrom": {
"template": textwrap.dedent(
"""\
path: "/etc/kubernetes/cloud.conf"
owner: "root:root"
permissions: "0600"
content: "{{ .cloudControllerManagerConfig }}"
encoding: "base64"
"""
)
},
},
{
"op": "add",
"path": "/spec/template/spec/kubeadmConfigSpec/files/-",
"valueFrom": {
"template": textwrap.dedent(
"""\
path: "/etc/kubernetes/cloud_ca.crt"
owner: "root:root"
permissions: "0600"
content: "{{ .cloudCaCert }}"
encoding: "base64"
"""
)
},
},
],
Expand Down

0 comments on commit e0ac422

Please sign in to comment.