Skip to content

Commit 009c6ef

Browse files
authored
Merge pull request crossplane#7001 from ezgidemirel/remove-ess-helm-value
chore: Remove ESS leftovers
2 parents 696fa9f + 679495b commit 009c6ef

9 files changed

Lines changed: 7 additions & 201 deletions

File tree

cluster/charts/crossplane/templates/_helpers.tpl

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,3 @@ app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
3030
{{ toYaml .Values.customLabels }}
3131
{{- end }}
3232
{{- end }}
33-
34-
{{/*
35-
Define ExternalSecretStoreEnabled Feature Flag
36-
*/}}
37-
{{- define "crossplane.externalSecretStoresEnabled" -}}
38-
{{- if has "--enable-external-secret-stores" .Values.args -}}
39-
true
40-
{{- else -}}
41-
false
42-
{{- end -}}
43-
{{- end -}}

cluster/charts/crossplane/templates/deployment.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{{- $externalSecretStoresEnabled := include "crossplane.externalSecretStoresEnabled" . | eq "true" -}}
21
apiVersion: apps/v1
32
kind: Deployment
43
metadata:
@@ -123,10 +122,6 @@ spec:
123122
- name: "ENABLE_WEBHOOKS"
124123
value: "false"
125124
{{- end }}
126-
{{- if $externalSecretStoresEnabled }}
127-
- name: "ESS_TLS_SERVER_SECRET_NAME"
128-
value: ess-server-certs
129-
{{- end }}
130125
- name: "TLS_CA_SECRET_NAME"
131126
value: crossplane-root-ca
132127
- name: "TLS_SERVER_SECRET_NAME"

cluster/charts/crossplane/templates/secret.yaml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
{{- $externalSecretStoresEnabled := include "crossplane.externalSecretStoresEnabled" . | eq "true" -}}
2-
{{- if $externalSecretStoresEnabled }}
3-
---
4-
# The reason this is created empty and filled by the init container is we want
5-
# to manage the lifecycle of the secret via Helm. This way whenever Crossplane
6-
# is deleted, the secret is deleted as well.
7-
apiVersion: v1
8-
kind: Secret
9-
metadata:
10-
name: ess-server-certs
11-
namespace: {{ .Release.Namespace }}
12-
{{- with .Values.secrets.customAnnotations }}
13-
annotations: {{ toYaml . | nindent 4 }}
14-
{{- end }}
15-
type: Opaque
16-
{{- end }}
171
---
182
# The reason this is created empty and filled by the init container is we want
193
# to manage the lifecycle of the secret via Helm. This way whenever Crossplane

cmd/crossplane/core/init.go

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,12 @@ type initCommand struct {
4747

4848
EnableWebhooks bool `aliases:"webhook-enabled" default:"true" env:"ENABLE_WEBHOOKS,WEBHOOK_ENABLED" help:"Enable webhook configuration."`
4949

50-
WebhookServiceName string `env:"WEBHOOK_SERVICE_NAME" help:"The name of the Service object that the webhook service will be run."`
51-
WebhookServiceNamespace string `env:"WEBHOOK_SERVICE_NAMESPACE" help:"The namespace of the Service object that the webhook service will be run."`
52-
WebhookServicePort int32 `env:"WEBHOOK_SERVICE_PORT" help:"The port of the Service that the webhook service will be run."`
53-
ESSTLSServerSecretName string `env:"ESS_TLS_SERVER_SECRET_NAME" help:"The name of the Secret that the initializer will fill with ESS TLS server certificate."`
54-
TLSCASecretName string `env:"TLS_CA_SECRET_NAME" help:"The name of the Secret that the initializer will fill with TLS CA certificate."`
55-
TLSServerSecretName string `env:"TLS_SERVER_SECRET_NAME" help:"The name of the Secret that the initializer will fill with TLS server certificates."`
56-
TLSClientSecretName string `env:"TLS_CLIENT_SECRET_NAME" help:"The name of the Secret that the initializer will fill with TLS client certificates."`
50+
WebhookServiceName string `env:"WEBHOOK_SERVICE_NAME" help:"The name of the Service object that the webhook service will be run."`
51+
WebhookServiceNamespace string `env:"WEBHOOK_SERVICE_NAMESPACE" help:"The namespace of the Service object that the webhook service will be run."`
52+
WebhookServicePort int32 `env:"WEBHOOK_SERVICE_PORT" help:"The port of the Service that the webhook service will be run."`
53+
TLSCASecretName string `env:"TLS_CA_SECRET_NAME" help:"The name of the Secret that the initializer will fill with TLS CA certificate."`
54+
TLSServerSecretName string `env:"TLS_SERVER_SECRET_NAME" help:"The name of the Secret that the initializer will fill with TLS server certificates."`
55+
TLSClientSecretName string `env:"TLS_CLIENT_SECRET_NAME" help:"The name of the Secret that the initializer will fill with TLS client certificates."`
5756
}
5857

5958
// Run starts the initialization process.
@@ -117,16 +116,7 @@ func (c *initCommand) Run(s *runtime.Scheme, log logging.Logger) error {
117116
initializer.NewCoreCRDsMigrator("usages.apiextensions.crossplane.io", "v1beta1"),
118117
initializer.NewCoreCRDsMigrator("functions.pkg.crossplane.io", "v1beta1"),
119118
initializer.NewCoreCRDsMigrator("functionrevisions.pkg.crossplane.io", "v1beta1"),
120-
)
121-
122-
if c.ESSTLSServerSecretName != "" {
123-
steps = append(steps, initializer.NewTLSCertificateGenerator(c.Namespace, c.TLSCASecretName,
124-
initializer.TLSCertificateGeneratorWithServerSecretName(c.ESSTLSServerSecretName, []string{fmt.Sprintf("*.%s", c.Namespace)}),
125-
initializer.TLSCertificateGeneratorWithLogger(log.WithValues("Step", "ESSCertificateGenerator")),
126-
))
127-
}
128-
129-
steps = append(steps, initializer.NewLockObject(),
119+
initializer.NewLockObject(),
130120
initializer.NewPackageInstaller(c.Providers, c.Configurations, c.Functions),
131121
initializer.StepFunc(initializer.DefaultDeploymentRuntimeConfig),
132122
initializer.DefaultManagedResourceActivationPolicy(c.Activations...),

contributing/guide-adding-external-secret-stores.md

Lines changed: 0 additions & 132 deletions
This file was deleted.

internal/controller/pkg/runtime/runtime.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ const (
5555
// ServiceEndpointFmt is the format string for service endpoints.
5656
ServiceEndpointFmt = "dns:///%s.%s:%d"
5757

58-
// ESSTLSCertDirEnvVar is the environment variable for ESS TLS certificate directory.
59-
ESSTLSCertDirEnvVar = "ESS_TLS_CERTS_DIR"
60-
6158
// TLSServerCertDirEnvVar is the environment variable for TLS server certificate directory.
6259
TLSServerCertDirEnvVar = "TLS_SERVER_CERTS_DIR"
6360
// TLSServerCertsVolumeName is the name of the TLS server certificates volume.

internal/controller/pkg/runtime/runtime_provider.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -235,18 +235,6 @@ func providerDeploymentOverrides(pr v1.PackageRevisionWithRuntime, image string)
235235

236236
do = append(do, DeploymentRuntimeWithOptionalImage(image))
237237

238-
if pr.GetObservedTLSClientSecretName() != nil {
239-
do = append(do, DeploymentRuntimeWithAdditionalEnvironments([]corev1.EnvVar{
240-
// for backward compatibility with existing providers, we set the
241-
// environment variable ESS_TLS_CERTS_DIR to the same value as
242-
// TLS_CLIENT_CERTS_DIR to ease the transition to the new certificates.
243-
{
244-
Name: ESSTLSCertDirEnvVar,
245-
Value: fmt.Sprintf("$(%s)", TLSClientCertDirEnvVar),
246-
},
247-
}))
248-
}
249-
250238
if pr.GetObservedTLSServerSecretName() != nil {
251239
do = append(do, DeploymentRuntimeWithAdditionalPorts([]corev1.ContainerPort{
252240
{

internal/controller/pkg/runtime/runtime_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -530,10 +530,6 @@ func deploymentProvider(provider string, rev string, image string, overrides ...
530530
Name: "REVISION_UID",
531531
Value: providerRevisionUID,
532532
},
533-
{
534-
Name: "ESS_TLS_CERTS_DIR",
535-
Value: "$(TLS_CLIENT_CERTS_DIR)",
536-
},
537533
{
538534
Name: "WEBHOOK_TLS_CERT_DIR",
539535
Value: "$(TLS_SERVER_CERTS_DIR)",

internal/xpkg/validate.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,3 @@ func NewFunctionValidator() Validator {
4747
parser.ObjectLinterFns(IsFunction, PackageValidSemver),
4848
parser.ObjectLinterFns())
4949
}
50-

0 commit comments

Comments
 (0)