Skip to content

Commit

Permalink
Refactor and rename project to gardener-extension-provider-ironcore (
Browse files Browse the repository at this point in the history
  • Loading branch information
sujeet01 authored Nov 30, 2023
1 parent f37dea4 commit dc83161
Show file tree
Hide file tree
Showing 203 changed files with 1,532 additions and 1,533 deletions.
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ updates:
interval: "weekly"
open-pull-requests-limit: 10
reviewers:
- "onmetal/gardener-extension-maintainers"
- "ironcore-dev/integration"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
reviewers:
- "onmetal/gardener-extension-maintainers"
- "ironcore-dev/integration"
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
reviewers:
- "onmetal/gardener-extension-maintainers"
- "ironcore-dev/integration"
8 changes: 4 additions & 4 deletions .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:
strategy:
matrix:
image:
- name: gardener-extension-provider-onmetal
target: gardener-extension-provider-onmetal
- name: gardener-extension-admission-onmetal
target: gardener-extension-admission-onmetal
- name: gardener-extension-provider-ironcore
target: gardener-extension-provider-ironcore
- name: gardener-extension-admission-ironcore
target: gardener-extension-admission-ironcore
if: ${{ github.event.label.name == 'ok-to-image' }} || ${{ github.event.label.name == 'ok-to-🐳' }} || ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
steps:
Expand Down
4 changes: 2 additions & 2 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# onmetal-csi-driver maintainers
* @onmetal/gardener-extension-maintainers
# gardener-extension-provider-ironcore maintainers
* @ironcore-dev/integration
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Please refer to the [Gardener on Metal code of conduct](https://onmetal.github.io/documentation/contribute/overview/#code-of-conduct).
Please refer to the [IronCore code of conduct](https://ironcore-dev.github.io/documentation/contribute/overview/#code-of-conduct).
16 changes: 8 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,23 @@ ARG TARGETARCH
# Build
RUN --mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/go/pkg \
CGO_ENABLED=0 GOOS=linux GOARCH=${GOARCH} go build -a -o gardener-extension-provider-onmetal ./cmd/gardener-extension-provider-onmetal/main.go && \
CGO_ENABLED=0 GOOS=linux GOARCH=${GOARCH} go build -a -o gardener-extension-admission-onmetal ./cmd/gardener-extension-admission-onmetal/main.go
CGO_ENABLED=0 GOOS=linux GOARCH=${GOARCH} go build -a -o gardener-extension-provider-ironcore ./cmd/gardener-extension-provider-ironcore/main.go && \
CGO_ENABLED=0 GOOS=linux GOARCH=${GOARCH} go build -a -o gardener-extension-admission-ironcore ./cmd/gardener-extension-admission-ironcore/main.go

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM gcr.io/distroless/static:nonroot AS gardener-extension-provider-onmetal
FROM gcr.io/distroless/static:nonroot AS gardener-extension-provider-ironcore
WORKDIR /
COPY charts /charts
COPY --from=builder /workspace/gardener-extension-provider-onmetal /gardener-extension-provider-onmetal
COPY --from=builder /workspace/gardener-extension-provider-ironcore /gardener-extension-provider-ironcore
USER 65532:65532

ENTRYPOINT ["/gardener-extension-provider-onmetal"]
ENTRYPOINT ["/gardener-extension-provider-ironcore"]

FROM gcr.io/distroless/static:nonroot AS gardener-extension-admission-onmetal
FROM gcr.io/distroless/static:nonroot AS gardener-extension-admission-ironcore
WORKDIR /
COPY charts /charts
COPY --from=builder /workspace/gardener-extension-admission-onmetal /gardener-extension-admission-onmetal
COPY --from=builder /workspace/gardener-extension-admission-ironcore /gardener-extension-admission-ironcore
USER 65532:65532

ENTRYPOINT ["/gardener-extension-admission-onmetal"]
ENTRYPOINT ["/gardener-extension-admission-ironcore"]
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
EXTENSION_PREFIX := gardener-extension
NAME := provider-onmetal
NAME := provider-ironcore
REGISTRY := ghcr.io
ADMISSION_NAME := admission-onmetal
ADMISSION_NAME := admission-ironcore
IMAGE_PREFIX := $(REGISTRY)/extensions
REPO_ROOT := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
HACK_DIR := $(REPO_ROOT)/hack
Expand Down Expand Up @@ -56,7 +56,7 @@ MOCKGEN ?= $(LOCALBIN)/mockgen
## Tool Versions
KUSTOMIZE_VERSION ?= v3.8.7
CONTROLLER_TOOLS_VERSION ?= v0.13.0
VGOPATH_VERSION ?= v0.1.2
VGOPATH_VERSION ?= v0.1.3
CODE_GENERATOR_VERSION ?= v0.28.3
ADDLICENSE_VERSION ?= v1.1.1
GOIMPORTS_VERSION ?= v0.14.0
Expand Down Expand Up @@ -89,7 +89,7 @@ start-admission:
./cmd/$(EXTENSION_PREFIX)-$(ADMISSION_NAME) \
--webhook-config-server-host=0.0.0.0 \
--webhook-config-server-port=9443 \
--webhook-config-cert-dir=./example/admission-onmetal-certs
--webhook-config-cert-dir=./example/admission-ironcore-certs

#################################################################
# Rules related to binary build, Docker image build and release #
Expand Down Expand Up @@ -124,11 +124,11 @@ clean: $(CLEAN)

.PHONY: add-license
add-license: addlicense ## Add license headers to all go files.
find . -name '*.go' -exec $(ADDLICENSE) -c 'OnMetal authors' {} +
find . -name '*.go' -exec $(ADDLICENSE) -c 'IronCore authors' {} +

.PHONY: check-license
check-license: addlicense ## Check that every file has a license header present.
find . -name '*.go' -exec $(ADDLICENSE) -check -c 'OnMetal authors' {} +
find . -name '*.go' -exec $(ADDLICENSE) -check -c 'IronCore authors' {} +

.PHONY: check
check: generate generate-charts add-license fmt lint test # Generate manifests, code, lint, add licenses, test
Expand All @@ -153,7 +153,7 @@ generate-charts:

.PHONY: docs
docs: gen-crd-api-reference-docs ## Run go generate to generate API reference documentation.
$(GEN_CRD_API_REFERENCE_DOCS) -api-dir ./pkg/apis/onmetal/v1alpha1 -config ./hack/api-reference/api.json -template-dir ./hack/api-reference/template -out-file ./hack/api-reference/api.md
$(GEN_CRD_API_REFERENCE_DOCS) -api-dir ./pkg/apis/ironcore/v1alpha1 -config ./hack/api-reference/api.json -template-dir ./hack/api-reference/template -out-file ./hack/api-reference/api.md
$(GEN_CRD_API_REFERENCE_DOCS) -api-dir ./pkg/apis/config/v1alpha1 -config ./hack/api-reference/config.json -template-dir ./hack/api-reference/template -out-file ./hack/api-reference/config.md

.PHONY: format
Expand Down Expand Up @@ -216,7 +216,7 @@ $(ENVTEST): $(LOCALBIN)
.PHONY: vgopath
vgopath: $(VGOPATH) ## Download vgopath locally if necessary.
$(VGOPATH): $(LOCALBIN)
test -s $(LOCALBIN)/vgopath || GOBIN=$(LOCALBIN) go install github.com/onmetal/vgopath@$(VGOPATH_VERSION)
test -s $(LOCALBIN)/vgopath || GOBIN=$(LOCALBIN) go install github.com/ironcore-dev/vgopath@$(VGOPATH_VERSION)

.PHONY: deepcopy-gen
deepcopy-gen: $(DEEPCOPY_GEN) ## Download deepcopy-gen locally if necessary.
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# [Gardener Extension for Onmetal provider](https://gardener.cloud)
# [Gardener Extension for IronCore provider](https://gardener.cloud)

[![Go Report Card](https://goreportcard.com/badge/github.com/onmetal/gardener-extension-provider-onmetal)](https://goreportcard.com/report/github.com/onmetal/gardener-extension-provider-onmetal)
[![Go Report Card](https://goreportcard.com/badge/github.com/ironcore-dev/gardener-extension-provider-ironcore)](https://goreportcard.com/report/github.com/ironcore-dev/gardener-extension-provider-ironcore)

Project Gardener implements the automated management and operation of [Kubernetes](https://kubernetes.io/) clusters as a service.
Its main principle is to leverage Kubernetes concepts for all of its tasks.
Expand All @@ -10,7 +10,7 @@ However, the project has grown to a size where it is very hard to extend, mainta
With [GEP-1](https://github.com/gardener/gardener/blob/master/docs/proposals/01-extensibility.md) we have proposed how the architecture can be changed in a way to support external controllers that contain their very own vendor specifics.
This way, we can keep Gardener core clean and independent.

This controller implements Gardener's extension contract for the Gardener on Metal (Onmetal) provider.
This controller implements Gardener's extension contract for the IronCore provider.

An example for a `ControllerRegistration` resource that can be used to register this controller to Gardener can be found [here](example/controller-registration.yaml).

Expand All @@ -37,7 +37,7 @@ Static code checks and tests can be executed by running `make verify`. We are us

## Feedback and Support

Feedback and contributions are always welcome. Please report bugs or suggestions as [GitHub issues](https://github.com/onmetal/gardener-extension-provider-onmetal/issues) or join our [Slack channel #gardener](https://kubernetes.slack.com/messages/gardener) (please invite yourself to the Kubernetes workspace [here](http://slack.k8s.io)).
Feedback and contributions are always welcome. Please report bugs or suggestions as [GitHub issues](https://github.com/ironcore-dev/gardener-extension-provider-ironcore/issues) or join our [Slack channel #gardener](https://kubernetes.slack.com/messages/gardener) (please invite yourself to the Kubernetes workspace [here](http://slack.k8s.io)).

## Learn more!

Expand Down
5 changes: 5 additions & 0 deletions charts/gardener-extension-admission-ironcore/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v1
appVersion: "1.0"
description: A Helm chart for the IronCore gardener-extension-admission-ironcore
name: gardener-extension-admission-ironcore
version: 0.1.0
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: v1
description: A Helm chart to deploy the gardener-extension-admission-onmetal application related resources
description: A Helm chart to deploy the gardener-extension-admission-ironcore application related resources
name: application
version: 0.1.0
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: ValidatingWebhookConfiguration
metadata:
name: {{ include "name" . }}
webhooks:
- name: validation.onmetal.provider.extensions.gardener.cloud
- name: validation.ironcore.provider.extensions.gardener.cloud
rules:
- apiGroups:
- "core.gardener.cloud"
Expand All @@ -21,7 +21,7 @@ webhooks:
objectSelector:
{{- if .Values.global.webhookConfig.useObjectSelector }}
matchLabels:
provider.extensions.gardener.cloud/onmetal: "true"
provider.extensions.gardener.cloud/ironcore: "true"
{{- end }}
namespaceSelector: {}
sideEffects: None
Expand All @@ -38,7 +38,7 @@ webhooks:
path: /webhooks/validate
{{- end }}
caBundle: {{ required ".Values.global.webhookConfig.caBundle is required" .Values.global.webhookConfig.caBundle | b64enc }}
- name: secrets.validation.onmetal.provider.extensions.gardener.cloud
- name: secrets.validation.ironcore.provider.extensions.gardener.cloud
rules:
- apiGroups:
- ""
Expand All @@ -51,7 +51,7 @@ webhooks:
failurePolicy: Fail
objectSelector:
matchLabels:
provider.shoot.gardener.cloud/onmetal: "true"
provider.shoot.gardener.cloud/ironcore: "true"
namespaceSelector: {}
sideEffects: None
admissionReviewVersions:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: v1
description: A Helm chart to deploy the gardener-extension-admission-onmetal runtime related resources
description: A Helm chart to deploy the gardener-extension-admission-ironcore runtime related resources
name: runtime
version: 0.1.0
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ spec:
template:
metadata:
annotations:
checksum/secret-gardener-extension-admission-onmetal-cert: {{ include (print $.Template.BasePath "/secret-cert.yaml") . | sha256sum }}
checksum/secret-gardener-extension-admission-ironcore-cert: {{ include (print $.Template.BasePath "/secret-cert.yaml") . | sha256sum }}
{{- if .Values.global.kubeconfig }}
checksum/gardener-extension-admission-onmetal-kubeconfig: {{ include (print $.Template.BasePath "/secret-kubeconfig.yaml") . | sha256sum }}
checksum/gardener-extension-admission-ironcore-kubeconfig: {{ include (print $.Template.BasePath "/secret-kubeconfig.yaml") . | sha256sum }}
{{- end }}
labels:
{{ include "labels" . | indent 8 }}
Expand All @@ -40,11 +40,11 @@ spec:
image: {{ include "image" .Values.global.image }}
imagePullPolicy: {{ .Values.global.image.pullPolicy }}
command:
- /gardener-extension-admission-onmetal
- /gardener-extension-admission-ironcore
- --webhook-config-server-port={{ .Values.global.webhookConfig.serverPort }}
- --webhook-config-cert-dir=/etc/gardener-extension-admission-onmetal/srv
- --webhook-config-cert-dir=/etc/gardener-extension-admission-ironcore/srv
{{- if .Values.global.kubeconfig }}
- --kubeconfig=/etc/gardener-extension-admission-onmetal/kubeconfig/kubeconfig
- --kubeconfig=/etc/gardener-extension-admission-ironcore/kubeconfig/kubeconfig
{{- end }}
{{- if .Values.global.metricsPort }}
- --metrics-bind-address=:{{ .Values.global.metricsPort }}
Expand All @@ -71,12 +71,12 @@ spec:
{{ toYaml .Values.global.resources | nindent 10 }}
{{- end }}
volumeMounts:
- name: gardener-extension-admission-onmetal-cert
mountPath: /etc/gardener-extension-admission-onmetal/srv
- name: gardener-extension-admission-ironcore-cert
mountPath: /etc/gardener-extension-admission-ironcore/srv
readOnly: true
{{- if .Values.global.kubeconfig }}
- name: gardener-extension-admission-onmetal-kubeconfig
mountPath: /etc/gardener-extension-admission-onmetal/kubeconfig
- name: gardener-extension-admission-ironcore-kubeconfig
mountPath: /etc/gardener-extension-admission-ironcore/kubeconfig
readOnly: true
{{- end }}
{{- if .Values.global.serviceAccountTokenVolumeProjection.enabled }}
Expand All @@ -85,14 +85,14 @@ spec:
readOnly: true
{{- end }}
volumes:
- name: gardener-extension-admission-onmetal-cert
- name: gardener-extension-admission-ironcore-cert
secret:
secretName: gardener-extension-admission-onmetal-cert
secretName: gardener-extension-admission-ironcore-cert
defaultMode: 420
{{- if .Values.global.kubeconfig }}
- name: gardener-extension-admission-onmetal-kubeconfig
- name: gardener-extension-admission-ironcore-kubeconfig
secret:
secretName: gardener-extension-admission-onmetal-kubeconfig
secretName: gardener-extension-admission-ironcore-kubeconfig
defaultMode: 420
{{- end }}
{{- if .Values.global.serviceAccountTokenVolumeProjection.enabled }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: Secret
metadata:
name: gardener-extension-admission-onmetal-cert
name: gardener-extension-admission-ironcore-cert
namespace: {{ .Release.Namespace }}
labels:
app: gardener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v1
kind: Secret
metadata:
name: gardener-extension-admission-onmetal-kubeconfig
name: gardener-extension-admission-ironcore-kubeconfig
namespace: "{{ .Release.Namespace }}"
labels:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- define "name" -}}
gardener-extension-admission-onmetal
gardener-extension-admission-ironcore
{{- end -}}

{{- define "labels.app.key" -}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ global:
user:
name: ""
image:
repository: ghcr.io/onmetal/gardener-extension-admission-onmetal
repository: ghcr.io/ironcore-dev/gardener-extension-admission-ironcore
tag: latest
pullPolicy: IfNotPresent
replicaCount: 1
Expand Down
5 changes: 0 additions & 5 deletions charts/gardener-extension-admission-onmetal/Chart.yaml

This file was deleted.

5 changes: 5 additions & 0 deletions charts/gardener-extension-provider-ironcore/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v1
appVersion: "1.0"
description: A Helm chart for the Gardener ironcore Provider extension
name: gardener-extension-provider-ironcore
version: 0.1.0
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 OnMetal authors
// Copyright 2022 IronCore authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//go:generate sh -c "../../hack/generate-controller-registration.sh provider-onmetal . $(cat ../../VERSION) ../../example/controller-registration.yaml BackupBucket:onmetal BackupEntry:onmetal Bastion:onmetal ControlPlane:onmetal Infrastructure:onmetal Worker:onmetal"
//go:generate sh -c "../../hack/generate-controller-registration.sh provider-ironcore . $(cat ../../VERSION) ../../example/controller-registration.yaml BackupBucket:ironcore BackupEntry:ironcore Bastion:ironcore ControlPlane:ironcore Infrastructure:ironcore Worker:ironcore"

// Package chart enables go:generate support for generating the correct controller registration.
package chart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- define "name" -}}
gardener-extension-provider-onmetal
gardener-extension-provider-ironcore
{{- end -}}

{{- define "labels.app.key" -}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,40 +9,40 @@ data:
filter-kubernetes.conf: |
[FILTER]
Name parser
Match kubernetes.*cloud-controller-manager*onmetal-cloud-controller-manager*
Match kubernetes.*cloud-controller-manager*ironcore-cloud-controller-manager*
Key_Name log
Parser kubeapiserverParser
Reserve_Data True
[FILTER]
Name parser
Match kubernetes.*machine-controller-manager*onmetal-machine-controller-manager*
Match kubernetes.*machine-controller-manager*ironcore-machine-controller-manager*
Key_Name log
Parser kubeapiserverParser
Reserve_Data True
[FILTER]
Name parser
Match kubernetes.*machine-controller-manager*machine-controller-manager-provider-onmetal*
Match kubernetes.*machine-controller-manager*machine-controller-manager-provider-ironcore*
Key_Name log
Parser kubeapiserverParser
Reserve_Data True
[FILTER]
Name parser
Match kubernetes.*csi-driver-controller*onmetal-csi*
Match kubernetes.*csi-driver-controller*ironcore-csi*
Key_Name log
Parser kubeapiserverParser
Reserve_Data True
[FILTER]
Name modify
Match kubernetes.*
Condition Key_value_matches tag ^kubernetes\.var\.log\.containers\.(cloud-controller-manager-.+?_.+?_onmetal-cloud-controller-manager|csi-driver-controller-.+?_.+?_onmetal-csi)
Condition Key_value_matches tag ^kubernetes\.var\.log\.containers\.(cloud-controller-manager-.+?_.+?_ironcore-cloud-controller-manager|csi-driver-controller-.+?_.+?_ironcore-csi)
Add __gardener_multitenant_id__ operator;user
[FILTER]
Name modify
Match kubernetes.*
Condition Key_value_matches tag ^kubernetes\.var\.log\.containers\.machine-controller-manager-.+?_.+?_(onmetal-machine-controller-manager|machine-controller-manager-provider-onmetal)
Condition Key_value_matches tag ^kubernetes\.var\.log\.containers\.machine-controller-manager-.+?_.+?_(ironcore-machine-controller-manager|machine-controller-manager-provider-ironcore)
Add __gardener_multitenant_id__ operator;user
Loading

0 comments on commit dc83161

Please sign in to comment.