Skip to content

Commit

Permalink
Rename to ironcore-metal provider name (#119)
Browse files Browse the repository at this point in the history
* Rename provider to ironcore-metal

* Rename helm charts

* Rename more things

* Run make generate

* Rename important paths
  • Loading branch information
Nuckal777 authored Jan 24, 2025
1 parent fabfa6b commit 3e36f58
Show file tree
Hide file tree
Showing 103 changed files with 168 additions and 168 deletions.
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-metal
target: gardener-extension-provider-metal
- name: gardener-extension-admission-metal
target: gardener-extension-admission-metal
- name: gardener-extension-provider-ironcore-metal
target: gardener-extension-provider-ironcore-metal
- name: gardener-extension-admission-ironcore-metal
target: gardener-extension-admission-ironcore-metal
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
2 changes: 1 addition & 1 deletion .reuse/dep5
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: gardener-extension-provider-metal
Upstream-Contact: IronCore authors <[email protected]>
Source: https://github.com/ironcore-dev/gardener-extension-provider-metal
Source: https://github.com/ironcore-dev/gardener-extension-provider-ironcore-metal

# --------------------------------------------------
# source code
Expand Down
20 changes: 10 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,25 @@ 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-metal ./cmd/gardener-extension-provider-metal/main.go && \
CGO_ENABLED=0 GOOS=linux GOARCH=${GOARCH} go build -a -o gardener-extension-admission-metal ./cmd/gardener-extension-admission-metal/main.go
CGO_ENABLED=0 GOOS=linux GOARCH=${GOARCH} go build -a -o gardener-extension-provider-ironcore-metal ./cmd/gardener-extension-provider-metal/main.go && \
CGO_ENABLED=0 GOOS=linux GOARCH=${GOARCH} go build -a -o gardener-extension-admission-ironcore-metal ./cmd/gardener-extension-admission-metal/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-metal
LABEL source_repository="https://github.com/ironcore-dev/gardener-extension-provider-metal"
FROM gcr.io/distroless/static:nonroot AS gardener-extension-provider-ironcore-metal
LABEL source_repository="https://github.com/ironcore-dev/gardener-extension-provider-ironcore-metal"
WORKDIR /
COPY charts /charts
COPY --from=builder /workspace/gardener-extension-provider-metal /gardener-extension-provider-metal
COPY --from=builder /workspace/gardener-extension-provider-ironcore-metal /gardener-extension-provider-ironcore-metal
USER 65532:65532

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

FROM gcr.io/distroless/static:nonroot AS gardener-extension-admission-metal
LABEL source_repository="https://github.com/ironcore-dev/gardener-extension-provider-metal"
FROM gcr.io/distroless/static:nonroot AS gardener-extension-admission-ironcore-metal
LABEL source_repository="https://github.com/ironcore-dev/gardener-extension-provider-ironcore-metal"
WORKDIR /
COPY charts /charts
COPY --from=builder /workspace/gardener-extension-admission-metal /gardener-extension-admission-metal
COPY --from=builder /workspace/gardener-extension-admission-ironcore-metal /gardener-extension-admission-ironcore-metal
USER 65532:65532

ENTRYPOINT ["/gardener-extension-admission-metal"]
ENTRYPOINT ["/gardener-extension-admission-ironcore-metal"]
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
ENSURE_GARDENER_MOD := $(shell go get github.com/gardener/gardener@$$(go list -m -f "{{.Version}}" github.com/gardener/gardener))
GARDENER_HACK_DIR := $(shell go list -m -f "{{.Dir}}" github.com/gardener/gardener)/hack
EXTENSION_PREFIX := gardener-extension
NAME := provider-metal
NAME := provider-ironcore-metal
REGISTRY := ghcr.io
ADMISSION_NAME := admission-metal
ADMISSION_NAME := admission-ironcore-metal
IMAGE_PREFIX := $(REGISTRY)/extensions
REPO_ROOT := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
HACK_DIR := $(REPO_ROOT)/hack
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# [Gardener Extension for IronCore Metal API provider](https://gardener.cloud)

[![REUSE status](https://api.reuse.software/badge/github.com/ironcore-dev/gardener-extension-provider-metal)](https://api.reuse.software/info/github.com/ironcore-dev/gardener-extension-provider-metal)
[![Go Report Card](https://goreportcard.com/badge/github.com/ironcore-dev/gardener-extension-provider-metal)](https://goreportcard.com/report/github.com/ironcore-dev/gardener-extension-provider-metal)
[![REUSE status](https://api.reuse.software/badge/github.com/ironcore-dev/gardener-extension-provider-ironcore-metal)](https://api.reuse.software/info/github.com/ironcore-dev/gardener-extension-provider-ironcore-metal)
[![Go Report Card](https://goreportcard.com/badge/github.com/ironcore-dev/gardener-extension-provider-ironcore-metal)](https://goreportcard.com/report/github.com/ironcore-dev/gardener-extension-provider-ironcore-metal)
[![GitHub License](https://img.shields.io/static/v1?label=License&message=Apache-2.0&color=blue)](LICENSE)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://makeapullrequest.com)

Expand Down Expand Up @@ -40,7 +40,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/ironcore-dev/gardener-extension-provider-metal/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-metal/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
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v1
appVersion: "1.0"
description: A Helm chart for the IronCore gardener-extension-admission-metal
name: gardener-extension-admission-metal
description: A Helm chart for the IronCore gardener-extension-admission-ironcore-metal
name: gardener-extension-admission-ironcore-metal
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-metal application related resources
description: A Helm chart to deploy the gardener-extension-admission-ironcore-metal application related resources
name: application
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-metal runtime related resources
description: A Helm chart to deploy the gardener-extension-admission-ironcore-metal runtime related resources
name: runtime
version: 0.1.0
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
metadata:
annotations:
{{- if .Values.global.kubeconfig }}
checksum/gardener-extension-admission-metal-kubeconfig: {{ include (print $.Template.BasePath "/secret-kubeconfig.yaml") . | sha256sum }}
checksum/gardener-extension-admission-ironcore-metal-kubeconfig: {{ include (print $.Template.BasePath "/secret-kubeconfig.yaml") . | sha256sum }}
{{- end }}
labels:
networking.gardener.cloud/to-dns: allowed
Expand All @@ -32,7 +32,7 @@ spec:
image: {{ include "image" .Values.global.image }}
imagePullPolicy: {{ .Values.global.image.pullPolicy }}
command:
- /gardener-extension-admission-metal
- /gardener-extension-admission-ironcore-metal
- --webhook-config-server-port={{ .Values.global.webhookConfig.serverPort }}
{{- if .Values.global.virtualGarden.enabled }}
- --webhook-config-mode=url
Expand All @@ -42,7 +42,7 @@ spec:
{{- end }}
- --webhook-config-namespace={{ .Release.Namespace }}
{{- if .Values.global.kubeconfig }}
- --kubeconfig=/etc/gardener-extension-admission-metal/kubeconfig/kubeconfig
- --kubeconfig=/etc/gardener-extension-admission-ironcore-metal/kubeconfig/kubeconfig
{{- end }}
{{- if .Values.global.projectedKubeconfig }}
- --kubeconfig={{ required ".Values.global.projectedKubeconfig.baseMountPath is required" .Values.global.projectedKubeconfig.baseMountPath }}/kubeconfig
Expand Down Expand Up @@ -79,8 +79,8 @@ spec:
{{- end }}
volumeMounts:
{{- if .Values.global.kubeconfig }}
- name: gardener-extension-admission-metal-kubeconfig
mountPath: /etc/gardener-extension-admission-metal/kubeconfig
- name: gardener-extension-admission-ironcore-metal-kubeconfig
mountPath: /etc/gardener-extension-admission-ironcore-metal/kubeconfig
readOnly: true
{{- end }}
{{- if .Values.global.serviceAccountTokenVolumeProjection.enabled }}
Expand All @@ -89,14 +89,14 @@ spec:
readOnly: true
{{- end }}
volumes:
- name: gardener-extension-admission-metal-cert
- name: gardener-extension-admission-ironcore-metal-cert
secret:
secretName: gardener-extension-admission-metal-cert
secretName: gardener-extension-admission-ironcore-metal-cert
defaultMode: 420
{{- if .Values.global.kubeconfig }}
- name: gardener-extension-admission-metal-kubeconfig
- name: gardener-extension-admission-ironcore-metal-kubeconfig
secret:
secretName: gardener-extension-admission-metal-kubeconfig
secretName: gardener-extension-admission-ironcore-metal-kubeconfig
defaultMode: 420
{{- end }}
{{- if .Values.global.serviceAccountTokenVolumeProjection.enabled }}
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-metal-kubeconfig
name: gardener-extension-admission-ironcore-metal-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-metal
gardener-extension-admission-ironcore-metal
{{- end -}}

{{- define "labels.app.key" -}}
Expand All @@ -23,5 +23,5 @@ app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{- define "leaderelectionid" -}}
gardener-extension-admission-metal
gardener-extension-admission-ironcore-metal
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ global:
user:
name: ""
image:
repository: ghcr.io/ironcore-dev/gardener-extension-admission-metal
repository: ghcr.io/ironcore-dev/gardener-extension-admission-ironcore-metal
tag: latest
pullPolicy: IfNotPresent
replicaCount: 1
Expand Down
5 changes: 5 additions & 0 deletions charts/gardener-extension-provider-ironcore-metal/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-metal Provider extension
name: gardener-extension-provider-ironcore-metal
version: 0.1.0
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and IronCore contributors
// SPDX-License-Identifier: Apache-2.0

//go:generate sh -c "bash $GARDENER_HACK_DIR/generate-controller-registration.sh provider-metal . $(cat ../../VERSION) ../../example/controller-registration.yaml ControlPlane:metal Infrastructure:metal Worker:metal"
//go:generate sh -c "bash $GARDENER_HACK_DIR/generate-controller-registration.sh provider-ironcore-metal . $(cat ../../VERSION) ../../example/controller-registration.yaml ControlPlane:ironcore-metal Infrastructure:ironcore-metal Worker:ironcore-metal"

// 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-metal
gardener-extension-provider-ironcore-metal
{{- end -}}

{{- define "labels.app.key" -}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ data:
[FILTER]
Name parser
Match kubernetes.*machine-controller-manager*machine-controller-manager-provider-metal*
Match kubernetes.*machine-controller-manager*machine-controller-manager-provider-ironcore-metal*
Key_Name log
Parser kubeapiserverParser
Reserve_Data True
Expand All @@ -44,5 +44,5 @@ data:
[FILTER]
Name modify
Match kubernetes.*
Condition Key_value_matches tag ^kubernetes\.var\.log\.containers\.machine-controller-manager-.+?_.+?_(metal-machine-controller-manager|machine-controller-manager-provider-metal)
Condition Key_value_matches tag ^kubernetes\.var\.log\.containers\.machine-controller-manager-.+?_.+?_(metal-machine-controller-manager|machine-controller-manager-provider-ironcore-metal)
Add __gardener_multitenant_id__ operator;user
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ spec:
image: {{ include "image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
- /gardener-extension-provider-metal
- /gardener-extension-provider-ironcore-metal
- --config-file=/etc/{{ include "name" . }}/config/config.yaml
- --controlplane-max-concurrent-reconciles={{ .Values.controllers.controlplane.concurrentSyncs }}
- --healthcheck-max-concurrent-reconciles={{ .Values.controllers.healthcheck.concurrentSyncs }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ rules:
resources:
- leases
resourceNames:
- provider-metal-leader-election
- provider-ironcore-metal-leader-election
- gardener-extension-heartbeat
verbs:
- get
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
image:
repository: ghcr.io/ironcore-dev/gardener-extension-provider-metal
repository: ghcr.io/ironcore-dev/gardener-extension-provider-ironcore-metal
tag: latest
pullPolicy: IfNotPresent

Expand Down
5 changes: 0 additions & 5 deletions charts/gardener-extension-provider-metal/Chart.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ spec:
serviceAccountName: machine-controller-manager
terminationGracePeriodSeconds: 5
containers:
- name: machine-controller-manager-provider-metal
image: {{ index .Values.images "machine-controller-manager-provider-metal" }}
- name: machine-controller-manager-provider-ironcore-metal
image: {{ index .Values.images "machine-controller-manager-provider-ironcore-metal" }}
imagePullPolicy: IfNotPresent
command:
- ./machine-controller
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
updateMode: {{ .Values.vpa.updatePolicy.updateMode | quote }}
resourcePolicy:
containerPolicies:
- containerName: machine-controller-manager-provider-metal
- containerName: machine-controller-manager-provider-ironcore-metal
minAllowed:
cpu: {{ .Values.resources.mcmProviderMetal.requests.cpu }}
memory: {{ .Values.resources.mcmProviderMetal.requests.memory }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
images:
machine-controller-manager: image-repository:image-tag
machine-controller-manager-provider-metal: image-repository:image-tag
machine-controller-manager-provider-ironcore-metal: image-repository:image-tag

replicas: 1

Expand Down
12 changes: 6 additions & 6 deletions cmd/gardener-extension-admission-metal/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ import (
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/manager"

admissioncmd "github.com/ironcore-dev/gardener-extension-provider-metal/pkg/admission/cmd"
metalinstall "github.com/ironcore-dev/gardener-extension-provider-metal/pkg/apis/metal/install"
providermetal "github.com/ironcore-dev/gardener-extension-provider-metal/pkg/metal"
admissioncmd "github.com/ironcore-dev/gardener-extension-provider-ironcore-metal/pkg/admission/cmd"
metalinstall "github.com/ironcore-dev/gardener-extension-provider-ironcore-metal/pkg/apis/metal/install"
providermetal "github.com/ironcore-dev/gardener-extension-provider-ironcore-metal/pkg/metal"
)

// AdmissionName is the name of the admission component.
const AdmissionName = "admission-metal"
const AdmissionName = "admission-ironcore-metal"

var log = logf.Log.WithName("gardener-extension-admission-metal")
var log = logf.Log.WithName("gardener-extension-admission-ironcore-metal")

// NewAdmissionCommand creates a new command for running an ironcore gardener-extension-admission-metal webhook.
// NewAdmissionCommand creates a new command for running an ironcore gardener-extension-admission-ironcore-metal webhook.
func NewAdmissionCommand(ctx context.Context) *cobra.Command {
var (
restOpts = &controllercmd.RESTOptions{}
Expand Down
2 changes: 1 addition & 1 deletion cmd/gardener-extension-admission-metal/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
runtimelog "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/manager/signals"

"github.com/ironcore-dev/gardener-extension-provider-metal/cmd/gardener-extension-admission-metal/app"
"github.com/ironcore-dev/gardener-extension-provider-ironcore-metal/cmd/gardener-extension-admission-metal/app"
)

func main() {
Expand Down
14 changes: 7 additions & 7 deletions cmd/gardener-extension-provider-metal/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ import (
"sigs.k8s.io/controller-runtime/pkg/healthz"
"sigs.k8s.io/controller-runtime/pkg/manager"

metalinstall "github.com/ironcore-dev/gardener-extension-provider-metal/pkg/apis/metal/install"
metalcmd "github.com/ironcore-dev/gardener-extension-provider-metal/pkg/cmd"
metalcontrolplane "github.com/ironcore-dev/gardener-extension-provider-metal/pkg/controller/controlplane"
"github.com/ironcore-dev/gardener-extension-provider-metal/pkg/controller/healthcheck"
infrastructurecontroller "github.com/ironcore-dev/gardener-extension-provider-metal/pkg/controller/infrastructure"
workercontroller "github.com/ironcore-dev/gardener-extension-provider-metal/pkg/controller/worker"
"github.com/ironcore-dev/gardener-extension-provider-metal/pkg/metal"
metalinstall "github.com/ironcore-dev/gardener-extension-provider-ironcore-metal/pkg/apis/metal/install"
metalcmd "github.com/ironcore-dev/gardener-extension-provider-ironcore-metal/pkg/cmd"
metalcontrolplane "github.com/ironcore-dev/gardener-extension-provider-ironcore-metal/pkg/controller/controlplane"
"github.com/ironcore-dev/gardener-extension-provider-ironcore-metal/pkg/controller/healthcheck"
infrastructurecontroller "github.com/ironcore-dev/gardener-extension-provider-ironcore-metal/pkg/controller/infrastructure"
workercontroller "github.com/ironcore-dev/gardener-extension-provider-ironcore-metal/pkg/controller/worker"
"github.com/ironcore-dev/gardener-extension-provider-ironcore-metal/pkg/metal"
)

// NewControllerManagerCommand creates a new command for running a metal provider controller.
Expand Down
2 changes: 1 addition & 1 deletion cmd/gardener-extension-provider-metal/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
runtimelog "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/manager/signals"

"github.com/ironcore-dev/gardener-extension-provider-metal/cmd/gardener-extension-provider-metal/app"
"github.com/ironcore-dev/gardener-extension-provider-ironcore-metal/cmd/gardener-extension-provider-metal/app"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions docs/operations/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
contains some configuration specifics regarding the installation of different components via the helm charts residing
in the metal provider extension [repository](https://github.com/gardener/gardener-extension-provider-metal).

## gardener-extension-admission-metal
## gardener-extension-admission-ironcore-metal

### Authentication against the Garden cluster

Expand All @@ -13,7 +13,7 @@ There are several authentication possibilities depending on whether [the concept
#### *Virtual Garden* is not used, i.e., the `runtime` Garden cluster is also the `target` Garden cluster.

**Automounted Service Account Token**
The easiest way to deploy the `gardener-extension-admission-metal` component will be to not provide `kubeconfig` at
The easiest way to deploy the `gardener-extension-admission-ironcore-metal` component will be to not provide `kubeconfig` at
all. This way in-cluster configuration and an automounted service account token will be used. The drawback of this
approach is that the automounted token will not be automatically rotated.

Expand Down
Loading

0 comments on commit 3e36f58

Please sign in to comment.