From d72b8f735f39954824c489e074017a3ec9680871 Mon Sep 17 00:00:00 2001 From: Waleed Malik Date: Tue, 7 Dec 2021 23:38:57 +0500 Subject: [PATCH] Osm enhancements (#90) * Improvements for default OSP's * Remove templatization of docker version and use hard-coded values instead * Remove templatization for containerd version in favor of hardcoded values --- cmd/osm-controller/main.go | 6 -- examples/osp-amzn-linux.yaml | 30 +++--- examples/osp-centos.yaml | 12 ++- examples/osp-rhel.yaml | 12 ++- examples/osp-ubuntu.yaml | 22 +++-- hack/run-operating-system-manager.sh | 1 - pkg/controllers/osc/osc_controller.go | 4 - pkg/controllers/osc/osc_reconciler_test.go | 97 +++++++++---------- .../osc/resources/operating_system_config.go | 14 +-- pkg/controllers/osc/testdata/osp-rhel.yaml | 2 +- .../osc/testdata/osp-ubuntu-20.04.yaml | 2 +- pkg/providerconfig/types.go | 47 --------- 12 files changed, 112 insertions(+), 137 deletions(-) delete mode 100644 pkg/providerconfig/types.go diff --git a/cmd/osm-controller/main.go b/cmd/osm-controller/main.go index 113e6d11..d5eee5b6 100644 --- a/cmd/osm-controller/main.go +++ b/cmd/osm-controller/main.go @@ -50,7 +50,6 @@ type options struct { pauseImage string initialTaints string cniVersion string - containerdVersion string criToolsVersion string nodeHTTPProxy string nodeNoProxy string @@ -79,7 +78,6 @@ func main() { flag.StringVar(&opt.pauseImage, "pause-image", "", "pause image to use in Kubelet.") flag.StringVar(&opt.initialTaints, "initial-taints", "", "taints to use when creating the node.") flag.StringVar(&opt.cniVersion, "cni-version", "", "CNI version to use in the cluster.") - flag.StringVar(&opt.containerdVersion, "containerd-version", "", "Containerd version to use in the cluster.") flag.StringVar(&opt.criToolsVersion, "cri-tools-version", "", "cri-tools version to install in the machine") flag.StringVar(&opt.nodeHTTPProxy, "node-http-proxy", "", "If set, it configures the 'HTTP_PROXY' & 'HTTPS_PROXY' environment variable on the nodes.") flag.StringVar(&opt.nodeNoProxy, "node-no-proxy", ".svc,.cluster.local,localhost,127.0.0.1", "If set, it configures the 'NO_PROXY' environment variable on the nodes.") @@ -98,9 +96,6 @@ func main() { if len(opt.cniVersion) == 0 { klog.Fatal("-cni-version is required") } - if len(opt.containerdVersion) == 0 { - klog.Fatal("-containerd-version is required") - } if len(opt.criToolsVersion) == 0 { klog.Fatal("-cri-tools-version is required") } @@ -160,7 +155,6 @@ func main() { opt.pauseImage, opt.initialTaints, opt.cniVersion, - opt.containerdVersion, opt.criToolsVersion, opt.nodeHTTPProxy, opt.nodeNoProxy, diff --git a/examples/osp-amzn-linux.yaml b/examples/osp-amzn-linux.yaml index 82e713d0..ed4c1755 100644 --- a/examples/osp-amzn-linux.yaml +++ b/examples/osp-amzn-linux.yaml @@ -63,7 +63,7 @@ spec: EOF yum install -y \ - containerd-{{ .ContainerdVersion }}* \ + containerd-1.4* \ yum-plugin-versionlock yum versionlock add containerd @@ -90,10 +90,8 @@ spec: EOF yum install -y \ - {{- if .ContainerdVersion }} - containerd-{{ .ContainerdVersion }}* \ - {{- end }} - docker-{{ .DockerVersion }}* \ + containerd-1.4* \ + docker-19.03* \ yum-plugin-versionlock yum versionlock add docker containerd @@ -182,8 +180,6 @@ spec: chmod +x /opt/bin/health-monitor.sh fi - - configureProxyScript: |- {{- if .HTTPProxy }} cat <