From e61f896475ca22a7fab38320b38522110f600f90 Mon Sep 17 00:00:00 2001 From: Robert Church Date: Thu, 23 Apr 2020 17:16:03 -0400 Subject: [PATCH] Add volumesnapshots cluster addon to k8s RPM To support the NetApp Trident project, include the volumesnapshots CRD and controller for deployment when applicable. Change-Id: I999ed6c8acce8de42f12fa331505225f43d580a6 Story: 2007391 Task: 39542 Signed-off-by: Robert Church --- kubernetes/kubernetes/centos/kubernetes.spec | 22 +++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/kubernetes/kubernetes/centos/kubernetes.spec b/kubernetes/kubernetes/centos/kubernetes.spec index c7ab9d916..63325e596 100644 --- a/kubernetes/kubernetes/centos/kubernetes.spec +++ b/kubernetes/kubernetes/centos/kubernetes.spec @@ -935,6 +935,15 @@ install -d -m 0755 %{buildroot}%{_datadir}/bash-completion/completions/ install -d -m 0755 %{buildroot}%{_sysconfdir}/%{name} install -m 644 -t %{buildroot}%{_sysconfdir}/%{name} contrib/init/systemd/environ/* +# install specific cluster addons for optional use +install -d -m 0755 %{buildroot}%{_sysconfdir}/%{name}/addons +# Addon: volumesnapshots +install -d -m 0755 %{buildroot}%{_sysconfdir}/%{name}/addons/volumesnapshots +install -d -m 0755 %{buildroot}%{_sysconfdir}/%{name}/addons/volumesnapshots/crd +install -m 0644 -t %{buildroot}%{_sysconfdir}/%{name}/addons/volumesnapshots/crd cluster/addons/volumesnapshots/crd/* +install -d -m 0755 %{buildroot}%{_sysconfdir}/%{name}/addons/volumesnapshots/volume-snapshot-controller +install -m 0644 -t %{buildroot}%{_sysconfdir}/%{name}/addons/volumesnapshots/volume-snapshot-controller cluster/addons/volumesnapshots/volume-snapshot-controller/* + # install service files install -d -m 0755 %{buildroot}%{_unitdir} install -m 0644 -t %{buildroot}%{_unitdir} contrib/init/systemd/*.service @@ -967,10 +976,11 @@ for file in $(find . -iname "*.go" \! -iname "*_test.go") ; do echo "%%dir %%{gopath}/src/%%{import_path}/$(dirname $file)" >> devel.file-list install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$(dirname $file) cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file - echo "%%{gopath}/src/%%{import_path}/$file" >> devel.file-list + echo "%%{gopath}/src/%%{import_path}/$file" >> devel.filelist done %endif + %if 0%{?with_devel} sort -u -o devel.file-list devel.file-list %endif @@ -1034,6 +1044,16 @@ fi %config(noreplace) %{_sysconfdir}/%{name}/scheduler %config(noreplace) %{_sysconfdir}/%{name}/config %config(noreplace) %{_sysconfdir}/%{name}/controller-manager +%dir %{_sysconfdir}/%{name}/addons +%dir %{_sysconfdir}/%{name}/addons/volumesnapshots +%dir %{_sysconfdir}/%{name}/addons/volumesnapshots/crd +%{_sysconfdir}/%{name}/addons/volumesnapshots/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml +%{_sysconfdir}/%{name}/addons/volumesnapshots/crd/snapshot.storage.k8s.io_volumesnapshotclasses.yaml +%{_sysconfdir}/%{name}/addons/volumesnapshots/crd/snapshot.storage.k8s.io_volumesnapshots.yaml +%dir %{_sysconfdir}/%{name}/addons/volumesnapshots/volume-snapshot-controller +%{_sysconfdir}/%{name}/addons/volumesnapshots/volume-snapshot-controller/volume-snapshot-controller-deployment.yaml +%{_sysconfdir}/%{name}/addons/volumesnapshots/volume-snapshot-controller/rbac-volume-snapshot-controller.yaml +%dir %{_sysconfdir}/%{name}/ %{_tmpfilesdir}/kubernetes.conf %verify(not size mtime md5) %attr(755, kube,kube) %dir /run/%{name}