Skip to content

Commit 6452e05

Browse files
committed
Create a migration job if some settings change
closes: pulp#1522
1 parent c7fa8a4 commit 6452e05

File tree

12 files changed

+1060
-231
lines changed

12 files changed

+1060
-231
lines changed

CHANGES/1522.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added automatic migration job trigger for Pulp settings changes.

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,19 @@ type PulpSpec struct {
372372
// +kubebuilder:validation:Optional
373373
// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:hidden"}
374374
IPv6Disabled *bool `json:"ipv6_disabled,omitempty"`
375+
376+
// When set to True access to artifacts is redirected to the corresponding Cloud storage.
377+
// When set to False artifacts are always served by the content app instead.
378+
// Default: false
379+
// +kubebuilder:validation:Optional
380+
// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:hidden"}
381+
RedirectToObjectStorage bool `json:"redirect_to_object_storage,omitempty"`
382+
383+
// If True, the distributions, that are protected by a content guard, will not be shown on the directory listing in the content app.
384+
// Default: false
385+
// +kubebuilder:validation:Optional
386+
// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:hidden"}
387+
HideGuardedDistributions bool `json:"hide_guarded_distributions,omitempty"`
375388
}
376389

377390
// Api defines desired state of pulpcore-api resources
@@ -962,6 +975,10 @@ type PulpStatus struct {
962975
ManagedCacheEnabled bool `json:"managed_cache_enabled,omitempty"`
963976
// Type of storage in use by pulpcore pods
964977
StorageType string `json:"storage_type,omitempty"`
978+
// The current REDIRECT_TO_OBJECT_STORAGE definition
979+
RedirectToObjectStorage bool `json:"redirect_to_object_storage,omitempty"`
980+
// The current HIDE_GUARDED_DISTRIBUTIONS definition
981+
HideGuardedDistributions bool `json:"hide_guarded_distributions,omitempty"`
965982
}
966983

967984
// +kubebuilder:object:root=true

bundle/manifests/pulp-operator.clusterserviceversion.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ metadata:
6464
capabilities: Full Lifecycle
6565
categories: Integration & Delivery
6666
containerImage: quay.io/pulp/pulp-operator:v1.0.0
67-
createdAt: "2025-04-30T14:46:36Z"
67+
createdAt: "2025-09-11T20:55:00Z"
6868
description: Pulp is a platform for managing repositories of software packages
6969
and making them available to a large number of consumers.
7070
metadata.annotations.support: Community
@@ -640,6 +640,13 @@ spec:
640640
x-descriptors:
641641
- urn:alm:descriptor:com.tectonic.ui:text
642642
- urn:alm:descriptor:com.tectonic.ui:advanced
643+
- description: 'If True, the distributions, that are protected by a content
644+
guard, will not be shown on the directory listing in the content app. Default:
645+
false'
646+
displayName: Hide Guarded Distributions
647+
path: hide_guarded_distributions
648+
x-descriptors:
649+
- urn:alm:descriptor:com.tectonic.ui:hidden
643650
- description: 'The image name (repo name) for the pulp image. Default: "quay.io/pulp/pulp-minimal:stable"'
644651
displayName: Image
645652
path: image
@@ -835,6 +842,13 @@ spec:
835842
x-descriptors:
836843
- urn:alm:descriptor:io.kubernetes:PersistentVolumeClaim
837844
- urn:alm:descriptor:com.tectonic.ui:advanced
845+
- description: 'When set to True access to artifacts is redirected to the corresponding
846+
Cloud storage. When set to False artifacts are always served by the content
847+
app instead. Default: false'
848+
displayName: Redirect To Object Storage
849+
path: redirect_to_object_storage
850+
x-descriptors:
851+
- urn:alm:descriptor:com.tectonic.ui:hidden
838852
- description: RouteAnnotations will append custom annotation(s) into routes
839853
(used by router shard routeSelector).
840854
displayName: Route Annotations

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

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,6 @@ spec:
326326
pod labels will be ignored. The default value is empty.
327327
The same key is forbidden to exist in both matchLabelKeys and labelSelector.
328328
Also, matchLabelKeys cannot be set when labelSelector isn't set.
329-
This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).
330329
items:
331330
type: string
332331
type: array
@@ -341,7 +340,6 @@ spec:
341340
pod labels will be ignored. The default value is empty.
342341
The same key is forbidden to exist in both mismatchLabelKeys and labelSelector.
343342
Also, mismatchLabelKeys cannot be set when labelSelector isn't set.
344-
This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).
345343
items:
346344
type: string
347345
type: array
@@ -507,7 +505,6 @@ spec:
507505
pod labels will be ignored. The default value is empty.
508506
The same key is forbidden to exist in both matchLabelKeys and labelSelector.
509507
Also, matchLabelKeys cannot be set when labelSelector isn't set.
510-
This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).
511508
items:
512509
type: string
513510
type: array
@@ -522,7 +519,6 @@ spec:
522519
pod labels will be ignored. The default value is empty.
523520
The same key is forbidden to exist in both mismatchLabelKeys and labelSelector.
524521
Also, mismatchLabelKeys cannot be set when labelSelector isn't set.
525-
This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).
526522
items:
527523
type: string
528524
type: array
@@ -615,8 +611,8 @@ spec:
615611
most preferred is the one with the greatest sum of weights, i.e.
616612
for each node that meets all of the scheduling requirements (resource
617613
request, requiredDuringScheduling anti-affinity expressions, etc.),
618-
compute a sum by iterating through the elements of this field and adding
619-
"weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the
614+
compute a sum by iterating through the elements of this field and subtracting
615+
"weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the
620616
node(s) with the highest sum are the most preferred.
621617
items:
622618
description: The weights of all of the matched WeightedPodAffinityTerm
@@ -685,7 +681,6 @@ spec:
685681
pod labels will be ignored. The default value is empty.
686682
The same key is forbidden to exist in both matchLabelKeys and labelSelector.
687683
Also, matchLabelKeys cannot be set when labelSelector isn't set.
688-
This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).
689684
items:
690685
type: string
691686
type: array
@@ -700,7 +695,6 @@ spec:
700695
pod labels will be ignored. The default value is empty.
701696
The same key is forbidden to exist in both mismatchLabelKeys and labelSelector.
702697
Also, mismatchLabelKeys cannot be set when labelSelector isn't set.
703-
This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).
704698
items:
705699
type: string
706700
type: array
@@ -866,7 +860,6 @@ spec:
866860
pod labels will be ignored. The default value is empty.
867861
The same key is forbidden to exist in both matchLabelKeys and labelSelector.
868862
Also, matchLabelKeys cannot be set when labelSelector isn't set.
869-
This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).
870863
items:
871864
type: string
872865
type: array
@@ -881,7 +874,6 @@ spec:
881874
pod labels will be ignored. The default value is empty.
882875
The same key is forbidden to exist in both mismatchLabelKeys and labelSelector.
883876
Also, mismatchLabelKeys cannot be set when labelSelector isn't set.
884-
This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).
885877
items:
886878
type: string
887879
type: array

0 commit comments

Comments
 (0)