Skip to content

Commit 4d59ae7

Browse files
committed
fixup! fix(reflection): allow scheduling pods with name > 63
1 parent d5adcfe commit 4d59ae7

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pkg/virtualKubelet/forge/secrets_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,11 @@ var _ = Describe("Service accounts management", func() {
175175
It("should correctly set the labels", func() {
176176
Expect(output.Labels).To(HaveKeyWithValue(forge.LiqoOriginClusterIDKey, string(LocalClusterID)))
177177
Expect(output.Labels).To(HaveKeyWithValue(forge.LiqoDestinationClusterIDKey, string(RemoteClusterID)))
178-
Expect(output.Labels).To(HaveKeyWithValue(forge.LiqoSASecretForPodNameKey, "pod"))
179178
Expect(output.Labels).To(HaveKeyWithValue(forge.LiqoSASecretForServiceAccountKey, "sa"))
180179
})
181180

182181
It("should correctly set the annotations", func() {
182+
Expect(output.Annotations).To(HaveKeyWithValue(forge.LiqoSASecretForPodNameKey, "pod"))
183183
Expect(output.Annotations).To(HaveKeyWithValue(forge.LiqoSASecretForPodUIDKey, "pod-uid"))
184184
Expect(output.Annotations).To(HaveKeyWithValue(
185185
forge.LiqoSASecretExpirationKey, time.Now().Add(1600*time.Second).Format(time.RFC3339)))

pkg/virtualKubelet/reflection/configuration/serviceaccount_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ var _ = Describe("ServiceAccount Reflection", func() {
108108
l := labels.Merge(forge.ReflectionLabels(), forge.RemoteServiceAccountSecretLabels(&tokens))
109109
l = labels.Merge(l, map[string]string{forge.LiqoOriginClusterNodeName: LiqoNodeName})
110110
remote.SetLabels(l)
111+
remote.SetAnnotations(forge.RemoteServiceAccountSecretAnnotations(&tokens))
111112
CreateSecret(remote)
112113
}
113114
})
@@ -208,8 +209,8 @@ var _ = Describe("ServiceAccount Reflection", func() {
208209
remoteAfter := GetSecret(RemoteNamespace)
209210
Expect(remoteAfter.Labels).To(HaveKeyWithValue(forge.LiqoOriginClusterIDKey, LocalClusterID))
210211
Expect(remoteAfter.Labels).To(HaveKeyWithValue(forge.LiqoDestinationClusterIDKey, RemoteClusterID))
211-
Expect(remoteAfter.Labels).To(HaveKeyWithValue(forge.LiqoSASecretForPodNameKey, PodName))
212212
Expect(remoteAfter.Labels).To(HaveKeyWithValue(forge.LiqoSASecretForServiceAccountKey, ServiceAccountName))
213+
Expect(remoteAfter.Annotations).To(HaveKeyWithValue(forge.LiqoSASecretForPodNameKey, PodName))
213214
Expect(remoteAfter.Annotations).To(HaveKeyWithValue(forge.LiqoSASecretForPodUIDKey, string(local.GetUID())))
214215
Expect(remoteAfter.Annotations).To(HaveKey(forge.LiqoSASecretExpirationKey))
215216
})

0 commit comments

Comments
 (0)