瀏覽代碼

add labeling

master
Vladimir Smagin 8 月之前
父節點
當前提交
ba7618da54
簽署人: 21h GPG Key ID: 13BCE12E5618F071
共有 2 個文件被更改,包括 7 次插入2 次删除
  1. +1
    -0
      go.mod
  2. +6
    -2
      pkg/controller/django/manifests.go

+ 1
- 0
go.mod 查看文件

@@ -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 查看文件

@@ -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},


Loading…
取消
儲存