Skip to content

Commit 7aab955

Browse files
author
Simon Emms
committed
[installer]: set secretTemplate for certs
This allows them to be picked up by the KOTS support bundle
1 parent e3232a1 commit 7aab955

File tree

7 files changed

+25
-0
lines changed

7 files changed

+25
-0
lines changed

install/installer/go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,12 @@ github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSW
8484
github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw=
8585
github.com/Azure/go-autorest/autorest v0.11.18 h1:90Y4srNYrwOtAgVo3ndrQkTYn6kf1Eg/AjTFJ8Is2aM=
8686
github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA=
87+
github.com/Azure/go-autorest/autorest v0.11.19 h1:7/IqD2fEYVha1EPeaiytVKhzmPV223pfkRIQUGOK2IE=
8788
github.com/Azure/go-autorest/autorest v0.11.19/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA=
8889
github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A=
8990
github.com/Azure/go-autorest/autorest/adal v0.9.13 h1:Mp5hbtOePIzM8pJVRa3YLrWWmZtoxRXqUEzCfJt3+/Q=
9091
github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M=
92+
github.com/Azure/go-autorest/autorest/adal v0.9.14 h1:G8hexQdV5D4khOXrWG2YuLCFKhWYmWD8bHYaXN5ophk=
9193
github.com/Azure/go-autorest/autorest/adal v0.9.14/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M=
9294
github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw=
9395
github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74=

install/installer/pkg/components/cluster/certmanager.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ func certmanager(ctx *common.RenderContext) ([]runtime.Object, error) {
5353
Kind: "Issuer",
5454
Group: "cert-manager.io",
5555
},
56+
SecretTemplate: &v1.CertificateSecretTemplate{
57+
Labels: common.DefaultLabels(Component),
58+
},
5659
},
5760
},
5861
// Set the CA to our issuer

install/installer/pkg/components/docker-registry/certificate.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package dockerregistry
66

77
import (
88
"fmt"
9+
910
"github.com/gitpod-io/gitpod/installer/pkg/common"
1011
certmanagerv1 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1"
1112
cmmeta "github.com/jetstack/cert-manager/pkg/apis/meta/v1"
@@ -37,6 +38,9 @@ func certificate(ctx *common.RenderContext) ([]runtime.Object, error) {
3738
DNSNames: []string{
3839
fmt.Sprintf("registry.%s.svc.cluster.local", ctx.Namespace),
3940
},
41+
SecretTemplate: &certmanagerv1.CertificateSecretTemplate{
42+
Labels: common.DefaultLabels(Component),
43+
},
4044
},
4145
}}, nil
4246
}

install/installer/pkg/components/registry-facade/certificate.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ func certificate(ctx *common.RenderContext) ([]runtime.Object, error) {
3333
DNSNames: []string{
3434
fmt.Sprintf("reg.%s", ctx.Config.Domain),
3535
},
36+
SecretTemplate: &certmanagerv1.CertificateSecretTemplate{
37+
Labels: common.DefaultLabels(Component),
38+
},
3639
},
3740
}}, nil
3841
}

install/installer/pkg/components/ws-daemon/tlssecret.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ func tlssecret(ctx *common.RenderContext) ([]runtime.Object, error) {
3636
Kind: "Issuer",
3737
Group: "cert-manager.io",
3838
},
39+
SecretTemplate: &certmanagerv1.CertificateSecretTemplate{
40+
Labels: common.DefaultLabels(Component),
41+
},
3942
},
4043
},
4144
}, nil

install/installer/pkg/components/ws-manager/tlssecret.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ func tlssecret(ctx *common.RenderContext) ([]runtime.Object, error) {
4949
Kind: "Issuer",
5050
Group: "cert-manager.io",
5151
},
52+
SecretTemplate: &certmanagerv1.CertificateSecretTemplate{
53+
Labels: common.DefaultLabels(Component),
54+
},
5255
},
5356
},
5457
&certmanagerv1.Certificate{
@@ -67,6 +70,9 @@ func tlssecret(ctx *common.RenderContext) ([]runtime.Object, error) {
6770
Kind: "Issuer",
6871
Group: "cert-manager.io",
6972
},
73+
SecretTemplate: &certmanagerv1.CertificateSecretTemplate{
74+
Labels: common.DefaultLabels(Component),
75+
},
7076
},
7177
},
7278
}, nil

install/kots/manifests/gitpod-certificate.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,7 @@ spec:
1919
- '{{repl ConfigOption "domain" }}'
2020
- '*.{{repl ConfigOption "domain" }}'
2121
- '*.ws.{{repl ConfigOption "domain" }}'
22+
secretTemplate:
23+
labels:
24+
app: gitpod
25+
component: gitpod-installer

0 commit comments

Comments
 (0)