Skip to content
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

[Create a Kubernetes inventory using templates and redesign it to dep… #2510

Open
wants to merge 1 commit into
base: pub/new_architecture
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
236 changes: 236 additions & 0 deletions input/config/rhel/9.4/k8s.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,236 @@
{
"k8s": {
"cluster": [
{
"package": "nvidia-container-toolkit",
"type": "rpm",
"repo_name": "nvidia-repo"
},
{
"package": "kubectl-v1.31.4",
"type": "tarball",
"url": "https://dl.k8s.io/release/v1.31.4/bin/linux/amd64/kubectl"
},
{
"package": "kubelet-v1.31.4",
"type": "tarball",
"url": "https://dl.k8s.io/release/v1.31.4/bin/linux/amd64/kubelet"
},
{
"package": "kubeadm-v1.31.4",
"type": "tarball",
"url": "https://dl.k8s.io/release/v1.31.4/bin/linux/amd64/kubeadm"
},
{
"package": "calicoctl-v3.29.1",
"type": "tarball",
"url": "https://github.com/projectcalico/calico/releases/download/v3.29.1/calicoctl-linux-amd64"
},
{
"package": "calicocrds-v3.29.1",
"type": "tarball",
"url": "https://github.com/projectcalico/calico/archive/v3.29.1.tar.gz"
},
{
"package": "cri-tools-v1.31.1",
"type": "tarball",
"url": "https://github.com/kubernetes-sigs/cri-tools/releases/download/v1.31.1/crictl-v1.31.1-linux-amd64.tar.gz"
},
{
"package": "etcd-v3.5.16",
"type": "tarball",
"url": "https://github.com/etcd-io/etcd/releases/download/v3.5.16/etcd-v3.5.16-linux-amd64.tar.gz"
},
{
"package": "cni-plugins-v1.4.0",
"type": "tarball",
"url": "https://github.com/containernetworking/plugins/releases/download/v1.4.0/cni-plugins-linux-amd64-v1.4.0.tgz"
},
{
"package": "runc.amd64.v1.2.3",
"type": "tarball",
"url": "https://github.com/opencontainers/runc/releases/download/v1.2.3/runc.amd64"
},
{
"package": "nerdctl-v1.7.7",
"type": "tarball",
"url": "https://github.com/containerd/nerdctl/releases/download/v1.7.7/nerdctl-1.7.7-linux-amd64.tar.gz"
},
{
"package": "containerd-1.7.24",
"type": "tarball",
"url": "https://github.com/containerd/containerd/releases/download/v1.7.24/containerd-1.7.24-linux-amd64.tar.gz"
},
{
"package": "helm-v3.16.4",
"type": "tarball",
"url": "https://get.helm.sh/helm-v3.16.4-linux-amd64.tar.gz"
},
{
"package": "nvidia-device-plugin",
"type": "tarball",
"url": "https://nvidia.github.io/k8s-device-plugin/stable/nvidia-device-plugin-0.14.4.tgz"
},
{
"package": "rocm-device-plugin",
"type": "manifest",
"url": "https://raw.githubusercontent.com/ROCm/k8s-device-plugin/r1.16/k8s-ds-amdgpu-dp.yaml"
},
{
"package": "mpi-operator-v0.4.0",
"type": "manifest",
"url": "https://raw.githubusercontent.com/kubeflow/mpi-operator/v0.4.0/deploy/v2beta1/mpi-operator.yaml"
},
{
"package": "xilinx-device-plugin",
"type": "manifest",
"url": "https://raw.githubusercontent.com/Xilinx/FPGA_as_a_Service/2023.2/k8s-device-plugin/k8s-device-plugin.yml"
},
{
"package": "spark-operator-v1beta2-1.3.8-3.1.1",
"type": "tarball",
"url": "https://github.com/GoogleCloudPlatform/spark-on-k8s-operator/archive/refs/tags/v1beta2-1.3.8-3.1.1.tar.gz"
},
{
"package": "nfs-subdir-external-provisioner-4.0.18",
"type": "tarball",
"url": "https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner/releases/download/nfs-subdir-external-provisioner-4.0.18/nfs-subdir-external-provisioner-4.0.18.tgz"
},
{
"package": "docker.io/library/nginx",
"tag": "1.25.2-alpine",
"type": "image"
},
{
"package": "registry.k8s.io/coredns/coredns",
"tag": "v1.11.3",
"type": "image"
},
{
"package": "registry.k8s.io/cpa/cluster-proportional-autoscaler",
"tag": "v1.8.8",
"type": "image"
},
{
"package": "registry.k8s.io/dns/k8s-dns-node-cache",
"tag": "1.22.28",
"type": "image"
},
{
"package": "registry.k8s.io/kube-apiserver",
"tag": "v1.31.4",
"type": "image"
},
{
"package": "registry.k8s.io/kube-controller-manager",
"tag": "v1.31.4",
"type": "image"
},
{
"package": "registry.k8s.io/kube-proxy",
"tag": "v1.31.4",
"type": "image"
},
{
"package": "registry.k8s.io/kube-scheduler",
"tag": "v1.31.4",
"type": "image"
},
{
"package": "registry.k8s.io/pause",
"tag": "3.10",
"type": "image"
},
{
"package": "quay.io/coreos/etcd",
"tag": "v3.5.16",
"type": "image"
},
{
"package": "quay.io/calico/cni",
"tag": "v3.29.1",
"type": "image"
},
{
"package": "quay.io/calico/kube-controllers",
"tag": "v3.29.1",
"type": "image"
},
{
"package": "quay.io/calico/pod2daemon-flexvol",
"tag": "v3.29.1",
"type": "image"
},
{
"package": "quay.io/calico/node",
"tag": "v3.29.1",
"type": "image"
},
{
"package": "docker.io/flannel/flannel-cni-plugin",
"tag": "v1.1.2",
"type": "image"
},
{
"package": "docker.io/flannel/flannel",
"tag": "v0.22.0",
"type": "image"
},
{
"package": "docker.io/kubernetesui/dashboard",
"tag": "v2.7.0",
"type": "image"
},
{
"package": "docker.io/kubernetesui/metrics-scraper",
"tag": "v1.0.8",
"type": "image"
},
{
"package": "quay.io/metallb/speaker",
"tag": "v0.13.9",
"type": "image"
},
{
"package": "quay.io/metallb/controller",
"tag": "v0.13.9",
"type": "image"
},
{
"package": "registry.k8s.io/nfd/node-feature-discovery",
"tag": "v0.16.4",
"type": "image"
},
{
"package": "docker.io/rocm/k8s-device-plugin",
"tag": "latest",
"type": "image"
},
{
"package": "docker.io/mpioperator/mpi-operator",
"tag": "master",
"type": "image"
},
{
"package": "public.ecr.aws/xilinx_dcg/k8s-device-plugin",
"tag": "1.3.0",
"type": "image"
},
{
"package": "nvcr.io/nvidia/k8s-device-plugin",
"tag": "v0.14.4",
"type": "image"
},
{
"package": "nvcr.io/nvidia/gpu-feature-discovery",
"tag": "v0.8.2",
"type": "image"
},
{
"package": "registry.k8s.io/sig-storage/nfs-subdir-external-provisioner",
"tag": "v4.0.2",
"type": "image"
}
]
}
}
63 changes: 1 addition & 62 deletions scheduler/playbooks/k8s_start_setup.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2024 Dell Inc. or its subsidiaries. All Rights Reserved.
# Copyright 2025 Dell Inc. or its subsidiaries. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -14,65 +14,4 @@
---

- name: Initiate Kubernetes installation
when:
- hostvars['127.0.0.1']['k8s_support']
- not hostvars[groups['kube_control_plane'][0]]['k8s_installation_status']
ansible.builtin.import_playbook: kubernetes_sigs.kubespray.cluster
vars:
kube_version: "v{{ hostvars['localhost']['k8s_version'] }}"
container_manager: "containerd"
dashboard_enabled: true
helm_enabled: true
kube_network_plugin: "{{ hostvars['localhost']['k8s_cni'] }}"
kube_service_addresses: "{{ hostvars['localhost']['k8s_service_addresses'] }}"
kube_pods_subnet: "{{ hostvars['localhost']['k8s_pod_network_cidr'] }}"
kubelet_custom_flags: "{% if hostvars['localhost']['topology_manager_policy'] != 'none' %}
--topology-manager-policy={{ hostvars['localhost']['topology_manager_policy'] }}
--topology-manager-scope={{ hostvars['localhost']['topology_manager_scope'] }}
{% endif %}"
kube_proxy_strict_arp: true
kube_proxy_mode: 'iptables'
metallb_enabled: true
metallb_speaker_enabled: true
metallb_namespace: "metallb-system"
metallb_config:
address_pools:
primary:
ip_range:
- "{{ hostvars['localhost']['pod_external_ip_range'] }}"
auto_assign: true
layer2:
- primary
override_system_hostname: false
populate_inventory_to_hosts_file: false
enable_nodelocaldns: false
upstream_dns_servers:
- "{{ hostvars['localhost']['admin_nic_ip'] }}"
unsafe_show_logs: true
kube_image_repo: "registry.k8s.io"
docker_image_repo: "docker.io"
quay_image_repo: "quay.io"
containerd_registries_mirrors:
- prefix: xyz.io
mirrors:
- host: https://mirror.gcr.io
capabilities: ["pull", "resolve"]
skip_verify: false
kubeadm_download_url: "{{ hostvars['localhost']['offline_tarball_path'] }}/{{ hostvars['localhost']['kubeadm_package'] }}.tar.gz"
kubectl_download_url: "{{ hostvars['localhost']['offline_tarball_path'] }}/{{ hostvars['localhost']['kubectl_package'] }}.tar.gz"
kubelet_download_url: "{{ hostvars['localhost']['offline_tarball_path'] }}/{{ hostvars['localhost']['kubelet_package'] }}.tar.gz"
crictl_download_url: "{{ hostvars['localhost']['offline_tarball_path'] }}/{{ hostvars['localhost']['crictl_package'] }}.tar.gz"
calicoctl_download_url: "{{ hostvars['localhost']['offline_tarball_path'] }}/{{ hostvars['localhost']['calicoctl_package'] }}.tar.gz"
calico_crds_download_url: "{{ hostvars['localhost']['offline_tarball_path'] }}/{{ hostvars['localhost']['calico_crds_package'] }}.tar.gz"
cni_download_url: "{{ hostvars['localhost']['offline_tarball_path'] }}/{{ hostvars['localhost']['cni_package'] }}.tar.gz"
nerdctl_download_url: "{{ hostvars['localhost']['offline_tarball_path'] }}/{{ hostvars['localhost']['nerdctl_package'] }}.tar.gz"
runc_download_url: "{{ hostvars['localhost']['offline_tarball_path'] }}/{{ hostvars['localhost']['runc_package'] }}.tar.gz"
docker_rh_repo_base_url: ""
docker_rh_repo_gpgkey: ""
etcd_download_url: "{{ hostvars['localhost']['offline_tarball_path'] }}/{{ hostvars['localhost']['etcd_package'] }}.tar.gz"
containerd_download_url: "{{ hostvars['localhost']['offline_tarball_path'] }}/{{ hostvars['localhost']['containerd_package'] }}.tar.gz"
helm_download_url: "{{ hostvars['localhost']['offline_tarball_path'] }}/{{ hostvars['localhost']['helm_package'] }}.tar.gz"
http_proxy: "{{ hostvars['localhost']['http_proxy'] }}"
https_proxy: "{{ hostvars['localhost']['https_proxy'] }}"
no_proxy: "localhost,127.0.0.1,{{ hostvars['localhost']['admin_nic_ip'] }},{{ hostvars['localhost']['k8s_service_addresses'] }},{{ hostvars['localhost']['k8s_pod_network_cidr'] }},{{ hostvars['localhost']['oim_hostname'] }},{{ hostvars['localhost']['domain_name'] }}" # noqa: yaml[line-length]
additional_no_proxy: "{{ hostvars['localhost']['user_no_proxy'] if hostvars['localhost']['no_proxy_input_status'] else '' }}" # noqa: yaml[line-length]
Loading