Skip to content

Commit

Permalink
Bump dependencies and Go version (#269)
Browse files Browse the repository at this point in the history
* bump k8s.io dependencies from v0.28.4 to v0.29.3, and controller-runtime to v0.16.3 to v0.17.2

* bump trivy dependency to v0.50.1

* bump marvin dependency to v0.2.3

* bump curlimages/curl version to 8.7.1

* bump rancher/kubectl version to v1.29.2

* increment year in hack/boilerplate.go.txt

* update ghcr.io/slok/kube-code-generator to v0.1.0

* bump tools versions in Makefile

* bump k8s version in suite_test.go

* update config/crd/kustomization.yaml

* update config/default/kustomization.yaml

* bump go version to 1.20 to 1.21

* add go.work in .gitignore

* generate manifests

* update labels in config/rbac/service_account.yaml

* update chart README.md

* bump kubexns to v0.1.3

* remove config/crd/patches
  • Loading branch information
matheusfm authored Apr 16, 2024
1 parent dda3a5a commit d19422e
Show file tree
Hide file tree
Showing 39 changed files with 1,411 additions and 1,171 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ Dockerfile.cross
# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Kubernetes Generated files - skip generated files, except for vendored files
# Go workspace file
go.work

# Kubernetes Generated files - skip generated files, except for vendored files
!vendor/**/zz_generated.*

# editor and IDE paraphernalia
Expand Down
18 changes: 10 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ IMG ?= controller:latest
WORKER_IMG ?= worker:latest

# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.27.1
ENVTEST_K8S_VERSION = 1.29.3

# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
Expand Down Expand Up @@ -61,7 +61,7 @@ generate-client: ## Generate client
-e GROUPS_VERSION="zora:v1alpha1" \
-e GENERATION_TARGETS="client" \
-e BOILERPLATE_PATH="hack/boilerplate.go.txt" \
ghcr.io/slok/kube-code-generator:v1.27.0
ghcr.io/slok/kube-code-generator:v0.1.0

.PHONY: generate-helm-docs
generate-helm-docs: helm-docs ## Generate documentation for helm chart.
Expand Down Expand Up @@ -206,10 +206,12 @@ KIND ?= $(LOCALBIN)/kind
GOLANGCI_LINT = $(LOCALBIN)/golangci-lint

## Tool Versions
KUSTOMIZE_VERSION ?= v5.2.1
CONTROLLER_TOOLS_VERSION ?= v0.13.0
HELM_DOCS_VERSION ?= v1.12.0
KIND_VERSION ?= v0.20.0
KUSTOMIZE_VERSION ?= v5.3.0
CONTROLLER_TOOLS_VERSION ?= v0.14.0
ENVTEST_VERSION ?= release-0.17
HELM_DOCS_VERSION ?= v1.13.1
ADDLICENSE_VERSION ?= v1.1.1
KIND_VERSION ?= v0.22.0
GOLANGCI_LINT_VERSION ?= v1.54.2

.PHONY: kustomize
Expand All @@ -230,12 +232,12 @@ $(CONTROLLER_GEN): $(LOCALBIN)
.PHONY: envtest
envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
$(ENVTEST): $(LOCALBIN)
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@c7e1dc9
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@$(ENVTEST_VERSION)

.PHONY: addlicense
addlicense: $(ADDLICENSE) ## Download addlicense locally if necessary
$(ADDLICENSE): $(LOCALBIN)
test -s $(LOCALBIN)/addlicense || GOBIN=$(LOCALBIN) go install github.com/google/addlicense@latest
test -s $(LOCALBIN)/addlicense || GOBIN=$(LOCALBIN) go install github.com/google/addlicense@$(ADDLICENSE_VERSION)

.PHONY: helm-docs
helm-docs: $(HELM_DOCS) ## Download helm-docs locally if necessary
Expand Down
2 changes: 1 addition & 1 deletion api/zora/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions charts/zora/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ The following table lists the configurable parameters of the Zora chart and thei
| saas.workspaceID | string | `""` | Your SaaS workspace ID |
| saas.server | string | `"https://zora-dashboard.undistro.io"` | SaaS server URL |
| saas.installURL | string | `"{{.Values.saas.server}}/zora/api/v1alpha1/workspaces/{{.Values.saas.workspaceID}}/helmreleases"` | SaaS URL template to notify installation |
| hooks.install.image.repository | string | `"curlimages/curl"` | Install hook image repository |
| hooks.install.image.tag | string | `"8.2.1"` | Install hook image tag |
| hooks.delete.image.repository | string | `"rancher/kubectl"` | Delete hook image repository |
| hooks.delete.image.tag | string | `"v1.28.2"` | Delete hook image tag |
| hooks.install.image.repository | string | `"curlimages/curl"` | Post-install hook image repository |
| hooks.install.image.tag | string | `"8.7.1"` | Post-install hook image tag |
| hooks.delete.image.repository | string | `"rancher/kubectl"` | Pre-delete hook image repository |
| hooks.delete.image.tag | string | `"v1.29.2"` | Pre-delete hook image tag |
| imageCredentials.create | bool | `false` | Specifies whether the secret should be created by providing credentials |
| imageCredentials.registry | string | `"ghcr.io"` | Docker registry host |
| imageCredentials.username | string | `""` | Docker registry username |
Expand Down Expand Up @@ -133,7 +133,7 @@ The following table lists the configurable parameters of the Zora chart and thei
| scan.plugins.popeye.env | list | `[]` | List of environment variables to set in popeye container. |
| scan.plugins.popeye.envFrom | list | `[]` | List of sources to populate environment variables in popeye container. |
| kubexnsImage.repository | string | `"ghcr.io/undistro/kubexns"` | kubexns image repository |
| kubexnsImage.tag | string | `"v0.1.2"` | kubexns image tag |
| kubexnsImage.tag | string | `"v0.1.3"` | kubexns image tag |
| customChecksConfigMap | string | `"zora-custom-checks"` | Custom checks ConfigMap name |
| httpsProxy | string | `""` | HTTPS proxy URL |
| noProxy | string | `"kubernetes.default.svc.*,127.0.0.1,localhost"` | Comma-separated list of URL patterns to be excluded from going through the proxy |
Expand Down
19 changes: 12 additions & 7 deletions charts/zora/crds/zora.undistro.io_clusterissues.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
controller-gen.kubebuilder.io/version: v0.14.0
name: clusterissues.zora.undistro.io
spec:
group: zora.undistro.io
Expand Down Expand Up @@ -63,14 +63,19 @@ spec:
description: ClusterIssue is the Schema for the clusterissues API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
Expand Down
95 changes: 52 additions & 43 deletions charts/zora/crds/zora.undistro.io_clusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
controller-gen.kubebuilder.io/version: v0.14.0
name: clusters.zora.undistro.io
spec:
group: zora.undistro.io
Expand Down Expand Up @@ -67,14 +67,19 @@ spec:
description: Cluster is the Schema for the clusters API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
Expand All @@ -86,8 +91,10 @@ spec:
namespace that contains the kubeconfig data
properties:
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind, uid?'
description: |-
Name of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind, uid?
type: string
type: object
x-kubernetes-map-type: atomic
Expand All @@ -100,42 +107,42 @@ spec:
current state.
items:
description: "Condition contains details for one aspect of the current
state of this API Resource. --- This struct is intended for direct
use as an array at the field path .status.conditions. For example,
\n type FooStatus struct{ // Represents the observations of a
foo's current state. // Known .status.conditions.type are: \"Available\",
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
// +listType=map // +listMapKey=type Conditions []metav1.Condition
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
state of this API Resource.\n---\nThis struct is intended for
direct use as an array at the field path .status.conditions. For
example,\n\n\n\ttype FooStatus struct{\n\t // Represents the
observations of a foo's current state.\n\t // Known .status.conditions.type
are: \"Available\", \"Progressing\", and \"Degraded\"\n\t //
+patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t
\ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\"
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t
\ // other fields\n\t}"
properties:
lastTransitionTime:
description: lastTransitionTime is the last time the condition
transitioned from one status to another. This should be when
the underlying condition changed. If that is not known, then
using the time when the API field changed is acceptable.
description: |-
lastTransitionTime is the last time the condition transitioned from one status to another.
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
format: date-time
type: string
message:
description: message is a human readable message indicating
details about the transition. This may be an empty string.
description: |-
message is a human readable message indicating details about the transition.
This may be an empty string.
maxLength: 32768
type: string
observedGeneration:
description: observedGeneration represents the .metadata.generation
that the condition was set based upon. For instance, if .metadata.generation
is currently 12, but the .status.conditions[x].observedGeneration
is 9, the condition is out of date with respect to the current
state of the instance.
description: |-
observedGeneration represents the .metadata.generation that the condition was set based upon.
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
with respect to the current state of the instance.
format: int64
minimum: 0
type: integer
reason:
description: reason contains a programmatic identifier indicating
the reason for the condition's last transition. Producers
of specific condition types may define expected values and
meanings for this field, and whether the values are considered
a guaranteed API. The value should be a CamelCase string.
description: |-
reason contains a programmatic identifier indicating the reason for the condition's last transition.
Producers of specific condition types may define expected values and meanings for this field,
and whether the values are considered a guaranteed API.
The value should be a CamelCase string.
This field may not be empty.
maxLength: 1024
minLength: 1
Expand All @@ -149,11 +156,12 @@ spec:
- Unknown
type: string
type:
description: type of condition in CamelCase or in foo.example.com/CamelCase.
--- Many .condition.type values are consistent across resources
like Available, but because arbitrary conditions can be useful
(see .node.status.conditions), the ability to deconflict is
important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
description: |-
type of condition in CamelCase or in foo.example.com/CamelCase.
---
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
useful (see .node.status.conditions), the ability to deconflict is important.
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
Expand All @@ -172,9 +180,9 @@ spec:
description: Usage of CPU in quantity and percentage
type: string
creationTimestamp:
description: CreationTimestamp is a timestamp representing the server
time when the kube-system namespace was created. It is represented
in RFC3339 form and is in UTC.
description: |-
CreationTimestamp is a timestamp representing the server time when the kube-system namespace was created.
It is represented in RFC3339 form and is in UTC.
format: date-time
type: string
kubernetesVersion:
Expand All @@ -192,8 +200,9 @@ spec:
description: Usage of memory in quantity and percentage
type: string
observedGeneration:
description: ObservedGeneration is the 'Generation' of the resource
that was last processed by the controller.
description: |-
ObservedGeneration is the 'Generation' of the resource that
was last processed by the controller.
format: int64
type: integer
provider:
Expand Down
Loading

0 comments on commit d19422e

Please sign in to comment.