mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 19:01:49 +00:00
Make API constants constant
This commit is contained in:
parent
001f2cd2b5
commit
030aab29a1
@ -100,7 +100,7 @@ type HorizontalPodAutoscalerSpec struct {
|
|||||||
// MetricSourceType indicates the type of metric.
|
// MetricSourceType indicates the type of metric.
|
||||||
type MetricSourceType string
|
type MetricSourceType string
|
||||||
|
|
||||||
var (
|
const (
|
||||||
// ObjectMetricSourceType is a metric describing a kubernetes object
|
// ObjectMetricSourceType is a metric describing a kubernetes object
|
||||||
// (for example, hits-per-second on an Ingress object).
|
// (for example, hits-per-second on an Ingress object).
|
||||||
ObjectMetricSourceType MetricSourceType = "Object"
|
ObjectMetricSourceType MetricSourceType = "Object"
|
||||||
@ -228,7 +228,7 @@ type MetricTarget struct {
|
|||||||
// "Value", "AverageValue", or "Utilization"
|
// "Value", "AverageValue", or "Utilization"
|
||||||
type MetricTargetType string
|
type MetricTargetType string
|
||||||
|
|
||||||
var (
|
const (
|
||||||
// UtilizationMetricType is a possible value for MetricTarget.Type.
|
// UtilizationMetricType is a possible value for MetricTarget.Type.
|
||||||
UtilizationMetricType MetricTargetType = "Utilization"
|
UtilizationMetricType MetricTargetType = "Utilization"
|
||||||
// ValueMetricType is a possible value for MetricTarget.Type.
|
// ValueMetricType is a possible value for MetricTarget.Type.
|
||||||
@ -282,7 +282,7 @@ const (
|
|||||||
// a HorizontalPodAutoscaler.
|
// a HorizontalPodAutoscaler.
|
||||||
type HorizontalPodAutoscalerConditionType string
|
type HorizontalPodAutoscalerConditionType string
|
||||||
|
|
||||||
var (
|
const (
|
||||||
// ScalingActive indicates that the HPA controller is able to scale if necessary:
|
// ScalingActive indicates that the HPA controller is able to scale if necessary:
|
||||||
// it's correctly configured, can fetch the desired metrics, and isn't disabled.
|
// it's correctly configured, can fetch the desired metrics, and isn't disabled.
|
||||||
ScalingActive HorizontalPodAutoscalerConditionType = "ScalingActive"
|
ScalingActive HorizontalPodAutoscalerConditionType = "ScalingActive"
|
||||||
|
@ -275,7 +275,7 @@ var AllowAllCapabilities api.Capability = "*"
|
|||||||
// FSType gives strong typing to different file systems that are used by volumes.
|
// FSType gives strong typing to different file systems that are used by volumes.
|
||||||
type FSType string
|
type FSType string
|
||||||
|
|
||||||
var (
|
const (
|
||||||
AzureFile FSType = "azureFile"
|
AzureFile FSType = "azureFile"
|
||||||
Flocker FSType = "flocker"
|
Flocker FSType = "flocker"
|
||||||
FlexVolume FSType = "flexVolume"
|
FlexVolume FSType = "flexVolume"
|
||||||
|
@ -151,7 +151,7 @@ type ScaleStatus struct {
|
|||||||
// MetricSourceType indicates the type of metric.
|
// MetricSourceType indicates the type of metric.
|
||||||
type MetricSourceType string
|
type MetricSourceType string
|
||||||
|
|
||||||
var (
|
const (
|
||||||
// ObjectMetricSourceType is a metric describing a kubernetes object
|
// ObjectMetricSourceType is a metric describing a kubernetes object
|
||||||
// (for example, hits-per-second on an Ingress object).
|
// (for example, hits-per-second on an Ingress object).
|
||||||
ObjectMetricSourceType MetricSourceType = "Object"
|
ObjectMetricSourceType MetricSourceType = "Object"
|
||||||
@ -322,7 +322,7 @@ type MetricStatus struct {
|
|||||||
// a HorizontalPodAutoscaler.
|
// a HorizontalPodAutoscaler.
|
||||||
type HorizontalPodAutoscalerConditionType string
|
type HorizontalPodAutoscalerConditionType string
|
||||||
|
|
||||||
var (
|
const (
|
||||||
// ScalingActive indicates that the HPA controller is able to scale if necessary:
|
// ScalingActive indicates that the HPA controller is able to scale if necessary:
|
||||||
// it's correctly configured, can fetch the desired metrics, and isn't disabled.
|
// it's correctly configured, can fetch the desired metrics, and isn't disabled.
|
||||||
ScalingActive HorizontalPodAutoscalerConditionType = "ScalingActive"
|
ScalingActive HorizontalPodAutoscalerConditionType = "ScalingActive"
|
||||||
|
@ -62,7 +62,7 @@ type HorizontalPodAutoscalerSpec struct {
|
|||||||
// MetricSourceType indicates the type of metric.
|
// MetricSourceType indicates the type of metric.
|
||||||
type MetricSourceType string
|
type MetricSourceType string
|
||||||
|
|
||||||
var (
|
const (
|
||||||
// ObjectMetricSourceType is a metric describing a kubernetes object
|
// ObjectMetricSourceType is a metric describing a kubernetes object
|
||||||
// (for example, hits-per-second on an Ingress object).
|
// (for example, hits-per-second on an Ingress object).
|
||||||
ObjectMetricSourceType MetricSourceType = "Object"
|
ObjectMetricSourceType MetricSourceType = "Object"
|
||||||
@ -231,7 +231,7 @@ type HorizontalPodAutoscalerStatus struct {
|
|||||||
// a HorizontalPodAutoscaler.
|
// a HorizontalPodAutoscaler.
|
||||||
type HorizontalPodAutoscalerConditionType string
|
type HorizontalPodAutoscalerConditionType string
|
||||||
|
|
||||||
var (
|
const (
|
||||||
// ScalingActive indicates that the HPA controller is able to scale if necessary:
|
// ScalingActive indicates that the HPA controller is able to scale if necessary:
|
||||||
// it's correctly configured, can fetch the desired metrics, and isn't disabled.
|
// it's correctly configured, can fetch the desired metrics, and isn't disabled.
|
||||||
ScalingActive HorizontalPodAutoscalerConditionType = "ScalingActive"
|
ScalingActive HorizontalPodAutoscalerConditionType = "ScalingActive"
|
||||||
|
@ -120,7 +120,7 @@ type MetricSpec struct {
|
|||||||
// MetricSourceType indicates the type of metric.
|
// MetricSourceType indicates the type of metric.
|
||||||
type MetricSourceType string
|
type MetricSourceType string
|
||||||
|
|
||||||
var (
|
const (
|
||||||
// ObjectMetricSourceType is a metric describing a kubernetes object
|
// ObjectMetricSourceType is a metric describing a kubernetes object
|
||||||
// (for example, hits-per-second on an Ingress object).
|
// (for example, hits-per-second on an Ingress object).
|
||||||
ObjectMetricSourceType MetricSourceType = "Object"
|
ObjectMetricSourceType MetricSourceType = "Object"
|
||||||
@ -221,7 +221,7 @@ type MetricTarget struct {
|
|||||||
// "Value", "AverageValue", or "Utilization"
|
// "Value", "AverageValue", or "Utilization"
|
||||||
type MetricTargetType string
|
type MetricTargetType string
|
||||||
|
|
||||||
var (
|
const (
|
||||||
// UtilizationMetricType declares a MetricTarget is an AverageUtilization value
|
// UtilizationMetricType declares a MetricTarget is an AverageUtilization value
|
||||||
UtilizationMetricType MetricTargetType = "Utilization"
|
UtilizationMetricType MetricTargetType = "Utilization"
|
||||||
// ValueMetricType declares a MetricTarget is a raw value
|
// ValueMetricType declares a MetricTarget is a raw value
|
||||||
@ -262,7 +262,7 @@ type HorizontalPodAutoscalerStatus struct {
|
|||||||
// a HorizontalPodAutoscaler.
|
// a HorizontalPodAutoscaler.
|
||||||
type HorizontalPodAutoscalerConditionType string
|
type HorizontalPodAutoscalerConditionType string
|
||||||
|
|
||||||
var (
|
const (
|
||||||
// ScalingActive indicates that the HPA controller is able to scale if necessary:
|
// ScalingActive indicates that the HPA controller is able to scale if necessary:
|
||||||
// it's correctly configured, can fetch the desired metrics, and isn't disabled.
|
// it's correctly configured, can fetch the desired metrics, and isn't disabled.
|
||||||
ScalingActive HorizontalPodAutoscalerConditionType = "ScalingActive"
|
ScalingActive HorizontalPodAutoscalerConditionType = "ScalingActive"
|
||||||
|
@ -985,7 +985,7 @@ type AllowedHostPath struct {
|
|||||||
// Deprecated: use FSType from policy API Group instead.
|
// Deprecated: use FSType from policy API Group instead.
|
||||||
type FSType string
|
type FSType string
|
||||||
|
|
||||||
var (
|
const (
|
||||||
AzureFile FSType = "azureFile"
|
AzureFile FSType = "azureFile"
|
||||||
Flocker FSType = "flocker"
|
Flocker FSType = "flocker"
|
||||||
FlexVolume FSType = "flexVolume"
|
FlexVolume FSType = "flexVolume"
|
||||||
|
@ -276,7 +276,7 @@ var AllowAllCapabilities v1.Capability = "*"
|
|||||||
// FSType gives strong typing to different file systems that are used by volumes.
|
// FSType gives strong typing to different file systems that are used by volumes.
|
||||||
type FSType string
|
type FSType string
|
||||||
|
|
||||||
var (
|
const (
|
||||||
AzureFile FSType = "azureFile"
|
AzureFile FSType = "azureFile"
|
||||||
Flocker FSType = "flocker"
|
Flocker FSType = "flocker"
|
||||||
FlexVolume FSType = "flexVolume"
|
FlexVolume FSType = "flexVolume"
|
||||||
|
Loading…
Reference in New Issue
Block a user