Skip to content

Commit

Permalink
update deps
Browse files Browse the repository at this point in the history
Signed-off-by: obaydullahmhs <[email protected]>
  • Loading branch information
obaydullahmhs committed Jul 29, 2024
1 parent 0b33f1b commit 573ab0c
Show file tree
Hide file tree
Showing 11 changed files with 1,933 additions and 645 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ require (
k8s.io/klog/v2 v2.130.1
kmodules.xyz/client-go v0.30.9
kmodules.xyz/custom-resources v0.30.0
kubedb.dev/apimachinery v0.47.0-rc.1.0.20240724064030-19f1e31108e1
kubedb.dev/apimachinery v0.47.0-rc.1.0.20240726122410-88b60875b260
sigs.k8s.io/controller-runtime v0.18.4
xorm.io/xorm v1.3.6
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -773,8 +773,8 @@ kmodules.xyz/monitoring-agent-api v0.29.0 h1:gpFl6OZrlMLb/ySMHdREI9EwGtnJ91oZBn9
kmodules.xyz/monitoring-agent-api v0.29.0/go.mod h1:iNbvaMTgVFOI5q2LJtGK91j4Dmjv4ZRiRdasGmWLKQI=
kmodules.xyz/offshoot-api v0.30.0 h1:dq9F93pu4Q8rL9oTcCk+vGGy8vpS7RNt0GSwx7Bvhec=
kmodules.xyz/offshoot-api v0.30.0/go.mod h1:o9VoA3ImZMDBp3lpLb8+kc2d/KBxioRwCpaKDfLIyDw=
kubedb.dev/apimachinery v0.47.0-rc.1.0.20240724064030-19f1e31108e1 h1:q8Yyj66o73tXc3yzDW8oDGfvKlkkc3zHSXtm9tHai20=
kubedb.dev/apimachinery v0.47.0-rc.1.0.20240724064030-19f1e31108e1/go.mod h1:Gs/kwdVYmGjJmYmvCUNDmNbbprXqi/gbSj/JrsoM9sE=
kubedb.dev/apimachinery v0.47.0-rc.1.0.20240726122410-88b60875b260 h1:VE1jdrxBkuwzqVWMafV45sUQHlIBbnO/YrHiOlwHHcA=
kubedb.dev/apimachinery v0.47.0-rc.1.0.20240726122410-88b60875b260/go.mod h1:Gs/kwdVYmGjJmYmvCUNDmNbbprXqi/gbSj/JrsoM9sE=
kubeops.dev/petset v0.0.6 h1:0IbvxD9fadZfH+3iMZWzN6ZHsO0vX458JlioamwyPKQ=
kubeops.dev/petset v0.0.6/go.mod h1:A15vh0r979NsvL65DTIZKWsa/NoX9VapHBAEw1ZsdYI=
lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,7 @@ func (k *RestProxy) ValidateCreate() (admission.Warnings, error) {
// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
func (k *RestProxy) ValidateUpdate(old runtime.Object) (admission.Warnings, error) {
restproxylog.Info("validate update", "name", k.Name)

oldRegistry := old.(*RestProxy)
allErr := k.ValidateCreateOrUpdate()

if *oldRegistry.Spec.Replicas == 1 && *k.Spec.Replicas > 1 {
allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("replicas"),
k.Name,
"Cannot scale up from 1 to more than 1 in standalone mode"))
}

if len(allErr) == 0 {
return nil, nil
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,345 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
app.kubernetes.io/name: kubedb
name: clickhouseautoscalers.autoscaling.kubedb.com
spec:
group: autoscaling.kubedb.com
names:
categories:
- datastore
- kubedb
- appscode
kind: ClickHouseAutoscaler
listKind: ClickHouseAutoscalerList
plural: clickhouseautoscalers
shortNames:
- chscaler
singular: clickhouseautoscaler
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
properties:
apiVersion:
type: string
kind:
type: string
metadata:
type: object
spec:
properties:
compute:
properties:
clickhouse:
properties:
containerControlledValues:
enum:
- RequestsAndLimits
- RequestsOnly
type: string
controlledResources:
items:
type: string
type: array
inMemoryStorage:
properties:
scalingFactorPercentage:
format: int32
type: integer
usageThresholdPercentage:
format: int32
type: integer
type: object
maxAllowed:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type: object
minAllowed:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type: object
podLifeTimeThreshold:
type: string
resourceDiffPercentage:
format: int32
type: integer
trigger:
type: string
type: object
nodeTopology:
properties:
name:
type: string
scaleDownDiffPercentage:
default: 25
format: int32
type: integer
scaleUpDiffPercentage:
default: 15
format: int32
type: integer
type: object
type: object
databaseRef:
properties:
name:
default: ""
type: string
type: object
x-kubernetes-map-type: atomic
opsRequestOptions:
properties:
apply:
default: IfReady
enum:
- IfReady
- Always
type: string
timeout:
type: string
type: object
storage:
properties:
clickhouse:
properties:
expansionMode:
enum:
- Offline
- Online
type: string
scalingRules:
items:
properties:
appliesUpto:
type: string
threshold:
type: string
required:
- appliesUpto
- threshold
type: object
type: array
scalingThreshold:
format: int32
type: integer
trigger:
type: string
upperBound:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
usageThreshold:
format: int32
type: integer
required:
- expansionMode
type: object
type: object
required:
- databaseRef
type: object
status:
properties:
checkpoints:
items:
properties:
cpuHistogram:
properties:
bucketWeights:
items:
properties:
index:
type: integer
weight:
format: int32
type: integer
required:
- index
- weight
type: object
type: array
x-kubernetes-preserve-unknown-fields: true
referenceTimestamp:
format: date-time
nullable: true
type: string
totalWeight:
format: double
type: number
type: object
firstSampleStart:
format: date-time
nullable: true
type: string
lastSampleStart:
format: date-time
nullable: true
type: string
lastUpdateTime:
format: date-time
nullable: true
type: string
memoryHistogram:
properties:
bucketWeights:
items:
properties:
index:
type: integer
weight:
format: int32
type: integer
required:
- index
- weight
type: object
type: array
x-kubernetes-preserve-unknown-fields: true
referenceTimestamp:
format: date-time
nullable: true
type: string
totalWeight:
format: double
type: number
type: object
ref:
properties:
containerName:
type: string
vpaObjectName:
type: string
type: object
totalSamplesCount:
type: integer
version:
type: string
type: object
type: array
conditions:
items:
properties:
lastTransitionTime:
format: date-time
type: string
message:
type: string
observedGeneration:
format: int64
type: integer
reason:
type: string
severity:
type: string
status:
type: string
type:
type: string
required:
- lastTransitionTime
- status
- type
type: object
type: array
observedGeneration:
format: int64
type: integer
phase:
enum:
- InProgress
- Current
- Terminating
- Failed
type: string
vpas:
items:
properties:
conditions:
items:
properties:
lastTransitionTime:
format: date-time
type: string
message:
type: string
reason:
type: string
status:
type: string
type:
type: string
required:
- status
- type
type: object
type: array
recommendation:
properties:
containerRecommendations:
items:
properties:
containerName:
type: string
lowerBound:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type: object
target:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type: object
uncappedTarget:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type: object
upperBound:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type: object
required:
- target
type: object
type: array
type: object
vpaName:
type: string
type: object
type: array
type: object
required:
- spec
type: object
served: true
storage: true
subresources:
status: {}
Loading

0 comments on commit 573ab0c

Please sign in to comment.