Skip to content

Commit 0ea007d

Browse files
authored
Merge branch 'projectsveltos:main' into feature/extend-log-command-managed-clusters-v2
2 parents da08016 + 0ac86c1 commit 0ea007d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+738
-5239
lines changed

.github/workflows/main.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616
- name: checkout
1717
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1818
- name: Set up Go
19-
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
19+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
2020
with:
21-
go-version: 1.22.7
21+
go-version: 1.24.1
2222
- name: Build
2323
run: make build
2424
- name: FMT
@@ -35,9 +35,9 @@ jobs:
3535
- name: checkout
3636
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3737
- name: Set up Go
38-
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
38+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
3939
with:
40-
go-version: 1.22.7
40+
go-version: 1.24.1
4141
- name: ut
4242
run: make test
4343
env:

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build the manager binary
2-
FROM golang:1.22.7 AS builder
2+
FROM golang:1.24.1 AS builder
33

44
ARG ARCH
55
ARG GIT_VERSION=unknown

Makefile

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ KUBECTL := $(TOOLS_BIN_DIR)/kubectl
3535
SETUP_ENVTEST := $(TOOLS_BIN_DIR)/setup_envs
3636
CONTROLLER_GEN := $(TOOLS_BIN_DIR)/controller-gen
3737

38-
GOLANGCI_LINT_VERSION := "v1.61.0"
38+
GOLANGCI_LINT_VERSION := "v1.64.7"
3939

4040
KUSTOMIZE_VER := v5.3.0
4141
KUSTOMIZE_BIN := kustomize
@@ -44,7 +44,7 @@ KUSTOMIZE_PKG := sigs.k8s.io/kustomize/kustomize/v5
4444
$(KUSTOMIZE): # Build kustomize from tools folder.
4545
CGO_ENABLED=0 GOBIN=$(TOOLS_BIN_DIR) $(GO_INSTALL) $(KUSTOMIZE_PKG) $(KUSTOMIZE_BIN) $(KUSTOMIZE_VER)
4646

47-
CONVERSION_GEN_VER := v0.31.0
47+
CONVERSION_GEN_VER := v0.32.0
4848
CONVERSION_GEN_BIN := conversion-gen
4949
# We are intentionally using the binary without version suffix, to avoid the version
5050
# in generated files.
@@ -60,7 +60,7 @@ $(CONVERSION_GEN_BIN): $(CONVERSION_GEN) ## Build a local copy of conversion-gen
6060
$(CONVERSION_GEN): # Build conversion-gen from tools folder.
6161
GOBIN=$(TOOLS_BIN_DIR) $(GO_INSTALL) $(CONVERSION_GEN_PKG) $(CONVERSION_GEN_BIN) $(CONVERSION_GEN_VER)
6262

63-
SETUP_ENVTEST_VER := v0.0.0-20240522175850-2e9781e9fc60
63+
SETUP_ENVTEST_VER := release-0.20
6464
SETUP_ENVTEST_BIN := setup-envtest
6565
SETUP_ENVTEST := $(abspath $(TOOLS_BIN_DIR)/$(SETUP_ENVTEST_BIN)-$(SETUP_ENVTEST_VER))
6666
SETUP_ENVTEST_PKG := sigs.k8s.io/controller-runtime/tools/setup-envtest
@@ -120,23 +120,10 @@ generate: ## Run all generate-manifests-*, generate-go-deepcopy-*
120120
echo "---" >> manifest/manifest.yaml
121121
cat tmp/apiextensions.k8s.io_v1_customresourcedefinition_snapshots.utils.projectsveltos.io.yaml >> manifest/manifest.yaml
122122
echo "---" >> manifest/manifest.yaml
123-
cat tmp/apiextensions.k8s.io_v1_customresourcedefinition_techsupports.utils.projectsveltos.io.yaml >> manifest/manifest.yaml
124123
rm -rf tmp
125124
MANIFEST_IMG=$(SVELTOSCTL_IMG) MANIFEST_TAG=$(TAG) $(MAKE) set-manifest-image
126125
$(MAKE) fmt
127126

128-
.PHONY: generate-go-conversions
129-
generate-go-conversions: $(CONVERSION_GEN) ## Generate conversions go code for utils.projectsveltos.io api
130-
$(MAKE) clean-generated-conversions SRC_DIRS="./api/v1alpha1"
131-
$(CONVERSION_GEN) \
132-
--output-file=zz_generated.conversion.go \
133-
--go-header-file=./hack/boilerplate.generatego.txt \
134-
./api/v1alpha1
135-
136-
.PHONY: clean-generated-conversions
137-
clean-generated-conversions: ## Remove files generated by conversion-gen from the mentioned dirs. Example SRC_DIRS="./api/v1alpha4"
138-
(IFS=','; for i in $(SRC_DIRS); do find $$i -type f -name 'zz_generated.conversion*' -exec rm -f {} \;; done)
139-
140127
set-manifest-image:
141128
sed -i'' -e 's@image: .*@image: '"docker.io/${MANIFEST_IMG}:$(MANIFEST_TAG)"'@' ./manifest/manifest.yaml
142129

README.md

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ You might also want to change the timezone of sveltosctl pod by using specific t
7373
- [Multi-tenancy: display admin permissions](#multi-tenancy-display-admin-permissions)
7474
- [Log severity settings](#log-severity-settings)
7575
- [Display outcome of ClusterProfile/Profile in DryRun mode](#display-outcome-of-clusterprofile-in-dryrun-mode)
76-
- [Techsupport](#techsupport)
77-
- [list](#list)
7876
- [Snapshot](#snapshot)
7977
- [list](#list-1)
8078
- [diff](#diff)
@@ -248,57 +246,6 @@ Usage:
248246
--profile=<name> Show which Kubernetes addons would change because of this clusterprofile/profile. If not specified all clusterprofiles/profiles are considered.
249247
```
250248

251-
## Techsupport
252-
253-
When running sveltosctl as pod in the management cluster, it can take collect techsupports (both logs and resources).
254-
255-
Define a Techsupport instance, following for instance will collect a techsupport every hour, collecting:
256-
257-
1. logs for all pods in kube-system namespace (last 10 minutes,i.e, 600 seconds, of logs);
258-
2. All Secrets and Deployments
259-
260-
from all managed clusters matching cluster selectors __env=fv__
261-
262-
```
263-
apiVersion: utils.projectsveltos.io/v1beta1
264-
kind: Techsupport
265-
metadata:
266-
name: hourly
267-
spec:
268-
clusterSelector:
269-
matchLabels:
270-
env: fv
271-
schedule: “00 * * * *”
272-
storage: /techsupport
273-
logs:
274-
- namespace: kube-system
275-
sinceSeconds: 600
276-
resources:
277-
- group: “”
278-
version: v1
279-
kind: Secret
280-
- group: “”
281-
version: v1
282-
kind: Deployment
283-
```
284-
285-
where field _schedule_ is defined in [Cron format](https://en.wikipedia.org/wiki/Cron).
286-
287-
288-
### list
289-
290-
**techsupport list** can be used to display all collected techsupports:
291-
292-
```
293-
kubectl exec -it -n projectsveltos sveltosctl-0 -- ./sveltosctl techsupport list --techsupport=hourly
294-
+--------------------+---------------------+
295-
| TECHSUPPORT POLICY | DATE |
296-
+--------------------+---------------------+
297-
| hourly | 2022-10-10:22:00:00 |
298-
| hourly | 2022-10-10:23:00:00 |
299-
+--------------------+---------------------+
300-
```
301-
302249
## Snapshot
303250

304251
When running sveltosctl as pod in the management cluster, it can take configuration snapshot.

api/v1alpha1/collection_status.go

Lines changed: 0 additions & 31 deletions
This file was deleted.

api/v1alpha1/doc.go

Lines changed: 0 additions & 20 deletions
This file was deleted.

api/v1alpha1/groupversion_info.go

Lines changed: 0 additions & 38 deletions
This file was deleted.

api/v1alpha1/snapshot_types.go

Lines changed: 0 additions & 95 deletions
This file was deleted.

0 commit comments

Comments
 (0)