Skip to content

Commit

Permalink
Add recommendation-resync-period flag (#526)
Browse files Browse the repository at this point in the history
Co-authored-by: Tamal Saha <[email protected]>
Signed-off-by: Pulak Kanti Bhowmick <[email protected]>
  • Loading branch information
pkbhowmick and tamalsaha authored Aug 16, 2022
1 parent a93ca42 commit e3a0afd
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 6 deletions.
7 changes: 4 additions & 3 deletions apis/installer/v1alpha1/kubedb_ops_manager_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ type KubedbOpsManagerList struct {
}

type RecommendationEngineConfig struct {
GenRotateTLSRecommendationBeforeExpiryYear int `json:"genRotateTLSRecommendationBeforeExpiryYear"`
GenRotateTLSRecommendationBeforeExpiryMonth int `json:"genRotateTLSRecommendationBeforeExpiryMonth"`
GenRotateTLSRecommendationBeforeExpiryDay int `json:"genRotateTLSRecommendationBeforeExpiryDay"`
RecommendationResyncPeriod metav1.Duration `json:"recommendationResyncPeriod"`
GenRotateTLSRecommendationBeforeExpiryYear int `json:"genRotateTLSRecommendationBeforeExpiryYear"`
GenRotateTLSRecommendationBeforeExpiryMonth int `json:"genRotateTLSRecommendationBeforeExpiryMonth"`
GenRotateTLSRecommendationBeforeExpiryDay int `json:"genRotateTLSRecommendationBeforeExpiryDay"`
}
1 change: 1 addition & 0 deletions apis/installer/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion charts/kubedb-ops-manager/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
description: KubeDB Ops Manager by AppsCode - Enterprise features for KubeDB
name: kubedb-ops-manager
version: v0.15.0
appVersion: v0.15.1
appVersion: v0.15.2
home: https://kubedb.com
icon: https://cdn.appscode.com/images/products/kubedb/kubedb-ops-manager-icon.png
sources:
Expand Down
1 change: 1 addition & 0 deletions charts/kubedb-ops-manager/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ The following table lists the configurable parameters of the `kubedb-ops-manager
| monitoring.bindPort | The port the metric endpoint binds to | <code>8080</code> |
| monitoring.agent | Name of monitoring agent (one of "prometheus.io", "prometheus.io/operator", "prometheus.io/builtin") | <code>""</code> |
| monitoring.serviceMonitor.labels | Specify the labels for ServiceMonitor. Prometheus crd will select ServiceMonitor using these labels. Only usable when monitoring agent is `prometheus.io/operator`. | <code>{}</code> |
| recommendationEngine.recommendationResyncPeriod | Recommendation will be generated after every given duration based on the resource status at that moment. Default value is one hour. The flag accepts a integer 64 bit value in nanosecond for time.Duration. Ref: https://pkg.go.dev/time#Duration | <code>1h0m0s</code> |
| recommendationEngine.genRotateTLSRecommendationBeforeExpiryYear | Rotate TLS recommendation will be generated before given year of expiration. It also depends on gen-rotate-tls-recommendation-before-expiry-month and gen-rotate-tls-recommendation-before-expiry-year. Default values are 0(zero) for gen-rotate-tls-recommendation-before-expiry-year, 1(one) for gen-rotate-tls-recommendation-before-expiry-month, 0(zero) for gen-rotate-tls-recommendation-before-expiry-day flags. | <code>0</code> |
| recommendationEngine.genRotateTLSRecommendationBeforeExpiryMonth | Rotate TLS recommendation will be generated before given month of expiration. It also depends on gen-rotate-tls-recommendation-before-expiry-year and gen-rotate-tls-recommendation-before-expiry-day flag. By default it is set as 1(one). | <code>1</code> |
| recommendationEngine.genRotateTLSRecommendationBeforeExpiryDay | Rotate TLS recommendation will be generated before given day of expiration. It also depends on gen-rotate-tls-recommendation-before-expiry-year and gen-rotate-tls-recommendation-before-expiry-month flag. By default it is set as 0(zero). | <code>0</code> |
Expand Down
1 change: 1 addition & 0 deletions charts/kubedb-ops-manager/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ spec:
- --metrics-bind-address=:{{ .Values.monitoring.bindPort }}
- --health-probe-bind-address=:{{ .Values.apiserver.healthcheck.probePort }}
{{- with .Values.recommendationEngine }}
- --recommendation-resync-period={{ .recommendationResyncPeriod }}
- --gen-rotate-tls-recommendation-before-expiry-year={{ .genRotateTLSRecommendationBeforeExpiryYear }}
- --gen-rotate-tls-recommendation-before-expiry-month={{ .genRotateTLSRecommendationBeforeExpiryMonth }}
- --gen-rotate-tls-recommendation-before-expiry-day={{ .genRotateTLSRecommendationBeforeExpiryDay }}
Expand Down
3 changes: 3 additions & 0 deletions charts/kubedb-ops-manager/values.openapiv3_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1159,10 +1159,13 @@ properties:
type: integer
genRotateTLSRecommendationBeforeExpiryYear:
type: integer
recommendationResyncPeriod:
type: string
required:
- genRotateTLSRecommendationBeforeExpiryDay
- genRotateTLSRecommendationBeforeExpiryMonth
- genRotateTLSRecommendationBeforeExpiryYear
- recommendationResyncPeriod
type: object
registryFQDN:
type: string
Expand Down
4 changes: 4 additions & 0 deletions charts/kubedb-ops-manager/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ monitoring:
# Only usable when monitoring agent is `prometheus.io/operator`.
labels: {}
recommendationEngine:
# Recommendation will be generated after every given duration based on the resource status at that moment.
# Default value is one hour.
# The flag accepts a integer 64 bit value in nanosecond for time.Duration. Ref: https://pkg.go.dev/time#Duration
recommendationResyncPeriod: 1h0m0s
# Rotate TLS recommendation will be generated before given year of expiration.
# It also depends on gen-rotate-tls-recommendation-before-expiry-month and gen-rotate-tls-recommendation-before-expiry-year.
# Default values are 0(zero) for gen-rotate-tls-recommendation-before-expiry-year, 1(one) for gen-rotate-tls-recommendation-before-expiry-month,
Expand Down
2 changes: 1 addition & 1 deletion charts/kubedb-provisioner/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
description: KubeDB Provisioner by AppsCode - Community features for KubeDB
name: kubedb-provisioner
version: v0.28.0
appVersion: v0.28.1
appVersion: v0.28.2
home: https://kubedb.com
icon: https://cdn.appscode.com/images/products/kubedb/kubedb-community-icon.png
sources:
Expand Down
2 changes: 1 addition & 1 deletion charts/kubedb-webhook-server/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
description: KubeDB Webhook Server by AppsCode
name: kubedb-webhook-server
version: v0.4.0
appVersion: v0.4.1
appVersion: v0.4.2
home: https://kubedb.com
icon: https://cdn.appscode.com/images/products/kubedb/kubedb-community-icon.png
sources:
Expand Down
3 changes: 3 additions & 0 deletions charts/kubedb/values.openapiv3_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3928,10 +3928,13 @@ properties:
type: integer
genRotateTLSRecommendationBeforeExpiryYear:
type: integer
recommendationResyncPeriod:
type: string
required:
- genRotateTLSRecommendationBeforeExpiryDay
- genRotateTLSRecommendationBeforeExpiryMonth
- genRotateTLSRecommendationBeforeExpiryYear
- recommendationResyncPeriod
type: object
registryFQDN:
type: string
Expand Down

0 comments on commit e3a0afd

Please sign in to comment.