Skip to content

Commit 9cf907a

Browse files
committed
feat: add support for image pull secrets for all components
Signed-off-by: Kevin Conner <[email protected]>
1 parent 114060b commit 9cf907a

35 files changed

+966
-17
lines changed

api/v1alpha1/common.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,3 +159,9 @@ type PodRequirements struct {
159159
Resources *core.ResourceRequirements `json:"resources,omitempty"`
160160
Tolerations []core.Toleration `json:"tolerations,omitempty"`
161161
}
162+
163+
type ServiceAccountRequirements struct {
164+
// ImagePullSecrets is an optional list of references to secrets for pulling container images.
165+
//+optional
166+
ImagePullSecrets []core.LocalObjectReference `json:"imagePullSecrets,omitempty"`
167+
}

api/v1alpha1/ctlog_types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ type CTlogSpec struct {
5858
//+kubebuilder:default:=153600
5959
//+optional
6060
MaxCertChainSize *int64 `json:"maxCertChainSize,omitempty"`
61+
62+
ServiceAccountRequirements `json:",inline"`
6163
}
6264

6365
// CTlogStatus defines the observed state of CTlog component

api/v1alpha1/fulcio_types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ type FulcioSpec struct {
3333
// ConfigMap with additional bundle of trusted CA
3434
//+optional
3535
TrustedCA *LocalObjectReference `json:"trustedCA,omitempty"`
36+
37+
ServiceAccountRequirements `json:",inline"`
3638
}
3739

3840
// FulcioCert defines fields for system-generated certificate

api/v1alpha1/rekor_types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ type RekorSpec struct {
5858
//+kubebuilder:default:=10485760
5959
//+optional
6060
MaxRequestBodySize *int64 `json:"maxRequestBodySize,omitempty"`
61+
62+
ServiceAccountRequirements `json:",inline"`
6163
}
6264

6365
// RekorAttestations defines the configuration for storing attestations.

api/v1alpha1/securesign_types.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ import (
2424
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
2525
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
2626

27-
// SecuresignSpec defines the desired state of Securesign
27+
// SecuresignSpec defines the desired state of Securesign.
28+
// Service account settings defined at this level (such as imagePullSecrets) are inherited by all components.
2829
// +kubebuilder:validation:XValidation:rule="(has(self.rekor.attestations.enabled) && !self.rekor.attestations.enabled) || !self.rekor.attestations.url.startsWith('file://') || (!(self.rekor.replicas > 1) || ('ReadWriteMany' in self.rekor.pvc.accessModes))",message="When Rekor's rich attestation storage is enabled, and it's URL starts with 'file://', then PVC accessModes must contain 'ReadWriteMany' for replicas greater than 1."
2930
// +kubebuilder:validation:XValidation:rule="!(self.tuf.replicas > 1) || ('ReadWriteMany' in self.tuf.pvc.accessModes)",message="For TUF deployments with more than 1 replica, tuf.pvc.accessModes must include 'ReadWriteMany'."
3031
type SecuresignSpec struct {
@@ -35,6 +36,8 @@ type SecuresignSpec struct {
3536
Tuf TufSpec `json:"tuf,omitempty"`
3637
Ctlog CTlogSpec `json:"ctlog,omitempty"`
3738
TimestampAuthority *TimestampAuthoritySpec `json:"tsa,omitempty"`
39+
40+
ServiceAccountRequirements `json:",inline"`
3841
}
3942

4043
// SecuresignStatus defines the observed state of Securesign

api/v1alpha1/timestampauthority_types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ type TimestampAuthoritySpec struct {
4242
//+kubebuilder:default:=1048576
4343
//+optional
4444
MaxRequestBodySize *int64 `json:"maxRequestBodySize,omitempty"`
45+
46+
ServiceAccountRequirements `json:",inline"`
4547
}
4648

4749
// TimestampAuthoritySigner defines the desired state of the Timestamp Authority Signer

api/v1alpha1/trillian_types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ type TrillianSpec struct {
4242
//+kubebuilder:default:=153600
4343
//+optional
4444
MaxRecvMessageSize *int64 `json:"maxRecvMessageSize,omitempty"`
45+
46+
ServiceAccountRequirements `json:",inline"`
4547
}
4648

4749
type trillianService struct {

api/v1alpha1/tuf_types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ type TufSpec struct {
2929
// You can use ReadWriteOnce accessMode if you don't have suitable storage provider but your deployment will not support HA mode
3030
//+kubebuilder:default:={size: "100Mi",retain: true,accessModes: {ReadWriteOnce}}
3131
Pvc TufPvc `json:"pvc,omitempty"`
32+
33+
ServiceAccountRequirements `json:",inline"`
3234
}
3335

3436
// TufPvc configuration of the persistent storage claim for deployment in the cluster.

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 27 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/rhtas.redhat.com_ctlogs.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -956,6 +956,26 @@ spec:
956956
x-kubernetes-list-type: atomic
957957
type: object
958958
type: object
959+
imagePullSecrets:
960+
description: ImagePullSecrets is an optional list of references to
961+
secrets for pulling container images.
962+
items:
963+
description: |-
964+
LocalObjectReference contains enough information to let you locate the
965+
referenced object inside the same namespace.
966+
properties:
967+
name:
968+
default: ""
969+
description: |-
970+
Name of the referent.
971+
This field is effectively required, but due to backwards compatibility is
972+
allowed to be empty. Instances of this type with an empty value here are
973+
almost certainly wrong.
974+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
975+
type: string
976+
type: object
977+
x-kubernetes-map-type: atomic
978+
type: array
959979
maxCertChainSize:
960980
default: 153600
961981
description: Max certificate chain size in bytes. Passed as --max_cert_chain_size.

0 commit comments

Comments
 (0)