Skip to content

Commit

Permalink
Merge pull request #172 from vyzigold/add_autoscaling_prometheus
Browse files Browse the repository at this point in the history
Add autoscaling prometheus
  • Loading branch information
openshift-merge-robot authored Sep 11, 2023
2 parents d2c1073 + 2de8e38 commit 1c3d089
Show file tree
Hide file tree
Showing 27 changed files with 1,284 additions and 491 deletions.
9 changes: 9 additions & 0 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,13 @@ resources:
defaulting: true
validation: true
webhookVersion: v1
- api:
crdVersion: v1
namespaced: true
controller: true
domain: openstack.org
group: telemetry
kind: Autoscaling
path: github.com/openstack-k8s-operators/telemetry-operator/api/v1beta1
version: v1beta1
version: "3"
122 changes: 122 additions & 0 deletions api/bases/telemetry.openstack.org_autoscalings.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.11.3
creationTimestamp: null
name: autoscalings.telemetry.openstack.org
spec:
group: telemetry.openstack.org
names:
kind: Autoscaling
listKind: AutoscalingList
plural: autoscalings
singular: autoscaling
scope: Namespaced
versions:
- name: v1beta1
schema:
openAPIV3Schema:
description: Autoscaling is the Schema for the autoscalings API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: AutoscalingSpec defines the desired state of Autoscaling
properties:
enabled:
default: false
description: Allows enabling and disabling the autoscaling feature
type: boolean
prometheus:
description: Specification of which prometheus to use for autoscaling
properties:
deployPrometheus:
default: true
description: Enables the deployment of autoscaling prometheus
type: boolean
host:
description: Host of user deployed prometheus if deployPrometheus
is set to false
type: string
port:
description: Port of user deployed prometheus if deployPrometheus
is set to false
format: int32
maximum: 65535
minimum: 1
type: integer
type: object
type: object
status:
description: AutoscalingStatus defines the observed state of Autoscaling
properties:
conditions:
description: Conditions
items:
description: Condition defines an observation of a API resource
operational state.
properties:
lastTransitionTime:
description: Last time the condition transitioned from one status
to another. This should be when the underlying condition changed.
If that is not known, then using the time when the API field
changed is acceptable.
format: date-time
type: string
message:
description: A human readable message indicating details about
the transition.
type: string
reason:
description: The reason for the condition's last transition
in CamelCase.
type: string
severity:
description: Severity provides a classification of Reason code,
so the current situation is immediately understandable and
could act accordingly. It is meant for situations where Status=False
and it should be indicated if it is just informational, warning
(next reconciliation might fix it) or an error (e.g. DB create
issue and no actions to automatically resolve the issue can/should
be done). For conditions where Status=Unknown or Status=True
the Severity should be SeverityNone.
type: string
status:
description: Status of the condition, one of True, False, Unknown.
type: string
type:
description: Type of condition in CamelCase.
type: string
required:
- lastTransitionTime
- status
- type
type: object
type: array
hash:
additionalProperties:
type: string
description: Map of hashes to track e.g. job status
type: object
readyCount:
description: ReadyCount of autoscaling instances
format: int32
type: integer
type: object
type: object
served: true
storage: true
subresources:
status: {}
33 changes: 33 additions & 0 deletions api/bases/telemetry.openstack.org_telemetries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,34 @@ spec:
spec:
description: TelemetrySpec defines the desired state of Telemetry
properties:
autoscaling:
description: Autoscaling - Spec definition for the Autoscaling service
of this Telemetry deployment
properties:
enabled:
default: false
description: Allows enabling and disabling the autoscaling feature
type: boolean
prometheus:
description: Specification of which prometheus to use for autoscaling
properties:
deployPrometheus:
default: true
description: Enables the deployment of autoscaling prometheus
type: boolean
host:
description: Host of user deployed prometheus if deployPrometheus
is set to false
type: string
port:
description: Port of user deployed prometheus if deployPrometheus
is set to false
format: int32
maximum: 65535
minimum: 1
type: integer
type: object
type: object
ceilometerCentral:
description: CeilometerCentral - Spec definition for the CeilometerCentral
service of this Telemetry deployment
Expand Down Expand Up @@ -208,13 +236,18 @@ spec:
- nodeExporterImage
type: object
required:
- autoscaling
- ceilometerCentral
- ceilometerCompute
- infraCompute
type: object
status:
description: TelemetryStatus defines the observed state of Telemetry
properties:
autoscalingReadyCount:
description: ReadyCount of Autoscaling instance
format: int32
type: integer
ceilometerCentralReadyCount:
description: ReadyCount of CeilometerCentral instance
format: int32
Expand Down
27 changes: 13 additions & 14 deletions api/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ require (
require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.10.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/emicklei/go-restful/v3 v3.10.2 // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-logr/zapr v1.2.3 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.1 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/go-openapi/jsonpointer v0.20.0 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.4 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
Expand All @@ -42,33 +42,32 @@ require (
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_golang v1.14.0 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
github.com/prometheus/client_golang v1.16.0 // indirect
github.com/prometheus/client_model v0.4.0 // indirect
github.com/prometheus/common v0.44.0 // indirect
github.com/prometheus/procfs v0.11.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/testify v1.8.2 // indirect
go.uber.org/multierr v1.10.0 // indirect
go.uber.org/zap v1.25.0 // indirect
golang.org/x/net v0.14.0 // indirect
golang.org/x/oauth2 v0.4.0 // indirect
golang.org/x/oauth2 v0.10.0 // indirect
golang.org/x/sys v0.11.0 // indirect
golang.org/x/term v0.11.0 // indirect
golang.org/x/text v0.12.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.12.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.1 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.26.8 // indirect
k8s.io/component-base v0.26.8 // indirect
k8s.io/klog/v2 v2.100.1 // indirect
k8s.io/kube-openapi v0.0.0-20230308215209-15aac26d736a // indirect
k8s.io/kube-openapi v0.0.0-20230525220651-2546d827e515 // indirect
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)
Loading

0 comments on commit 1c3d089

Please sign in to comment.