Skip to content

Commit

Permalink
Merge pull request #1455 from kubecost/v1.94-patch/cluster-controller…
Browse files Browse the repository at this point in the history
…-v0.1.0

V1.94 patch/cluster controller v0.1.0
  • Loading branch information
michaelmdresser authored Jun 2, 2022
2 parents e748234 + 0e90e44 commit 12f9c0e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 79 deletions.
106 changes: 28 additions & 78 deletions cost-analyzer/templates/kubecost-cluster-controller-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ metadata:
app: {{ template "kubecost.clusterControllerName" . }}
rules:
- apiGroups:
- kubecost.k8s.io
- kubecost.com
resources:
- turndownschedules
- turndownschedules/status
Expand Down Expand Up @@ -247,106 +247,56 @@ spec:
app: {{ template "kubecost.clusterControllerName" . }}
---
# TurndownSchedule Custom Resource Definition for persistence
{{- if .Capabilities.APIVersions.Has "apiextensions.k8s.io/v1" }}
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: turndownschedules.kubecost.k8s.io
name: turndownschedules.kubecost.com
labels:
{{ include "cost-analyzer.commonLabels" . | nindent 4 }}
spec:
group: kubecost.k8s.io
group: kubecost.com
names:
kind: TurndownSchedule
singular: turndownschedule
plural: turndownschedules
shortNames:
- td
- tds
scope: Cluster
versions:
- name: v1alpha1
served: true
storage: true
subresources:
status: {}
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
start:
start:
type: string
format: date-time
end:
type: string
format: date-time
repeat:
repeat:
type: string
enum: [none, daily, weekly]
subresources:
status: {}
additionalPrinterColumns:
- name: State
type: string
description: The state of the turndownschedule
jsonPath: .status.state
- name: Next Turndown
type: string
description: The next turndown date-time
jsonPath: .status.nextScaleDownTime
- name: Next Turn Up
type: string
description: The next turn up date-time
jsonPath: .status.nextScaleUpTime
names:
kind: TurndownSchedule
singular: turndownschedule
plural: turndownschedules
shortNames:
- td
- tds
scope: Cluster
{{ else }}
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: turndownschedules.kubecost.k8s.io
labels:
{{ include "cost-analyzer.commonLabels" . | nindent 4 }}
spec:
group: kubecost.k8s.io
version: v1alpha1
names:
kind: TurndownSchedule
singular: turndownschedule
plural: turndownschedules
shortNames:
- td
- tds
scope: Cluster
subresources:
status: {}
validation:
openAPIV3Schema:
properties:
spec:
type: object
properties:
start:
type: string
format: date-time
end:
type: string
format: date-time
repeat:
type: string
enum: [none, daily, weekly]
additionalPrinterColumns:
- name: State
type: string
description: The state of the turndownschedule
JSONPath: .status.state
- name: Next Turndown
type: string
description: The next turndown date-time
JSONPath: .status.nextScaleDownTime
- name: Next Turn Up
type: string
description: The next turn up date-time
JSONPath: .status.nextScaleUpTime
{{ end -}}

- name: State
type: string
description: The state of the turndownschedule
jsonPath: .status.state
- name: Next Turndown
type: string
description: The next turndown date-time
jsonPath: .status.nextScaleDownTime
- name: Next Turn Up
type: string
description: The next turn up date-time
jsonPath: .status.nextScaleUpTime
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion cost-analyzer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ kubecostDeployment:
# Kubecost Cluster Controller for Right Sizing and Cluster Turndown
clusterController:
enabled: false
image: gcr.io/kubecost1/cluster-controller:v0.0.6
image: gcr.io/kubecost1/cluster-controller:v0.1.0
imagePullPolicy: Always
# fqdn: kubecost-cluster-controller.kubecost.svc.cluster.local:9731

Expand Down

0 comments on commit 12f9c0e

Please sign in to comment.