fix: bug annotations (#3255)

Fix Issue: https://github.com/woodpecker-ci/woodpecker/issues/3254

Co-authored-by: elias.souza <elias.souza@quintoandar.com.br>
This commit is contained in:
Elias 2024-01-22 09:39:49 -03:00 committed by GitHub
parent 188d6ed16c
commit 32a1199519
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -32,6 +32,7 @@ import (
"k8s.io/client-go/informers"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/kubernetes/scheme"
// To authenticate to GCP K8s clusters
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
"k8s.io/client-go/rest"
@ -163,7 +164,7 @@ func (e *kube) getConfig() *config {
}
c := *e.config
c.PodLabels = maps.Clone(e.config.PodLabels)
c.PodAnnotations = maps.Clone(e.config.PodLabels)
c.PodAnnotations = maps.Clone(e.config.PodAnnotations)
c.ImagePullSecretNames = slices.Clone(e.config.ImagePullSecretNames)
return &c
}