Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for imagePullSecrets for Scylla and Agent images #678

Merged
merged 3 commits into from Jul 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions examples/common/operator.yaml
Expand Up @@ -3087,6 +3087,20 @@ spec:
spent during upgrade. DEPRECATED.
type: string
type: object
imagePullSecrets:
description: ImagePullSecrets is an optional list of references to
secrets in the same namespace used for pulling Scylla and Agent
images.
items:
description: LocalObjectReference contains enough information to
let you locate the referenced object inside the same namespace.
properties:
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind, uid?'
type: string
type: object
type: array
network:
description: network holds the networking config.
properties:
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -17,7 +17,7 @@ require (
github.com/go-openapi/validate v0.19.8
github.com/gocql/gocql v0.0.0-20200815110948-5378c8f664e9
github.com/golang/snappy v0.0.1 // indirect
github.com/google/go-cmp v0.5.2
github.com/google/go-cmp v0.5.6
github.com/googleapis/gnostic v0.5.1 // indirect
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed
github.com/hashicorp/go-version v1.2.1
Expand Down
3 changes: 2 additions & 1 deletion go.sum
Expand Up @@ -278,8 +278,9 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM=
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g=
github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
Expand Down
5 changes: 5 additions & 0 deletions pkg/api/scylla/v1/cluster_types.go
Expand Up @@ -90,6 +90,11 @@ type ScyllaClusterSpec struct {
// forceRedeploymentReason can be used to force a rolling update of all racks by providing a unique string.
// +optional
ForceRedeploymentReason string `json:"forceRedeploymentReason,omitempty"`

// ImagePullSecrets is an optional list of references to secrets in the same namespace
// used for pulling Scylla and Agent images.
// +optional
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
}

// GenericUpgradeFailureStrategy allows to specify how upgrade logic should handle failures.
Expand Down
14 changes: 14 additions & 0 deletions pkg/api/scylla/v1/scylla.scylladb.com_scyllaclusters.yaml
Expand Up @@ -2911,6 +2911,20 @@ spec:
spent during upgrade. DEPRECATED.
type: string
type: object
imagePullSecrets:
description: ImagePullSecrets is an optional list of references to
secrets in the same namespace used for pulling Scylla and Agent
images.
items:
description: LocalObjectReference contains enough information to
let you locate the referenced object inside the same namespace.
properties:
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind, uid?'
type: string
type: object
type: array
network:
description: network holds the networking config.
properties:
Expand Down
5 changes: 5 additions & 0 deletions pkg/api/scylla/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pkg/controller/scyllacluster/resource/resource.go
Expand Up @@ -392,6 +392,7 @@ func StatefulSetForRack(r scyllav1.RackSpec, c *scyllav1.ScyllaCluster, existing
PodAffinity: placement.PodAffinity,
PodAntiAffinity: placement.PodAntiAffinity,
},
ImagePullSecrets: c.Spec.ImagePullSecrets,
},
},
VolumeClaimTemplates: []corev1.PersistentVolumeClaim{
Expand Down