From 6dc88e75eb276934da198cfecb15c3279149d682ddd8e6a9fe86659dcbfecd72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 3 May 2024 12:19:08 +0200 Subject: [PATCH] Sync from SUSE:SLFO:Main elemental-system-agent revision 438e336a7aac2945ace5c6059c07d640 --- .gitattributes | 23 +++++ _service | 20 +++++ _servicedata | 4 + elemental-system-agent-0.3.5.tar.gz | 3 + elemental-system-agent.changes | 132 ++++++++++++++++++++++++++++ elemental-system-agent.spec | 89 +++++++++++++++++++ vendor.tar.gz | 3 + 7 files changed, 274 insertions(+) create mode 100644 .gitattributes create mode 100644 _service create mode 100644 _servicedata create mode 100644 elemental-system-agent-0.3.5.tar.gz create mode 100644 elemental-system-agent.changes create mode 100644 elemental-system-agent.spec create mode 100644 vendor.tar.gz diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/_service b/_service new file mode 100644 index 0000000..abc48ca --- /dev/null +++ b/_service @@ -0,0 +1,20 @@ + + + https://github.com/rancher/system-agent + git + .git + v0.3.5 + v0.3.5 + elemental-system-agent + v(.*) + enable + + + elemental-system-agent-*.tar + gz + + + elemental-system-agent + + + diff --git a/_servicedata b/_servicedata new file mode 100644 index 0000000..f5d8390 --- /dev/null +++ b/_servicedata @@ -0,0 +1,4 @@ + + + https://github.com/rancher/system-agent + 806ef425e08933933f92bf574c2a5201107f3b24 \ No newline at end of file diff --git a/elemental-system-agent-0.3.5.tar.gz b/elemental-system-agent-0.3.5.tar.gz new file mode 100644 index 0000000..e70f943 --- /dev/null +++ b/elemental-system-agent-0.3.5.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c3ee8659f48ba3e633522f5c1f5a687c9414fe883486e065082de4ae8bb56aaf +size 84932 diff --git a/elemental-system-agent.changes b/elemental-system-agent.changes new file mode 100644 index 0000000..0e2d727 --- /dev/null +++ b/elemental-system-agent.changes @@ -0,0 +1,132 @@ +------------------------------------------------------------------- +Thu Mar 14 10:39:13 UTC 2024 - kkaempf@suse.com + +- Update to version 0.3.5: + * Add interlocks to ensure operations are not interrupted (#150) + * Update module github.com/google/go-containerregistry to v0.16.1 + * Update module github.com/rancher/wharfie to v0.6.2 + * Update module github.com/urfave/cli/v2 to v2.25.7 + * Update module github.com/sirupsen/logrus to v1.9.3 + * Update plugins/manifest Docker tag to v1.4.0 + * Update module golang.org/x/sync to v0.3.0 + * Update dependency golangci/golangci-lint to v1.54.2 + * Update alpine Docker tag to v3.18.3 + * Update module github.com/mattn/go-colorable to v0.1.13 + +------------------------------------------------------------------- +Fri Feb 23 10:15:07 UTC 2024 - Klaus Kämpf + +- bump go to 1.21 or later (SURE-7072) + +------------------------------------------------------------------- +Mon Feb 19 14:36:53 UTC 2024 - kkaempf@suse.com + +- Update to version 0.3.4: + * Add initial Renovate configuration (#117) + * bump docker version and go deps to fix CVEs + * Fix repeated time parse error on probes that have not yet run successfully + +- switched _service from 'disabled' to 'manual' + +------------------------------------------------------------------- +Mon Sep 25 05:07:37 UTC 2023 - David Cassany + +- Remove the systemd unit file as this is now included as part of + elemental package + +------------------------------------------------------------------- +Tue Jul 18 15:34:57 UTC 2023 - Klaus Kämpf + +- Fix .spec to build and install on non-SUSE distributions + +------------------------------------------------------------------- +Mon Jul 17 16:52:06 UTC 2023 - kkaempf@suse.com + +- Update to version 0.3.3: + * Add CATTLE_AGENT_ATTEMPT_NUMBER environment variable that corresponds to failure count for K8s plan application (#115) + * Retry update with latest secret if plan still matches the applied plan (#114) + * Add support for transactional-update based systems (#105) + * Add error handling logic that handles edge cases to force the system-agent to restart if we encounter non-transient errors. Disallow the K8s watcher from manipulating a secret when the UID changes. (#112) + * Update CODEOWNERS + * Add CODEOWNERS + * Update wrangler to v1.1.0 + +------------------------------------------------------------------- +Wed Apr 12 12:11:51 UTC 2023 - kkaempf@suse.com + +- Update to version 0.3.2: + * Convert uname aarch64 to k8s arm64 before downloading kubectl + * Only try to get the client version with kubectl + * Make curl fail on non 2xx codes + * Use `kubectl version` to make sure the downloaded binary works + +------------------------------------------------------------------- +Wed Feb 01 09:45:00 UTC 2023 - kkaempf@suse.com + +- Update to version 0.3.1: + * Use plugins/docker for arm64 instead of custom image + * Update pipelines to support suc for arm64 and remove all arm support + * Bump golang to 1.19.4-alpine3.17, rancher/wharfie to v0.5.3, and dapper to v0.6.0 (#102) + * Add docker-publish-suc for s390x (#91) + * fix(run.sh): cleanup temp folder when script fail (#100) + +------------------------------------------------------------------- +Thu Nov 03 13:12:34 UTC 2022 - kkaempf@suse.com + +- Update to version 0.2.13: + * Add back TLSClientConfig to transport + * Add proxy to validate rest config + * This fixes the TLS handshake on Windows. + * Reuse version if found for binary, and add uninstall to suc entrypoint + * Bump to go1.18 and client-go 1.24, remove windows-specific x509 logic (#86) + * Fix nil-pointer dereference on windows context + * add windows support for root CA cert stores (#84) + +------------------------------------------------------------------- +Tue Oct 04 06:35:01 UTC 2022 - kkaempf@suse.com + +- Update to version 0.2.11+git20220927.99069d7: + * Add proxy to validate rest config + +------------------------------------------------------------------- +Mon Aug 29 13:29:09 UTC 2022 - kkaempf@suse.com + +- Update to version 0.2.10+git20220801.6a89e30: + * This fixes the TLS handshake on Windows. + * Reuse version if found for binary, and add uninstall to suc entrypoint + +------------------------------------------------------------------- +Tue Jul 19 06:59:19 UTC 2022 - Klaus Kämpf + +- don't run in live mode or if rancher-system-agent is already present + +------------------------------------------------------------------- +Fri Jul 15 05:58:08 UTC 2022 - kkaempf@suse.com + +- Update to version 0.2.9+git20220713.bbb6969: + * Bump to go1.18 and client-go 1.24, remove windows-specific x509 logic (#86) + +------------------------------------------------------------------- +Fri Jun 24 08:59:58 UTC 2022 - kkaempf@suse.com + +- renamed to elemental-system-agent + +- Update to version 0.2.8+git20220623.5b9b848: + * Renamed uninstall.sh to system-agent-uninstall.sh + * Implemented uninstall script and added to install script + +------------------------------------------------------------------- +Fri May 20 08:59:33 UTC 2022 - kkaempf@suse.com + +- Update to version 0.2.7+git20220506.65aac83: + * Fix nil-pointer dereference on windows context + * add windows support for root CA cert stores (#84) + * Increase max periodic cooldown duration, tidy applyinator, and add debug messages (#81) + * add max-retries and periodic cooldown (#80) + * Correctly pick up on failed apply (#79) + * Move log messages around to prevent unnecessarily redundant messages (#78) + * create directory for applied plans before listing the directory (#77) + * Only write applied plan contents if the plan actually changes (#75) + * Set default log level to info (#76) + * change field name (#73) + diff --git a/elemental-system-agent.spec b/elemental-system-agent.spec new file mode 100644 index 0000000..c28658c --- /dev/null +++ b/elemental-system-agent.spec @@ -0,0 +1,89 @@ +# +# spec file for package elemental-system-agent +# +# Copyright (c) 2022 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: elemental-system-agent +%define gitname system-agent +Version: 0.3.5 +Release: 0 +Summary: Rancher system agent to apply 'plans' to a system +License: Apache-2.0 +Group: System/Management +URL: https://github.com/rancher/%{gitname} +Source: %{name}-%{version}.tar.gz +Source1: vendor.tar.gz + +%if 0%{?suse_version} +BuildRequires: golang-packaging +BuildRequires: golang(API) >= 1.21 +%{go_provides} +%else +%global goipath github.com/rancher/system-agent +%global forgeurl https://github.com/rancher/system-agent +%global goname %{name} +%gometa +%if (0%{?centos_version} == 800) || (0%{?rhel_version} == 800) +BuildRequires: go1.20 +%else +BuildRequires: compiler(go-compiler) +%endif +%endif + +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%description +elemental-system-agent is a daemon designed to run on a system and apply +"plans" to the system. elemental-system-agent can support both local and +remote plans, and was built to be integrated with the Rancher2 project +for provisioning next-generation, CAPI driven clusters. + +%prep +%setup -q +tar xf %{S:1} + +%build +%if 0%{?suse_version} +%goprep . +%endif + +mkdir -p bin +if [ "$(uname)" = "Linux" ]; then + OTHER_LINKFLAGS="-extldflags -static -s" +fi + + +CGO_ENABLED=0 go build -ldflags "$LINKFLAGS $OTHER_LINKFLAGS" -o bin/%{name} + +%install +%if 0%{?suse_version} +%goinstall +%endif + +# /usr/sbin +%{__install} -d -m 755 %{buildroot}/%{_sbindir} + +# elemental-system-agent +%{__install} -m 755 bin/%{name} %{buildroot}%{_sbindir} + + +%files +%defattr(-,root,root,-) +%doc README.md +%license LICENSE +%{_sbindir}/%{name} + +%changelog diff --git a/vendor.tar.gz b/vendor.tar.gz new file mode 100644 index 0000000..c2add8c --- /dev/null +++ b/vendor.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:002466bdf025c4095c56174972bd3ee9697e15ec7ba97f650f4b59a540e63566 +size 6180194