Sfoglia il codice sorgente

add labeling

master
Vladimir Smagin 8 mesi fa
parent
commit
ba7618da54
Firmato da: 21h ID Chiave GPG: 13BCE12E5618F071
2 ha cambiato i file con 7 aggiunte e 2 eliminazioni
  1. +1
    -0
      go.mod
  2. +6
    -2
      pkg/controller/django/manifests.go

+ 1
- 0
go.mod Vedi File

@@ -1,6 +1,7 @@
module git.blindage.org/21h/django-operator

require (
github.com/NYTimes/gziphandler v1.0.1 // indirect
github.com/certifi/gocertifi v0.0.0-20190506164543-d2eda7129713 // indirect
github.com/getsentry/raven-go v0.2.0
github.com/go-openapi/spec v0.19.0


+ 6
- 2
pkg/controller/django/manifests.go Vedi File

@@ -44,7 +44,9 @@ func generateService(cr *blindagev1alpha1.Django) corev1.Service {
},
}

service.Spec.Selector = baseLabels(cr)
service.Spec.Selector = mergeLabels(baseLabels(cr),
map[string]string{"component": "application"},
)

return service
}
@@ -108,7 +110,9 @@ func generateDeployment(cr *blindagev1alpha1.Django) v1.Deployment {
},
Spec: v1.DeploymentSpec{
Selector: &metav1.LabelSelector{
MatchLabels: baseLabels(cr),
MatchLabels: mergeLabels(baseLabels(cr),
map[string]string{"component": "application"},
),
},
Replicas: &cr.Spec.Replicas,
Strategy: v1.DeploymentStrategy{Type: v1.RollingUpdateDeploymentStrategyType, RollingUpdate: nil},


Caricamento…
Annulla
Salva