1
0
Fork 0
mirror of https://github.com/prometheus-operator/prometheus-operator.git synced 2025-04-20 19:29:10 +00:00

pkg/client: Rename to SHA field in PrometheusSpec

This commit is contained in:
Matthias Loibl 2018-09-04 14:26:46 +02:00
parent 8e9bf6f035
commit 0dafdd6ad7
No known key found for this signature in database
GPG key ID: B1C7DF661ABB2C1A
6 changed files with 8 additions and 8 deletions
example/prometheus-operator-crd
jsonnet/prometheus-operator
pkg

View file

@ -2377,7 +2377,7 @@ spec:
are ANDed.
type: object
sha:
description: Sha of Prometheus container image to be deployed. Defaults
description: SHA of Prometheus container image to be deployed. Defaults
to the value of `version`. Similar to a tag, but the sha explicitly
deploys an immutable container image.
type: string

File diff suppressed because one or more lines are too long

View file

@ -1183,7 +1183,7 @@ func schema_pkg_client_monitoring_v1_PrometheusSpec(ref common.ReferenceCallback
},
"sha": {
SchemaProps: spec.SchemaProps{
Description: "Sha of Prometheus container image to be deployed. Defaults to the value of `version`. Similar to a tag, but the sha explicitly deploys an immutable container image.",
Description: "SHA of Prometheus container image to be deployed. Defaults to the value of `version`. Similar to a tag, but the sha explicitly deploys an immutable container image.",
Type: []string{"string"},
Format: "",
},

View file

@ -67,9 +67,9 @@ type PrometheusSpec struct {
Version string `json:"version,omitempty"`
// Tag of Prometheus container image to be deployed. Defaults to the value of `version`.
Tag string `json:"tag,omitempty"`
// Sha of Prometheus container image to be deployed. Defaults to the value of `version`.
// SHA of Prometheus container image to be deployed. Defaults to the value of `version`.
// Similar to a tag, but the sha explicitly deploys an immutable container image.
Sha string `json:"sha,omitempty"`
SHA string `json:"sha,omitempty"`
// When a Prometheus deployment is paused, no actions except for deletion
// will be performed on the underlying objects.
Paused bool `json:"paused,omitempty"`

View file

@ -722,8 +722,8 @@ func makeStatefulSetSpec(p monitoringv1.Prometheus, c *Config, ruleConfigMapName
if p.Spec.Tag != "" {
prometheusImage = fmt.Sprintf("%s:%s", p.Spec.BaseImage, p.Spec.Tag)
}
if p.Spec.Sha != "" {
prometheusImage = fmt.Sprintf("%s@sha256:%s", p.Spec.BaseImage, p.Spec.Sha)
if p.Spec.SHA != "" {
prometheusImage = fmt.Sprintf("%s@sha256:%s", p.Spec.BaseImage, p.Spec.SHA)
}
return &appsv1.StatefulSetSpec{

View file

@ -380,7 +380,7 @@ func TestTagAndShaAndVersion(t *testing.T) {
sset, err = makeStatefulSet(monitoringv1.Prometheus{
Spec: monitoringv1.PrometheusSpec{
Sha: "7384a79f4b4991bf8269e7452390249b7c70bcdd10509c8c1c6c6e30e32fb324",
SHA: "7384a79f4b4991bf8269e7452390249b7c70bcdd10509c8c1c6c6e30e32fb324",
Tag: "my-unrelated-tag",
Version: "v2.3.2",
},