Skip to content

Commit b6c07b3

Browse files
author
Simon Emms
committed
[installer]: add custom annotations to rabbitmq
1 parent 0f81ac1 commit b6c07b3

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

install/installer/pkg/components/rabbitmq/rolebinding.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package rabbitmq
66

77
import (
88
"fmt"
9+
910
"github.com/gitpod-io/gitpod/installer/pkg/common"
1011
v1 "k8s.io/api/rbac/v1"
1112
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -16,9 +17,10 @@ func rolebinding(ctx *common.RenderContext) ([]runtime.Object, error) {
1617
return []runtime.Object{&v1.RoleBinding{
1718
TypeMeta: common.TypeMetaRoleBinding,
1819
ObjectMeta: metav1.ObjectMeta{
19-
Name: Component,
20-
Namespace: ctx.Namespace,
21-
Labels: common.DefaultLabels(Component),
20+
Name: Component,
21+
Namespace: ctx.Namespace,
22+
Labels: common.DefaultLabels(Component),
23+
Annotations: common.ComponentAnnotation(ctx, Component, common.TypeMetaRoleBinding),
2224
},
2325
Subjects: []v1.Subject{{
2426
Kind: "ServiceAccount",

install/installer/pkg/components/rabbitmq/secret.go

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package rabbitmq
66

77
import (
88
_ "embed"
9+
910
"github.com/gitpod-io/gitpod/installer/pkg/common"
1011
corev1 "k8s.io/api/core/v1"
1112
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -30,19 +31,21 @@ func secrets(ctx *common.RenderContext) ([]runtime.Object, error) {
3031
return []runtime.Object{&corev1.Secret{
3132
TypeMeta: common.TypeMetaSecret,
3233
ObjectMeta: metav1.ObjectMeta{
33-
Name: CookieSecret,
34-
Namespace: ctx.Namespace,
35-
Labels: common.DefaultLabels(Component),
34+
Name: CookieSecret,
35+
Namespace: ctx.Namespace,
36+
Labels: common.DefaultLabels(Component),
37+
Annotations: common.ComponentAnnotation(ctx, CookieSecret, common.TypeMetaSecret),
3638
},
3739
Data: map[string][]byte{
3840
"rabbitmq-erlang-cookie": []byte(cookieString),
3941
},
4042
}, &corev1.Secret{
4143
TypeMeta: common.TypeMetaSecret,
4244
ObjectMeta: metav1.ObjectMeta{
43-
Name: TLSSecret,
44-
Namespace: ctx.Namespace,
45-
Labels: common.DefaultLabels(Component),
45+
Name: TLSSecret,
46+
Namespace: ctx.Namespace,
47+
Labels: common.DefaultLabels(Component),
48+
Annotations: common.ComponentAnnotation(ctx, TLSSecret, common.TypeMetaSecret),
4649
},
4750
Data: map[string][]byte{
4851
"ca.crt": caPem,

0 commit comments

Comments
 (0)