Skip to content

Commit 0f40e63

Browse files
committed
Add the pulp_secret_key field
closes: #1040
1 parent 4fe022a commit 0f40e63

22 files changed

+195
-11
lines changed

CHANGES/1040.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added the `pulp_secret_key` field to set the Django `SECRET_KEY`.

apis/repo-manager.pulpproject.org/v1beta2/pulp_backup_types.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ type PulpBackupSpec struct {
7575
// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:io.kubernetes:Secret"}
7676
PostgresConfigurationSecret string `json:"postgres_configuration_secret"`
7777

78+
// Secret where the Django SECRET_KEY configuration can be found
79+
// +kubebuilder:validation:Optional
80+
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Django SECRET_KEY configuration"
81+
// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:io.kubernetes:Secret"}
82+
PulpSecretKey string `json:"pulp_secret_key,omitempty"`
83+
7884
// Affinity is a group of affinity scheduling rules.
7985
// +kubebuilder:validation:Optional
8086
// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced"}

apis/repo-manager.pulpproject.org/v1beta2/pulp_types.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,12 @@ type PulpSpec struct {
360360
// Job to run django migrations
361361
MigrationJob PulpJob `json:"migration_job,omitempty"`
362362

363+
// Name of the Secret to provide Django cryptographic signing.
364+
// Default: "pulp-secret-key"
365+
// +kubebuilder:validation:Optional
366+
// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:hidden"}
367+
PulpSecretKey string `json:"pulp_secret_key,omitempty"`
368+
363369
/*
364370
DEPRECATED FIELDS FROM ANSIBLE VERSION
365371
*/
@@ -1129,6 +1135,8 @@ type PulpStatus struct {
11291135
ExternalCacheSecret string `json:"external_cache_secret,omitempty"`
11301136
// Pulp metrics collection enabled
11311137
TelemetryEnabled bool `json:"telemetry_enabled,omitempty"`
1138+
// Name of the Secret to provide Django cryptographic signing.
1139+
PulpSecretKey string `json:"pulp_secret_key,omitempty"`
11321140

11331141
// [DEPRECATED] Temporarily adding to keep compatibility with ansible version.
11341142
StoragePersistentVolumeClaim string `json:"storagePersistentVolumeClaim,omitempty"`

bundle/manifests/pulp-operator.clusterserviceversion.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ metadata:
325325
capabilities: Full Lifecycle
326326
categories: Integration & Delivery
327327
containerImage: quay.io/pulp/pulp-operator:devel
328-
createdAt: "2023-08-09T19:33:08Z"
328+
createdAt: "2023-08-21T15:47:03Z"
329329
description: Pulp is a platform for managing repositories of software packages
330330
and making them available to a large number of consumers.
331331
operators.operatorframework.io/builder: operator-sdk-v1.29.0
@@ -544,6 +544,11 @@ spec:
544544
- description: Label selector used to identify postgres pod for executing migration
545545
displayName: Postgres Label Selector
546546
path: postgres_label_selector
547+
- description: Secret where the Django SECRET_KEY configuration can be found
548+
displayName: Django SECRET_KEY configuration
549+
path: pulp_secret_key
550+
x-descriptors:
551+
- urn:alm:descriptor:io.kubernetes:Secret
547552
statusDescriptors:
548553
- description: Administrator password secret used by the deployed instance
549554
displayName: Admin Password Secret
@@ -3248,6 +3253,12 @@ spec:
32483253
path: postgres_tolerations
32493254
x-descriptors:
32503255
- urn:alm:descriptor:com.tectonic.ui:advanced
3256+
- description: 'Name of the Secret to provide Django cryptographic signing.
3257+
Default: "pulp-secret-key"'
3258+
displayName: Pulp Secret Key
3259+
path: pulp_secret_key
3260+
x-descriptors:
3261+
- urn:alm:descriptor:com.tectonic.ui:hidden
32513262
- description: Definition of /etc/pulp/settings.py config file.
32523263
displayName: Pulp Settings
32533264
path: pulp_settings

bundle/manifests/repo-manager.pulpproject.org_pulpbackups.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2922,6 +2922,10 @@ spec:
29222922
description: Label selector used to identify postgres pod for executing
29232923
migration
29242924
type: string
2925+
pulp_secret_key:
2926+
description: Secret where the Django SECRET_KEY configuration can
2927+
be found
2928+
type: string
29252929
type: object
29262930
status:
29272931
description: PulpBackupStatus defines the observed state of PulpBackup

bundle/manifests/repo-manager.pulpproject.org_pulps.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25060,6 +25060,10 @@ spec:
2506025060
type: string
2506125061
type: object
2506225062
type: array
25063+
pulp_secret_key:
25064+
description: 'Name of the Secret to provide Django cryptographic signing.
25065+
Default: "pulp-secret-key"'
25066+
type: string
2506325067
pulp_settings:
2506425068
description: Definition of /etc/pulp/settings.py config file.
2506525069
type: object
@@ -28001,6 +28005,9 @@ spec:
2800128005
object_storage_s3_secret:
2800228006
description: The secret for S3 compliant object storage configuration.
2800328007
type: string
28008+
pulp_secret_key:
28009+
description: Name of the Secret to provide Django cryptographic signing.
28010+
type: string
2800428011
storagePersistentVolumeClaim:
2800528012
description: '[DEPRECATED] Temporarily adding to keep compatibility
2800628013
with ansible version.'

config/crd/bases/repo-manager.pulpproject.org_pulpbackups.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2923,6 +2923,10 @@ spec:
29232923
description: Label selector used to identify postgres pod for executing
29242924
migration
29252925
type: string
2926+
pulp_secret_key:
2927+
description: Secret where the Django SECRET_KEY configuration can
2928+
be found
2929+
type: string
29262930
type: object
29272931
status:
29282932
description: PulpBackupStatus defines the observed state of PulpBackup

config/crd/bases/repo-manager.pulpproject.org_pulps.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25061,6 +25061,10 @@ spec:
2506125061
type: string
2506225062
type: object
2506325063
type: array
25064+
pulp_secret_key:
25065+
description: 'Name of the Secret to provide Django cryptographic signing.
25066+
Default: "pulp-secret-key"'
25067+
type: string
2506425068
pulp_settings:
2506525069
description: Definition of /etc/pulp/settings.py config file.
2506625070
type: object
@@ -28002,6 +28006,9 @@ spec:
2800228006
object_storage_s3_secret:
2800328007
description: The secret for S3 compliant object storage configuration.
2800428008
type: string
28009+
pulp_secret_key:
28010+
description: Name of the Secret to provide Django cryptographic signing.
28011+
type: string
2800528012
storagePersistentVolumeClaim:
2800628013
description: '[DEPRECATED] Temporarily adding to keep compatibility
2800728014
with ansible version.'

config/manifests/bases/pulp-operator.clusterserviceversion.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,11 @@ spec:
200200
- description: Label selector used to identify postgres pod for executing migration
201201
displayName: Postgres Label Selector
202202
path: postgres_label_selector
203+
- description: Secret where the Django SECRET_KEY configuration can be found
204+
displayName: Django SECRET_KEY configuration
205+
path: pulp_secret_key
206+
x-descriptors:
207+
- urn:alm:descriptor:io.kubernetes:Secret
203208
statusDescriptors:
204209
- description: Administrator password secret used by the deployed instance
205210
displayName: Admin Password Secret
@@ -1292,6 +1297,12 @@ spec:
12921297
path: postgres_tolerations
12931298
x-descriptors:
12941299
- urn:alm:descriptor:com.tectonic.ui:advanced
1300+
- description: 'Name of the Secret to provide Django cryptographic signing.
1301+
Default: "pulp-secret-key"'
1302+
displayName: Pulp Secret Key
1303+
path: pulp_secret_key
1304+
x-descriptors:
1305+
- urn:alm:descriptor:com.tectonic.ui:hidden
12951306
- description: Definition of /etc/pulp/settings.py config file.
12961307
displayName: Pulp Settings
12971308
path: pulp_settings

controllers/backup/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ PulpBackupSpec defines the desired state of PulpBackup
4848
| postgres_label_selector | Label selector used to identify postgres pod for executing migration | string | true |
4949
| admin_password_secret | Secret where the administrator password can be found | string | false |
5050
| postgres_configuration_secret | Secret where the database configuration can be found | string | true |
51+
| pulp_secret_key | Secret where the Django SECRET_KEY configuration can be found | string | false |
5152
| affinity | Affinity is a group of affinity scheduling rules. | *corev1.Affinity | false |
5253

5354
[Back to Custom Resources](#custom-resources)

0 commit comments

Comments
 (0)