Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions config/crd/bases/rds.valkey.buf.red_valkeys.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -700,8 +700,8 @@ spec:
most preferred is the one with the greatest sum of weights, i.e.
for each node that meets all of the scheduling requirements (resource
request, requiredDuringScheduling anti-affinity expressions, etc.),
compute a sum by iterating through the elements of this field and adding
"weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the
compute a sum by iterating through the elements of this field and subtracting
"weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the
Comment on lines +703 to +704
node(s) with the highest sum are the most preferred.
items:
description: The weights of all of the matched WeightedPodAffinityTerm
Expand Down Expand Up @@ -1071,7 +1071,7 @@ spec:
Claims lists the names of resources, defined in spec.resourceClaims,
that are used by this container.

This is an alpha field and requires enabling the
This field depends on the
DynamicResourceAllocation feature gate.

This field is immutable. It can only be set for containers.
Expand Down Expand Up @@ -1394,7 +1394,7 @@ spec:
Claims lists the names of resources, defined in spec.resourceClaims,
that are used by this container.

This is an alpha field and requires enabling the
This field depends on the
DynamicResourceAllocation feature gate.

This field is immutable. It can only be set for containers.
Expand Down Expand Up @@ -2307,8 +2307,8 @@ spec:
most preferred is the one with the greatest sum of weights, i.e.
for each node that meets all of the scheduling requirements (resource
request, requiredDuringScheduling anti-affinity expressions, etc.),
compute a sum by iterating through the elements of this field and adding
"weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the
compute a sum by iterating through the elements of this field and subtracting
"weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the
Comment on lines +2310 to +2311
node(s) with the highest sum are the most preferred.
items:
description: The weights of all of the matched WeightedPodAffinityTerm
Expand Down Expand Up @@ -2677,7 +2677,7 @@ spec:
Claims lists the names of resources, defined in spec.resourceClaims,
that are used by this container.

This is an alpha field and requires enabling the
This field depends on the
DynamicResourceAllocation feature gate.

This field is immutable. It can only be set for containers.
Expand Down Expand Up @@ -2986,7 +2986,7 @@ spec:
Claims lists the names of resources, defined in spec.resourceClaims,
that are used by this container.

This is an alpha field and requires enabling the
This field depends on the
DynamicResourceAllocation feature gate.

This field is immutable. It can only be set for containers.
Expand Down
8 changes: 4 additions & 4 deletions config/crd/bases/valkey.buf.red_clusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -635,8 +635,8 @@ spec:
most preferred is the one with the greatest sum of weights, i.e.
for each node that meets all of the scheduling requirements (resource
request, requiredDuringScheduling anti-affinity expressions, etc.),
compute a sum by iterating through the elements of this field and adding
"weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the
compute a sum by iterating through the elements of this field and subtracting
"weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the
Comment on lines +638 to +639
node(s) with the highest sum are the most preferred.
items:
description: The weights of all of the matched WeightedPodAffinityTerm
Expand Down Expand Up @@ -1060,7 +1060,7 @@ spec:
Claims lists the names of resources, defined in spec.resourceClaims,
that are used by this container.

This is an alpha field and requires enabling the
This field depends on the
DynamicResourceAllocation feature gate.

This field is immutable. It can only be set for containers.
Expand Down Expand Up @@ -1400,7 +1400,7 @@ spec:
Claims lists the names of resources, defined in spec.resourceClaims,
that are used by this container.

This is an alpha field and requires enabling the
This field depends on the
DynamicResourceAllocation feature gate.

This field is immutable. It can only be set for containers.
Expand Down
16 changes: 8 additions & 8 deletions config/crd/bases/valkey.buf.red_failovers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -678,8 +678,8 @@ spec:
most preferred is the one with the greatest sum of weights, i.e.
for each node that meets all of the scheduling requirements (resource
request, requiredDuringScheduling anti-affinity expressions, etc.),
compute a sum by iterating through the elements of this field and adding
"weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the
compute a sum by iterating through the elements of this field and subtracting
"weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the
Comment on lines +681 to +682
node(s) with the highest sum are the most preferred.
items:
description: The weights of all of the matched WeightedPodAffinityTerm
Expand Down Expand Up @@ -1044,7 +1044,7 @@ spec:
Claims lists the names of resources, defined in spec.resourceClaims,
that are used by this container.

This is an alpha field and requires enabling the
This field depends on the
DynamicResourceAllocation feature gate.

This field is immutable. It can only be set for containers.
Expand Down Expand Up @@ -1356,7 +1356,7 @@ spec:
Claims lists the names of resources, defined in spec.resourceClaims,
that are used by this container.

This is an alpha field and requires enabling the
This field depends on the
DynamicResourceAllocation feature gate.

This field is immutable. It can only be set for containers.
Expand Down Expand Up @@ -2271,8 +2271,8 @@ spec:
most preferred is the one with the greatest sum of weights, i.e.
for each node that meets all of the scheduling requirements (resource
request, requiredDuringScheduling anti-affinity expressions, etc.),
compute a sum by iterating through the elements of this field and adding
"weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the
compute a sum by iterating through the elements of this field and subtracting
"weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the
Comment on lines +2274 to +2275
node(s) with the highest sum are the most preferred.
items:
description: The weights of all of the matched WeightedPodAffinityTerm
Expand Down Expand Up @@ -2641,7 +2641,7 @@ spec:
Claims lists the names of resources, defined in spec.resourceClaims,
that are used by this container.

This is an alpha field and requires enabling the
This field depends on the
DynamicResourceAllocation feature gate.

This field is immutable. It can only be set for containers.
Expand Down Expand Up @@ -2950,7 +2950,7 @@ spec:
Claims lists the names of resources, defined in spec.resourceClaims,
that are used by this container.

This is an alpha field and requires enabling the
This field depends on the
DynamicResourceAllocation feature gate.

This field is immutable. It can only be set for containers.
Expand Down
8 changes: 4 additions & 4 deletions config/crd/bases/valkey.buf.red_sentinels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -683,8 +683,8 @@ spec:
most preferred is the one with the greatest sum of weights, i.e.
for each node that meets all of the scheduling requirements (resource
request, requiredDuringScheduling anti-affinity expressions, etc.),
compute a sum by iterating through the elements of this field and adding
"weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the
compute a sum by iterating through the elements of this field and subtracting
"weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the
Comment on lines +686 to +687
node(s) with the highest sum are the most preferred.
items:
description: The weights of all of the matched WeightedPodAffinityTerm
Expand Down Expand Up @@ -1049,7 +1049,7 @@ spec:
Claims lists the names of resources, defined in spec.resourceClaims,
that are used by this container.

This is an alpha field and requires enabling the
This field depends on the
DynamicResourceAllocation feature gate.

This field is immutable. It can only be set for containers.
Expand Down Expand Up @@ -1342,7 +1342,7 @@ spec:
Claims lists the names of resources, defined in spec.resourceClaims,
that are used by this container.

This is an alpha field and requires enabling the
This field depends on the
DynamicResourceAllocation feature gate.

This field is immutable. It can only be set for containers.
Expand Down
8 changes: 4 additions & 4 deletions config/webhook/manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ webhooks:
service:
name: webhook-service
namespace: system
path: /mutate-rds-inst-buf-red-v1alpha1-inst
path: /mutate-rds-valkey-buf-red-v1alpha1-valkey
failurePolicy: Fail
name: mvalkey-v1alpha1.kb.io
rules:
- apiGroups:
- rds.inst.buf.red
- rds.valkey.buf.red
apiVersions:
- v1alpha1
operations:
Expand Down Expand Up @@ -57,12 +57,12 @@ webhooks:
service:
name: webhook-service
namespace: system
path: /validate-rds-inst-buf-red-v1alpha1-inst
path: /validate-rds-valkey-buf-red-v1alpha1-valkey
failurePolicy: Fail
name: vvalkey-v1alpha1.kb.io
rules:
- apiGroups:
- rds.inst.buf.red
- rds.valkey.buf.red
apiVersions:
- v1alpha1
operations:
Expand Down
5 changes: 3 additions & 2 deletions internal/webhook/rds/v1alpha1/valkey_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func SetupValkeyWebhookWithManager(mgr ctrl.Manager) error {
Complete()
}

// +kubebuilder:webhook:path=/mutate-rds-inst-buf-red-v1alpha1-inst,mutating=true,failurePolicy=fail,sideEffects=None,groups=rds.inst.buf.red,resources=valkeys,verbs=create;update,versions=v1alpha1,name=mvalkey-v1alpha1.kb.io,admissionReviewVersions=v1
// +kubebuilder:webhook:path=/mutate-rds-valkey-buf-red-v1alpha1-valkey,mutating=true,failurePolicy=fail,sideEffects=None,groups=rds.valkey.buf.red,resources=valkeys,verbs=create;update,versions=v1alpha1,name=mvalkey-v1alpha1.kb.io,admissionReviewVersions=v1

// ValkeyCustomDefaulter struct is responsible for setting default values on the custom resource of the
// Kind inst when those are created or updated.
Expand Down Expand Up @@ -118,6 +118,7 @@ func (d *ValkeyCustomDefaulter) Default(ctx context.Context, obj runtime.Object)
ReplicasOfShard: 2,
}
}
inst.Spec.Replicas.Shards = 1
if inst.Spec.Sentinel == nil {
inst.Spec.Sentinel = &v1alpha1.SentinelSettings{}
Comment on lines 118 to 123
}
Expand Down Expand Up @@ -158,7 +159,7 @@ func (d *ValkeyCustomDefaulter) Default(ctx context.Context, obj runtime.Object)
return nil
}

// +kubebuilder:webhook:path=/validate-rds-inst-buf-red-v1alpha1-inst,mutating=false,failurePolicy=fail,sideEffects=None,groups=rds.inst.buf.red,resources=valkeys,verbs=create;update,versions=v1alpha1,name=vvalkey-v1alpha1.kb.io,admissionReviewVersions=v1
// +kubebuilder:webhook:path=/validate-rds-valkey-buf-red-v1alpha1-valkey,mutating=false,failurePolicy=fail,sideEffects=None,groups=rds.valkey.buf.red,resources=valkeys,verbs=create;update,versions=v1alpha1,name=vvalkey-v1alpha1.kb.io,admissionReviewVersions=v1

// ValkeyCustomValidator struct is responsible for validating the inst resource
// when it is created, updated, or deleted.
Expand Down
Loading