Skip to content

Commit 4bc775f

Browse files
committed
feat: chart proposal
Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>
2 parents a51e27b + 7dec7be commit 4bc775f

Some content is hidden

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

63 files changed

+2826
-1704
lines changed

.github/workflows/codecov.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
run: make test
3232
- name: Upload Report to Codecov
3333
if: steps.checksecret.outputs.result == 'true'
34-
uses: codecov/codecov-action@84508663e988701840491b86de86b666e8a86bed # v4.3.0
34+
uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be # v4.3.1
3535
with:
3636
file: ./coverage.out
3737
fail_ci_if_error: true

.github/workflows/diff.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ jobs:
1919
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
2020
with:
2121
fetch-depth: 0
22-
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
22+
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
2323
with:
24-
go-version: '1.21'
24+
go-version-file: 'go.mod'
2525
- run: make manifests
2626
- name: Checking if Helm Chart crds is not aligned
2727
run: if [[ $(git diff | wc -l) -gt 0 ]]; then echo ">>> Untracked generated files have not been committed" && git --no-pager diff && exit 1; fi

.github/workflows/e2e.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,9 @@ jobs:
4343
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
4444
with:
4545
fetch-depth: 0
46-
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
46+
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
4747
with:
48-
go-version: '1.21'
49-
- run: make manifests
50-
- name: Checking if manifests are disaligned
51-
run: test -z "$(git diff 2> /dev/null)"
52-
- name: Checking if manifests generated untracked files
53-
run: test -z "$(git ls-files --others --exclude-standard 2> /dev/null)"
48+
go-version-file: 'go.mod'
5449
- uses: engineerd/setup-kind@aa272fe2a7309878ffc2a81c56cfe3ef108ae7d0 # v0.5.0
5550
with:
5651
skipClusterCreation: true

.github/workflows/gosec.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,15 @@ jobs:
1818
steps:
1919
- name: Checkout Source
2020
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
21+
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
22+
with:
23+
go-version-file: 'go.mod'
2124
- name: Run Gosec Security Scanner
2225
uses: securego/gosec@26e57d6b340778c2983cd61775bc7e8bb41d002a # v2.19.0
2326
with:
24-
args: ./...
27+
args: '-no-fail -fmt sarif -out gosec.sarif ./...'
28+
- name: Upload SARIF file
29+
uses: github/codeql-action/upload-sarif@c4fb451437765abf5018c6fbf22cce1a7da1e5cc
30+
with:
31+
sarif_file: gosec.sarif
32+

.github/workflows/helm-test.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ jobs:
1717
with:
1818
fetch-depth: 0
1919
- uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v3
20-
with:
21-
version: v3.14.2
2220
- name: Linting Chart
2321
run: helm lint ./charts/capsule
2422
- name: Setup Chart Linting

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ jobs:
1717
runs-on: ubuntu-20.04
1818
steps:
1919
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
20-
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
20+
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
2121
with:
22-
go-version: '1.21'
22+
go-version-file: 'go.mod'
2323
- name: Run golangci-lint
2424
uses: golangci/golangci-lint-action@9d1e0624a798bb64f6c3cea93db47765312263dc # v5.1.0
2525
with:

Makefile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Version
22
GIT_HEAD_COMMIT ?= $(shell git rev-parse --short HEAD)
33
VERSION ?= $(or $(shell git describe --abbrev=0 --tags --match "v*" 2>/dev/null),$(GIT_HEAD_COMMIT))
4+
GOOS ?= $(shell go env GOOS)
5+
GOARCH ?= $(shell go env GOARCH)
46

57
# Defaults
68
REGISTRY ?= ghcr.io
@@ -141,6 +143,7 @@ dev-setup:
141143
# -- Docker
142144
####################
143145

146+
KO_PLATFORM ?= linux/$(GOARCH)
144147
KOCACHE ?= /tmp/ko-cache
145148
KO_REGISTRY := ko.local
146149
KO_TAGS ?= "latest"
@@ -160,9 +163,9 @@ LD_FLAGS := "-X main.Version=$(VERSION) \
160163

161164
.PHONY: ko-build-capsule
162165
ko-build-capsule: ko
163-
@echo Building Capsule $(KO_TAGS) >&2
166+
@echo Building Capsule $(KO_TAGS) for $(KO_PLATFORM) >&2
164167
@LD_FLAGS=$(LD_FLAGS) KOCACHE=$(KOCACHE) KO_DOCKER_REPO=$(CAPSULE_IMG) \
165-
$(KO) build ./ --bare --tags=$(KO_TAGS) --push=false --local
168+
$(KO) build ./ --bare --tags=$(KO_TAGS) --push=false --local --platform=$(KO_PLATFORM)
166169

167170
.PHONY: ko-build-all
168171
ko-build-all: ko-build-capsule
@@ -190,7 +193,7 @@ ko-publish-all: ko-publish-capsule
190193
####################
191194

192195
CONTROLLER_GEN := $(shell pwd)/bin/controller-gen
193-
CONTROLLER_GEN_VERSION := v0.10.0
196+
CONTROLLER_GEN_VERSION := v0.15.0
194197
controller-gen: ## Download controller-gen locally if necessary.
195198
$(call go-install-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_GEN_VERSION))
196199

@@ -200,7 +203,7 @@ apidocs-gen: ## Download crdoc locally if necessary.
200203
$(call go-install-tool,$(APIDOCS_GEN),fybrik.io/crdoc@$(APIDOCS_GEN_VERSION))
201204

202205
GINKGO := $(shell pwd)/bin/ginkgo
203-
GINGKO_VERSION := v2.15.0
206+
GINGKO_VERSION := v2.17.2
204207
ginkgo: ## Download ginkgo locally if necessary.
205208
$(call go-install-tool,$(GINKGO),github.com/onsi/ginkgo/v2/ginkgo@$(GINGKO_VERSION))
206209

@@ -324,5 +327,5 @@ e2e-destroy:
324327

325328
SPELL_CHECKER = npx spellchecker-cli
326329
docs-lint:
327-
cd docs/content && $(SPELL_CHECKER) -f "*.md" "*/*.md" -d dictionary.txt
330+
cd docs/content && $(SPELL_CHECKER) -f "*.md" "*/*.md" "!general/crds-apis.md" -d dictionary.txt
328331

api/v1beta1/zz_generated.deepcopy.go

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/v1beta2/zz_generated.deepcopy.go

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/capsule.clastix.io_capsuleconfigurations.yaml

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.10.0
7-
creationTimestamp: null
6+
controller-gen.kubebuilder.io/version: v0.15.0
87
name: capsuleconfigurations.capsule.clastix.io
98
spec:
109
group: capsule.clastix.io
@@ -22,14 +21,19 @@ spec:
2221
API.
2322
properties:
2423
apiVersion:
25-
description: 'APIVersion defines the versioned schema of this representation
26-
of an object. Servers should convert recognized schemas to the latest
27-
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
24+
description: |-
25+
APIVersion defines the versioned schema of this representation of an object.
26+
Servers should convert recognized schemas to the latest internal value, and
27+
may reject unrecognized values.
28+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
2829
type: string
2930
kind:
30-
description: 'Kind is a string value representing the REST resource this
31-
object represents. Servers may infer this from the endpoint the client
32-
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
31+
description: |-
32+
Kind is a string value representing the REST resource this object represents.
33+
Servers may infer this from the endpoint the client submits requests to.
34+
Cannot be updated.
35+
In CamelCase.
36+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
3337
type: string
3438
metadata:
3539
type: object
@@ -38,23 +42,20 @@ spec:
3842
properties:
3943
enableTLSReconciler:
4044
default: true
41-
description: Toggles the TLS reconciler, the controller that is able
42-
to generate CA and certificates for the webhooks when not using
43-
an already provided CA and certificate, or when these are managed
44-
externally with Vault, or cert-manager.
45+
description: |-
46+
Toggles the TLS reconciler, the controller that is able to generate CA and certificates for the webhooks
47+
when not using an already provided CA and certificate, or when these are managed externally with Vault, or cert-manager.
4548
type: boolean
4649
forceTenantPrefix:
4750
default: false
48-
description: Enforces the Tenant owner, during Namespace creation,
49-
to name it using the selected Tenant name as prefix, separated by
50-
a dash. This is useful to avoid Namespace name collision in a public
51-
CaaS environment.
51+
description: |-
52+
Enforces the Tenant owner, during Namespace creation, to name it using the selected Tenant name as prefix,
53+
separated by a dash. This is useful to avoid Namespace name collision in a public CaaS environment.
5254
type: boolean
5355
nodeMetadata:
54-
description: Allows to set the forbidden metadata for the worker nodes
55-
that could be patched by a Tenant. This applies only if the Tenant
56-
has an active NodeSelector, and the Owner have right to patch their
57-
nodes.
56+
description: |-
57+
Allows to set the forbidden metadata for the worker nodes that could be patched by a Tenant.
58+
This applies only if the Tenant has an active NodeSelector, and the Owner have right to patch their nodes.
5859
properties:
5960
forbiddenAnnotations:
6061
description: Define the annotations that a Tenant Owner cannot
@@ -87,15 +88,15 @@ spec:
8788
TLSSecretName: capsule-tls
8889
mutatingWebhookConfigurationName: capsule-mutating-webhook-configuration
8990
validatingWebhookConfigurationName: capsule-validating-webhook-configuration
90-
description: Allows to set different name rather than the canonical
91-
one for the Capsule configuration objects, such as webhook secret
92-
or configurations.
91+
description: |-
92+
Allows to set different name rather than the canonical one for the Capsule configuration objects,
93+
such as webhook secret or configurations.
9394
properties:
9495
TLSSecretName:
9596
default: capsule-tls
96-
description: Defines the Secret name used for the webhook server.
97-
Must be in the same Namespace where the Capsule Deployment is
98-
deployed.
97+
description: |-
98+
Defines the Secret name used for the webhook server.
99+
Must be in the same Namespace where the Capsule Deployment is deployed.
99100
type: string
100101
mutatingWebhookConfigurationName:
101102
default: capsule-mutating-webhook-configuration

0 commit comments

Comments
 (0)