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

[installer]: add secret template to certs #11524

Merged
merged 2 commits into from
Jul 21, 2022
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions install/installer/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ require (
github.com/gitpod-io/gitpod/ws-proxy v0.0.0-00010101000000-000000000000
github.com/go-playground/validator/v10 v10.9.0
github.com/google/go-cmp v0.5.8
github.com/jetstack/cert-manager v1.4.4
github.com/jetstack/cert-manager v1.5.0
github.com/mikefarah/yq/v4 v4.25.3
github.com/replicatedhq/kots v1.67.0
github.com/sirupsen/logrus v1.8.1
Expand All @@ -45,8 +45,8 @@ require (
cloud.google.com/go/storage v1.22.0 // indirect
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
github.com/Azure/go-autorest/autorest v0.11.18 // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.13 // indirect
github.com/Azure/go-autorest/autorest v0.11.19 // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.14 // indirect
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
github.com/Azure/go-autorest/logger v0.2.1 // indirect
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
Expand Down
125 changes: 125 additions & 0 deletions install/installer/go.sum

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions install/installer/pkg/components/cluster/certmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ func certmanager(ctx *common.RenderContext) ([]runtime.Object, error) {
Kind: "Issuer",
Group: "cert-manager.io",
},
SecretTemplate: &v1.CertificateSecretTemplate{
Labels: common.DefaultLabels(Component),
},
},
},
// Set the CA to our issuer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package dockerregistry

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"
Expand Down Expand Up @@ -37,6 +38,9 @@ func certificate(ctx *common.RenderContext) ([]runtime.Object, error) {
DNSNames: []string{
fmt.Sprintf("registry.%s.svc.cluster.local", ctx.Namespace),
},
SecretTemplate: &certmanagerv1.CertificateSecretTemplate{
Labels: common.DefaultLabels(Component),
},
},
}}, nil
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ func certificate(ctx *common.RenderContext) ([]runtime.Object, error) {
DNSNames: []string{
fmt.Sprintf("reg.%s", ctx.Config.Domain),
},
SecretTemplate: &certmanagerv1.CertificateSecretTemplate{
Labels: common.DefaultLabels(Component),
},
},
}}, nil
}
3 changes: 3 additions & 0 deletions install/installer/pkg/components/ws-daemon/tlssecret.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ func tlssecret(ctx *common.RenderContext) ([]runtime.Object, error) {
Kind: "Issuer",
Group: "cert-manager.io",
},
SecretTemplate: &certmanagerv1.CertificateSecretTemplate{
Labels: common.DefaultLabels(Component),
},
},
},
}, nil
Expand Down
6 changes: 6 additions & 0 deletions install/installer/pkg/components/ws-manager/tlssecret.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ func tlssecret(ctx *common.RenderContext) ([]runtime.Object, error) {
Kind: "Issuer",
Group: "cert-manager.io",
},
SecretTemplate: &certmanagerv1.CertificateSecretTemplate{
Labels: common.DefaultLabels(Component),
},
},
},
&certmanagerv1.Certificate{
Expand All @@ -67,6 +70,9 @@ func tlssecret(ctx *common.RenderContext) ([]runtime.Object, error) {
Kind: "Issuer",
Group: "cert-manager.io",
},
SecretTemplate: &certmanagerv1.CertificateSecretTemplate{
Labels: common.DefaultLabels(Component),
},
},
},
}, nil
Expand Down
4 changes: 4 additions & 0 deletions install/kots/manifests/gitpod-certificate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ spec:
- '{{repl ConfigOption "domain" }}'
- '*.{{repl ConfigOption "domain" }}'
- '*.ws.{{repl ConfigOption "domain" }}'
secretTemplate:
labels:
app: gitpod
component: gitpod-installer