CronFederatedHPA v1alpha1

apiVersion: autoscaling.karmada.io/v1alpha1

import "github.com/karmada-io/karmada/pkg/apis/autoscaling/v1alpha1"

CronFederatedHPA

CronFederatedHPA represents a collection of repeating schedule to scale replica number of a specific workload. It can scale any resource implementing the scale subresource as well as FederatedHPA.


  • apiVersion: autoscaling.karmada.io/v1alpha1

  • kind: CronFederatedHPA

  • metadata (ObjectMeta)

  • spec (CronFederatedHPASpec), required

    Spec is the specification of the CronFederatedHPA.

  • status (CronFederatedHPAStatus)

    Status is the current status of the CronFederatedHPA.

CronFederatedHPASpec

CronFederatedHPASpec is the specification of the CronFederatedHPA.


  • rules ([]CronFederatedHPARule), required

    Rules contains a collection of schedules that declares when and how the referencing target resource should be scaled.

    CronFederatedHPARule declares a schedule as well as scale actions.

    • rules.name (string), required

      Name of the rule. Each rule in a CronFederatedHPA must have a unique name.

      Note: the name will be used as an identifier to record its execution history. Changing the name will be considered as deleting the old rule and adding a new rule, that means the original execution history will be discarded.

    • rules.schedule (string), required

      Schedule is the cron expression that represents a periodical time. The syntax follows https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#schedule-syntax.

    • rules.failedHistoryLimit (int32)

      FailedHistoryLimit represents the count of failed execution items for each rule. The value must be a positive integer. It defaults to 3.

    • rules.successfulHistoryLimit (int32)

      SuccessfulHistoryLimit represents the count of successful execution items for each rule. The value must be a positive integer. It defaults to 3.

    • rules.suspend (boolean)

      Suspend tells the controller to suspend subsequent executions. Defaults to false.

    • rules.targetMaxReplicas (int32)

      TargetMaxReplicas is the target MaxReplicas to be set for FederatedHPA. Only needed when referencing resource is FederatedHPA. TargetMinReplicas and TargetMaxReplicas can be specified together or either one can be specified alone. nil means the MaxReplicas(.spec.maxReplicas) of the referencing FederatedHPA will not be updated.

    • rules.targetMinReplicas (int32)

      TargetMinReplicas is the target MinReplicas to be set for FederatedHPA. Only needed when referencing resource is FederatedHPA. TargetMinReplicas and TargetMaxReplicas can be specified together or either one can be specified alone. nil means the MinReplicas(.spec.minReplicas) of the referencing FederatedHPA will not be updated.

    • rules.targetReplicas (int32)

      TargetReplicas is the target replicas to be scaled for resources referencing by ScaleTargetRef of this CronFederatedHPA. Only needed when referencing resource is not FederatedHPA.

    • rules.timeZone (string)

      TimeZone for the giving schedule. If not specified, this will default to the time zone of the karmada-controller-manager process. Invalid TimeZone will be rejected when applying by karmada-webhook. see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for the all timezones.

  • scaleTargetRef (CrossVersionObjectReference), required

    ScaleTargetRef points to the target resource to scale. Target resource could be any resource that implementing the scale subresource like Deployment, or FederatedHPA.

    CrossVersionObjectReference contains enough information to let you identify the referred resource.

CronFederatedHPAStatus

CronFederatedHPAStatus represents the current status of a CronFederatedHPA.


  • executionHistories ([]ExecutionHistory)

    ExecutionHistories record the execution histories of CronFederatedHPARule.

    ExecutionHistory records the execution history of specific CronFederatedHPARule.

    • executionHistories.ruleName (string), required

      RuleName is the name of the CronFederatedHPARule.

    • executionHistories.failedExecutions ([]FailedExecution)

      FailedExecutions records failed executions.

      FailedExecution records a failed execution.

      • executionHistories.failedExecutions.executionTime (Time), required

        ExecutionTime is the actual execution time of CronFederatedHPARule. Tasks may not always be executed at ScheduleTime. ExecutionTime is used to evaluate the efficiency of the controller’s execution.

        Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.

      • executionHistories.failedExecutions.message (string), required

        Message is the human-readable message indicating details about the failure.

      • executionHistories.failedExecutions.scheduleTime (Time), required

        ScheduleTime is the expected execution time declared in CronFederatedHPARule.

        Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.

    • executionHistories.nextExecutionTime (Time)

      NextExecutionTime is the next time to execute. Nil means the rule has been suspended.

      Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.

    • executionHistories.successfulExecutions ([]SuccessfulExecution)

      SuccessfulExecutions records successful executions.

      SuccessfulExecution records a successful execution.

      • executionHistories.successfulExecutions.executionTime (Time), required

        ExecutionTime is the actual execution time of CronFederatedHPARule. Tasks may not always be executed at ScheduleTime. ExecutionTime is used to evaluate the efficiency of the controller’s execution.

        Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.

      • executionHistories.successfulExecutions.scheduleTime (Time), required

        ScheduleTime is the expected execution time declared in CronFederatedHPARule.

        Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.

      • executionHistories.successfulExecutions.appliedMaxReplicas (int32)

        AppliedMaxReplicas is the MaxReplicas have been applied. It is required if .spec.rules[*].targetMaxReplicas is not empty.

      • executionHistories.successfulExecutions.appliedMinReplicas (int32)

        AppliedMinReplicas is the MinReplicas have been applied. It is required if .spec.rules[*].targetMinReplicas is not empty.

      • executionHistories.successfulExecutions.appliedReplicas (int32)

        AppliedReplicas is the replicas have been applied. It is required if .spec.rules[*].targetReplicas is not empty.

CronFederatedHPAList

CronFederatedHPAList contains a list of CronFederatedHPA.


  • apiVersion: autoscaling.karmada.io/v1alpha1

  • kind: CronFederatedHPAList

  • metadata (ListMeta)

  • items ([][CronFederatedHPA](../auto-scaling-resources/cron-federated-hpa-v1alpha1#cronfederatedhpa)), required

Operations


get read the specified CronFederatedHPA

HTTP Request

GET /apis/autoscaling.karmada.io/v1alpha1/namespaces/{namespace}/cronfederatedhpas/{name}

Parameters

  • name (in path): string, required

    name of the CronFederatedHPA

  • namespace (in path): string, required

    namespace

  • pretty (in query): string

    pretty

Response

200 (CronFederatedHPA): OK

get read status of the specified CronFederatedHPA

HTTP Request

GET /apis/autoscaling.karmada.io/v1alpha1/namespaces/{namespace}/cronfederatedhpas/{name}/status

Parameters

  • name (in path): string, required

    name of the CronFederatedHPA

  • namespace (in path): string, required

    namespace

  • pretty (in query): string

    pretty

Response

200 (CronFederatedHPA): OK

list list or watch objects of kind CronFederatedHPA

HTTP Request

GET /apis/autoscaling.karmada.io/v1alpha1/namespaces/{namespace}/cronfederatedhpas

Parameters

Response

200 (CronFederatedHPAList): OK

list list or watch objects of kind CronFederatedHPA

HTTP Request

GET /apis/autoscaling.karmada.io/v1alpha1/cronfederatedhpas

Parameters

Response

200 (CronFederatedHPAList): OK

create create a CronFederatedHPA

HTTP Request

POST /apis/autoscaling.karmada.io/v1alpha1/namespaces/{namespace}/cronfederatedhpas

Parameters

Response

200 (CronFederatedHPA): OK

201 (CronFederatedHPA): Created

202 (CronFederatedHPA): Accepted

update replace the specified CronFederatedHPA

HTTP Request

PUT /apis/autoscaling.karmada.io/v1alpha1/namespaces/{namespace}/cronfederatedhpas/{name}

Parameters

Response

200 (CronFederatedHPA): OK

201 (CronFederatedHPA): Created

update replace status of the specified CronFederatedHPA

HTTP Request

PUT /apis/autoscaling.karmada.io/v1alpha1/namespaces/{namespace}/cronfederatedhpas/{name}/status

Parameters

Response

200 (CronFederatedHPA): OK

201 (CronFederatedHPA): Created

patch partially update the specified CronFederatedHPA

HTTP Request

PATCH /apis/autoscaling.karmada.io/v1alpha1/namespaces/{namespace}/cronfederatedhpas/{name}

Parameters

  • name (in path): string, required

    name of the CronFederatedHPA

  • namespace (in path): string, required

    namespace

  • body: Patch, required

  • dryRun (in query): string

    dryRun

  • fieldManager (in query): string

    fieldManager

  • fieldValidation (in query): string

    fieldValidation

  • force (in query): boolean

    force

  • pretty (in query): string

    pretty

Response

200 (CronFederatedHPA): OK

201 (CronFederatedHPA): Created

patch partially update status of the specified CronFederatedHPA

HTTP Request

PATCH /apis/autoscaling.karmada.io/v1alpha1/namespaces/{namespace}/cronfederatedhpas/{name}/status

Parameters

  • name (in path): string, required

    name of the CronFederatedHPA

  • namespace (in path): string, required

    namespace

  • body: Patch, required

  • dryRun (in query): string

    dryRun

  • fieldManager (in query): string

    fieldManager

  • fieldValidation (in query): string

    fieldValidation

  • force (in query): boolean

    force

  • pretty (in query): string

    pretty

Response

200 (CronFederatedHPA): OK

201 (CronFederatedHPA): Created

delete delete a CronFederatedHPA

HTTP Request

DELETE /apis/autoscaling.karmada.io/v1alpha1/namespaces/{namespace}/cronfederatedhpas/{name}

Parameters

Response

200 (Status): OK

202 (Status): Accepted

deletecollection delete collection of CronFederatedHPA

HTTP Request

DELETE /apis/autoscaling.karmada.io/v1alpha1/namespaces/{namespace}/cronfederatedhpas

Parameters

Response

200 (Status): OK