Manuel Alejandro de Brito Fontes 5b30eb5b8c
Remove unused caCertSecret (#16793)
* Add trust.cert-manager.io for to bundle CA certificates

Signed-off-by: Manuel de Brito Fontes <aledbf@gmail.com>

* Configure CA volume and volumemount in components

* Update ws-manager golden files

* Deploy trust manager in preview

* Remove duplicated volume

* Update installer golden files

* Generate a bundle only for registry-facade

* Update golden files

* Fix initcontainer volume mounts

* Update golden files

* Fix registry-facade certificate

* Update golden files

* Disable skip_verify

* Enable force conflict with apply server side

Signed-off-by: Manuel de Brito Fontes <aledbf@gmail.com>

* Avoid random werft namespace errors

Signed-off-by: Manuel de Brito Fontes <aledbf@gmail.com>

---------

Signed-off-by: Manuel de Brito Fontes <aledbf@gmail.com>
2023-03-21 11:44:13 +01:00

47 lines
1.4 KiB
Go

// Copyright (c) 2021 Gitpod GmbH. All rights reserved.
// Licensed under the GNU Affero General Public License (AGPL).
// See License.AGPL.txt in the project root for license information.
package wsdaemon
import (
"fmt"
"github.com/gitpod-io/gitpod/installer/pkg/common"
certmanagerv1 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1"
cmmeta "github.com/jetstack/cert-manager/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
)
func tlssecret(ctx *common.RenderContext) ([]runtime.Object, error) {
return []runtime.Object{
&certmanagerv1.Certificate{
TypeMeta: common.TypeMetaCertificate,
ObjectMeta: metav1.ObjectMeta{
Name: TLSSecretName,
Namespace: ctx.Namespace,
Labels: common.DefaultLabels(Component),
},
Spec: certmanagerv1.CertificateSpec{
Duration: common.InternalCertDuration,
SecretName: TLSSecretName,
DNSNames: []string{
fmt.Sprintf("gitpod.%s", ctx.Namespace),
fmt.Sprintf("%s.%s.svc", Component, ctx.Namespace),
Component,
"wsdaemon", // Seems this is hardcoded in WSManager
},
IssuerRef: cmmeta.ObjectReference{
Name: common.CertManagerCAIssuer,
Kind: certmanagerv1.ClusterIssuerKind,
Group: "cert-manager.io",
},
SecretTemplate: &certmanagerv1.CertificateSecretTemplate{
Labels: common.DefaultLabels(Component),
},
},
},
}, nil
}