-
Notifications
You must be signed in to change notification settings - Fork 32
K8SPS-550: apply serviceAccountName
for haproxy pods
#1098
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
Changes from 4 commits
39b1989
98307b1
d8e7195
e54a253
7004e63
7de6af8
1050a29
8877131
a89b3de
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,6 +113,19 @@ func TestStatefulset(t *testing.T) { | |
assert.Equal(t, runtimeClassName, *sts.Spec.Template.Spec.RuntimeClassName) | ||
}) | ||
|
||
t.Run("service account name", func(t *testing.T) { | ||
cluster := cr.DeepCopy() | ||
sts := StatefulSet(cluster, initImage, configHash, tlsHash, secret) | ||
var e string | ||
assert.Equal(t, e, sts.Spec.Template.Spec.ServiceAccountName) | ||
|
||
|
||
const serviceAccountName = "service" | ||
cluster.Spec.Proxy.HAProxy.ServiceAccountName = serviceAccountName | ||
|
||
sts = StatefulSet(cluster, initImage, configHash, tlsHash, secret) | ||
assert.Equal(t, serviceAccountName, sts.Spec.Template.Spec.ServiceAccountName) | ||
}) | ||
|
||
t.Run("tolerations", func(t *testing.T) { | ||
cluster := cr.DeepCopy() | ||
sts := StatefulSet(cluster, initImage, configHash, tlsHash, secret) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -119,6 +119,19 @@ func TestStatefulSet(t *testing.T) { | |
assert.Equal(t, runtimeClassName, *sts.Spec.Template.Spec.RuntimeClassName) | ||
}) | ||
|
||
t.Run("service account name", func(t *testing.T) { | ||
cluster := cr.DeepCopy() | ||
sts := StatefulSet(cluster, initImage, configHash, tlsHash, secret) | ||
var e string | ||
assert.Equal(t, e, sts.Spec.Template.Spec.ServiceAccountName) | ||
|
||
|
||
const serviceAccountName = "service" | ||
cluster.Spec.MySQL.ServiceAccountName = serviceAccountName | ||
|
||
sts = StatefulSet(cluster, initImage, configHash, tlsHash, secret) | ||
assert.Equal(t, serviceAccountName, sts.Spec.Template.Spec.ServiceAccountName) | ||
}) | ||
|
||
t.Run("tolerations", func(t *testing.T) { | ||
cluster := cr.DeepCopy() | ||
sts := StatefulSet(cluster, initImage, configHash, tlsHash, secret) | ||
|
Uh oh!
There was an error while loading. Please reload this page.