Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vendor [email protected] and Upgrade go,k8s.io/* dependencies and controller-runtime #213

Merged
merged 21 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .ci/set_dependency_version
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env bash

set -e

$(dirname $0)"/../vendor/github.com/gardener/gardener/hack/.ci/set_dependency_version
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
!docs/
!example/
!hack/
!imagevector/
!pkg/
!test/
!tools/
Expand Down
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ RUN make install EFFECTIVE_VERSION=$EFFECTIVE_VERSION
FROM gcr.io/distroless/static-debian11:nonroot AS gardener-extension-networking-cilium
WORKDIR /

COPY charts /charts
COPY --from=builder /go/bin/gardener-extension-networking-cilium /gardener-extension-networking-cilium
ENTRYPOINT ["/gardener-extension-networking-cilium"]

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ check: $(GOIMPORTS) $(GOLANGCI_LINT) $(HELM)

.PHONY: generate
generate: $(CONTROLLER_GEN) $(GEN_CRD_API_REFERENCE_DOCS) $(HELM) $(MOCKGEN) $(YQ)
@$(REPO_ROOT)/vendor/github.com/gardener/gardener/hack/generate.sh ./charts/... ./cmd/... ./pkg/...
@$(REPO_ROOT)/vendor/github.com/gardener/gardener/hack/generate-sequential.sh ./charts/... ./cmd/... ./pkg/...
$(MAKE) format

.PHONY: format
Expand Down
17 changes: 12 additions & 5 deletions charts/images.go → charts/charts.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file
// Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -14,8 +14,15 @@

package charts

import _ "embed"
import (
"embed"
_ "embed"
)

// ImagesYAML contains the contents of the images.yaml file.
//go:embed images.yaml
var ImagesYAML string
// InternalChart embeds the internal charts in embed.FS
//
//go:embed internal
var InternalChart embed.FS

// InternalChartsPath is the path to the internal charts
const InternalChartsPath = "internal"
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,3 @@ app.kubernetes.io/instance: {{ .Release.Name }}
{{- printf "%s:%s" .repository .tag }}
{{- end }}
{{- end }}

{{- define "deploymentversion" -}}
apps/v1
{{- end -}}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,3 @@ app.kubernetes.io/instance: {{ .Release.Name }}
{{- printf "%s:%s" .repository .tag }}
{{- end }}
{{- end }}

{{- define "deploymentversion" -}}
apps/v1
{{- end -}}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: {{ include "poddisruptionbudgetversion" . }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ include "name" . }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,3 @@ app.kubernetes.io/instance: {{ .Release.Name }}
{{- printf "%s:%s" .repository .tag }}
{{- end }}
{{- end }}

{{- define "deploymentversion" -}}
apps/v1
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,3 @@ app.kubernetes.io/instance: {{ .Release.Name }}
{{- printf "%s:%s" .Values.image.repository .Values.image.tag }}
{{- end }}
{{- end }}

{{- define "deploymentversion" -}}
apps/v1
{{- end -}}

{{- define "poddisruptionbudgetversion" -}}
policy/v1
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
- /gardener-extension-networking-cilium
- --leader-election-resource-lock={{ .Values.leaderElection.resourceLock }}
- --max-concurrent-reconciles={{ .Values.controller.concurrentSyncs }}
- --healthcheck-max-concurrent-reconciles={{ .Values.controller.healthcheck.concurrentSyncs }}
- --heartbeat-namespace={{ .Release.Namespace }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: {{ include "poddisruptionbudgetversion" . }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: gardener-extension-networking-cilium
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if .Values.vpa.enabled }}
apiVersion: "autoscaling.k8s.io/v1beta2"
apiVersion: "autoscaling.k8s.io/v1"
kind: VerticalPodAutoscaler
metadata:
name: gardener-extension-networking-cilium-vpa
Expand Down
3 changes: 0 additions & 3 deletions charts/gardener-extension-networking-cilium/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ controller:
renewIntervalSeconds: 30
ignoreOperationAnnotation: false

leaderElection:
resourceLock: leases

config:
clientConnection:
acceptContentTypes: application/json
Expand Down
1 change: 0 additions & 1 deletion charts/internal/cilium-monitoring/charts/util-templates

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: {{ include "rbacversion" . }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: cilium
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: {{ include "rbacversion" . }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: cilium
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: {{ include "daemonsetversion" . }}
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: cilium
Expand All @@ -16,7 +16,7 @@ spec:
template:
metadata:
annotations:
checksum/configmap-cilium: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
checksum/configmap-cilium: "{{ .Values.global.configMapHash }}"
{{- if and .Values.global.prometheus.enabled (not .Values.global.prometheus.serviceMonitor.enabled) }}
prometheus.io/port: "{{ .Values.global.prometheus.port }}"
prometheus.io/scrape: "true"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: {{ include "rbacversion" . }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: hubble-relay
Expand All @@ -20,7 +20,7 @@ rules:
- list
- watch
---
apiVersion: {{ include "rbacversion" . }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: hubble-generate-certs
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: {{ include "rbacversion" . }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: hubble-relay
Expand All @@ -14,7 +14,7 @@ subjects:
name: hubble-relay
namespace: {{ .Release.Namespace }}
---
apiVersion: {{ include "rbacversion" . }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: hubble-generate-certs
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: {{ include "deploymentversion" .}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Chart.Name }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: {{ include "rbacversion" . }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: hubble-ui
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: {{ include "rbacversion" . }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: hubble-ui
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: {{ include "deploymentversion" .}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Chart.Name }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- if .Values.ingress.enabled -}}
{{- $ingressPath := .Values.ingress.path -}}
apiVersion: {{ include "ingressversion" . }}
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: hubble-ui
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: {{ include "rbacversion" . }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: cilium-operator
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: {{ include "rbacversion" . }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: cilium-operator
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: {{ include "deploymentversion" . }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: cilium-operator
Expand Down Expand Up @@ -27,7 +27,7 @@ spec:
template:
metadata:
annotations:
checksum/configmap-cilium: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
checksum/configmap-cilium: "{{ .Values.global.configMapHash }}"
{{- if and .Values.global.prometheus.enabled (not .Values.global.prometheus.serviceMonitor.enabled) }}
prometheus.io/port: {{ .Values.global.operatorPrometheus.port | quote }}
prometheus.io/scrape: "true"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: {{ include "poddisruptionbudgetversion" . }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: cilium-operator
Expand Down
1 change: 0 additions & 1 deletion charts/internal/cilium/charts/utils-templates

This file was deleted.

2 changes: 0 additions & 2 deletions charts/internal/cilium/requirements.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
dependencies:
- name: agent
condition: requirements.agent.enabled
- name: config
condition: requirements.config.enabled
- name: operator
condition: requirements.operator.enabled
- name: hubble-ui
Expand Down
6 changes: 2 additions & 4 deletions charts/internal/cilium/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ requirements:
agent:
enabled: true

# Include the cilium-config ConfigMap
config:
enabled: true

# Include the cilium-operator Deployment
operator:
enabled: true
Expand All @@ -17,6 +13,8 @@ requirements:

# global groups all configuration options that have effect on all sub-charts
global:
configMapHash: ""

egressGateway:
enabled: false

Expand Down
4 changes: 0 additions & 4 deletions charts/utils-templates/Chart.yaml

This file was deleted.

25 changes: 0 additions & 25 deletions charts/utils-templates/README.md

This file was deleted.

Loading