diff --git a/charts/crane/Chart.yaml b/charts/crane/Chart.yaml index 7886bd7..1eff2c7 100644 --- a/charts/crane/Chart.yaml +++ b/charts/crane/Chart.yaml @@ -16,6 +16,6 @@ sources: type: application -version: 0.4.0 +version: 0.5.0 -appVersion: v0.4.0 \ No newline at end of file +appVersion: v0.5.0 \ No newline at end of file diff --git a/charts/crane/crds/analysis.crane.io_analytics.yaml b/charts/crane/crds/analysis.crane.io_analytics.yaml index 8d3f9fe..79a1224 100644 --- a/charts/crane/crds/analysis.crane.io_analytics.yaml +++ b/charts/crane/crds/analysis.crane.io_analytics.yaml @@ -57,6 +57,11 @@ spec: format: int64 type: integer type: object + config: + additionalProperties: + type: string + description: Override Recommendation configs + type: object resourceSelectors: description: ResourceSelector indicates how to select resources(e.g. a set of Deployments) for an Analytics. @@ -210,8 +215,8 @@ spec: format: date-time type: string recommendations: - description: Recommendations is a list of pointers to recommendations - that are updated by this analytics. + description: Recommendations is a list of RecommendationMission that + run parallel. items: properties: apiVersion: @@ -233,6 +238,14 @@ spec: kind: description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string + lastStartTime: + description: LastStartTime is last time we start a recommendation + mission. + format: date-time + type: string + message: + description: Message presents the running message for this mission + type: string name: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' type: string diff --git a/charts/crane/crds/autoscaling.crane.io_effectivehorizontalpodautoscalers.yaml b/charts/crane/crds/autoscaling.crane.io_effectivehorizontalpodautoscalers.yaml index 9b425d0..6cd43ec 100644 --- a/charts/crane/crds/autoscaling.crane.io_effectivehorizontalpodautoscalers.yaml +++ b/charts/crane/crds/autoscaling.crane.io_effectivehorizontalpodautoscalers.yaml @@ -785,6 +785,8 @@ spec: type: string sampleInterval: type: string + targetUtilization: + type: string type: object type: object predictionWindowSeconds: diff --git a/charts/crane/crds/ensurance.crane.io_avoidanceactions.yaml b/charts/crane/crds/ensurance.crane.io_avoidanceactions.yaml index 83d9abc..c1f3d0f 100644 --- a/charts/crane/crds/ensurance.crane.io_avoidanceactions.yaml +++ b/charts/crane/crds/ensurance.crane.io_avoidanceactions.yaml @@ -13,6 +13,8 @@ spec: kind: AvoidanceAction listKind: AvoidanceActionList plural: avoidanceactions + shortNames: + - avoid singular: avoidanceaction scope: Cluster versions: diff --git a/charts/crane/crds/ensurance.crane.io_nodeqosensurancepolicies.yaml b/charts/crane/crds/ensurance.crane.io_nodeqosensurancepolicies.yaml index 113cdda..e546abb 100644 --- a/charts/crane/crds/ensurance.crane.io_nodeqosensurancepolicies.yaml +++ b/charts/crane/crds/ensurance.crane.io_nodeqosensurancepolicies.yaml @@ -13,6 +13,8 @@ spec: kind: NodeQOSEnsurancePolicy listKind: NodeQOSEnsurancePolicyList plural: nodeqosensurancepolicies + shortNames: + - nep singular: nodeqosensurancepolicy scope: Cluster versions: @@ -95,7 +97,8 @@ spec: type: integer type: object timeoutSeconds: - description: TimeoutSeconds is the timeout for request + description: TimeoutSeconds is the timeout for request. Defaults + to 0, no timeout forever. format: int32 type: integer type: object diff --git a/charts/crane/crds/ensurance.crane.io_podqosensurancepolicies.yaml b/charts/crane/crds/ensurance.crane.io_podqosensurancepolicies.yaml index 443cb26..8c32945 100644 --- a/charts/crane/crds/ensurance.crane.io_podqosensurancepolicies.yaml +++ b/charts/crane/crds/ensurance.crane.io_podqosensurancepolicies.yaml @@ -13,6 +13,8 @@ spec: kind: PodQOSEnsurancePolicy listKind: PodQOSEnsurancePolicyList plural: podqosensurancepolicies + shortNames: + - qep singular: podqosensurancepolicy scope: Namespaced versions: @@ -182,12 +184,9 @@ spec: required: - port type: object - initialDelaySeconds: - description: Init delay time for handler Defaults to 5 - format: int32 - type: integer timeoutSeconds: - description: Timeout for request. Defaults to 0, instead not timeout + description: TimeoutSeconds is the timeout for request. Defaults + to 0, no timeout forever format: int32 type: integer type: object diff --git a/charts/crane/templates/craned-deployment.yaml b/charts/crane/templates/craned-deployment.yaml index 0a17461..a7528bf 100644 --- a/charts/crane/templates/craned-deployment.yaml +++ b/charts/crane/templates/craned-deployment.yaml @@ -121,18 +121,18 @@ data: - targets: [] properties: resource.cpu-request-percentile: "0.98" - ehpa.deployment-min-replicas: "1" - ehpa.statefulset-min-replicas: "1" - ehpa.workload-min-replicas: "1" - ehpa.pod-min-ready-seconds: "30" - ehpa.pod-available-ratio: "0.5" - ehpa.default-min-replicas: "2" - ehpa.max-replicas-factor: "3" - ehpa.min-cpu-usage-threshold: "10" - ehpa.fluctuation-threshold: "1.5" - ehpa.min-cpu-target-utilization: "30" - ehpa.max-cpu-target-utilization: "75" - ehpa.reference-hpa: "true" + replicas.workload-min-replicas: "3" + replicas.pod-min-ready-seconds: "30" + replicas.pod-available-ratio: "0.5" + replicas.default-min-replicas: "3" + replicas.max-replicas-factor: "3" + replicas.min-cpu-usage-threshold: "0.1" + replicas.fluctuation-threshold: "1.0" + replicas.min-cpu-target-utilization: "30" + replicas.max-cpu-target-utilization: "75" + replicas.cpu-target-utilization: "30" + replicas.cpu-percentile: "95" + replicas.reference-hpa: "true" {{ if .Values.cranedDashboard.enable }} --- diff --git a/integration/prometheus/override_values.yaml b/integration/prometheus/override_values.yaml index 8abbdf9..f61fc35 100644 --- a/integration/prometheus/override_values.yaml +++ b/integration/prometheus/override_values.yaml @@ -61,12 +61,20 @@ extraScrapeConfigs: |- metrics_path: /metrics static_configs: - targets: ['fadvisor.crane-system.svc.cluster.local:8081'] - - job_name: "craned" - honor_timestamps: true - scheme: http - metrics_path: /metrics - static_configs: - - targets: ['craned.crane-system.svc.cluster.local:8080'] + - job_name: crane + kubernetes_sd_configs: + - role: pod + relabel_configs: + - action: keep + regex: crane-system;craned-(.+) + source_labels: + - __meta_kubernetes_namespace + - __meta_kubernetes_pod_name + - source_labels: + - __address__ + regex: (.*) + replacement: "${1}:8080" + target_label: __address__ server: service: