Skip to content

Commit

Permalink
Improve status conditions (julienschmidt#47)
Browse files Browse the repository at this point in the history
* Improve status conditions

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* refactoring typed Kubernetes clients out

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>

* finishing delete logic

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>

* removing now-unused code

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>

* removing commented unused code

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>

* fixing lint error

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>

* Delete test file

PR julienschmidt#43 will address it

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Update deployment client

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Update scaled object client

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Add fix notation

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Move FIX to TODO

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Add context to requestCounts

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Adding an FAQ (julienschmidt#71)

Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com>

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
Sign-off-executed-by: Lucas Santos <lhs.santoss@gmail.com>
Approved-at: Aaron Schlesinger <aaron@ecomaz.net>

* Remove unused code

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Use two strings as opposed to interface

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Revert "Delete test file"

This reverts commit 46f4de7c0bf59ea9aa8d9a345762ccb8b652ea33.

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>
Sign-off-executed-by: Lucas Santos <lhs.santoss@gmail.com>
Approved-at: Aaron Schlesinger <aaron@ecomaz.net>

* Restore pkg/k8s/client.go

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>
Sign-off-executed-by: Lucas Santos <lhs.santoss@gmail.com>
Approved-at: Aaron Schlesinger <aaron@ecomaz.net>

* Add context to queue pinger

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Adding an FAQ (julienschmidt#71)

Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com>

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
Sign-off-executed-by: Lucas Santos <lhs.santoss@gmail.com>
Approved-at: Aaron Schlesinger <aaron@ecomaz.net>

* Revert "Delete test file"

This reverts commit 46f4de7c0bf59ea9aa8d9a345762ccb8b652ea33.

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>
Sign-off-executed-by: Lucas Santos <lhs.santoss@gmail.com>
Approved-at: Aaron Schlesinger <aaron@ecomaz.net>

* Restore pkg/k8s/client.go

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>
Sign-off-executed-by: Lucas Santos <lhs.santoss@gmail.com>
Approved-at: Aaron Schlesinger <aaron@ecomaz.net>

* Add context to queue pinger

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

Co-authored-by: Aaron Schlesinger <aaron@ecomaz.net>
Co-authored-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
  • Loading branch information
3 people committed Feb 26, 2021
1 parent ee0974a commit ebef98e
Show file tree
Hide file tree
Showing 26 changed files with 1,049 additions and 779 deletions.
128 changes: 67 additions & 61 deletions charts/keda-http-operator/crds/httpscaledobjects.http.keda.sh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ spec:
app_name:
description: (optional) The name of the application to be created.
type: string
polling_interval:
description: (optional) The interval to check for changes.
format: int32
type: integer
port:
description: The port this application will serve on.
format: int32
Expand All @@ -57,63 +53,73 @@ spec:
status:
description: HTTPScaledObjectStatus defines the observed state of HTTPScaledObject
properties:
deployment_status:
description: HTTPScaledObjectCreationStatus describes the creation
status of the scaler's additional resources such as Services, Ingresses
and Deployments
enum:
- Created
- Error
- Pending
- Unknown
- Terminating
type: string
externalscaler_status:
description: HTTPScaledObjectCreationStatus describes the creation
status of the scaler's additional resources such as Services, Ingresses
and Deployments
enum:
- Created
- Error
- Pending
- Unknown
- Terminating
type: string
interceptor_status:
description: HTTPScaledObjectCreationStatus describes the creation
status of the scaler's additional resources such as Services, Ingresses
and Deployments
enum:
- Created
- Error
- Pending
- Unknown
- Terminating
type: string
ready:
type: boolean
scaledobject_status:
description: HTTPScaledObjectCreationStatus describes the creation
status of the scaler's additional resources such as Services, Ingresses
and Deployments
enum:
- Created
- Error
- Pending
- Unknown
- Terminating
type: string
service_status:
description: HTTPScaledObjectCreationStatus describes the creation
status of the scaler's additional resources such as Services, Ingresses
and Deployments
enum:
- Created
- Error
- Pending
- Unknown
- Terminating
type: string
conditions:
description: List of auditable conditions of the operator
items:
description: Condition to store the condition state
properties:
message:
description: A human readable message indicating details about
the transition.
type: string
reason:
description: The reason for the condition's last transition.
enum:
- ErrorCreatingExternalScaler
- ErrorCreatingExternalScalerService
- CreatedExternalScaler
- ErrorCreatingAppDeployment
- AppDeploymentCreated
- ErrorCreatingAppService
- AppServiceCreated
- ErrorCreatingScaledObject
- ScaledObjectCreated
- ErrorCreatingInterceptor
- ErrorCreatingInterceptorAdminService
- ErrorCreatingInterceptorProxyService
- InterceptorCreated
- TerminatingResources
- AppDeploymentTerminationError
- AppDeploymentTerminated
- InterceptorDeploymentTerminated
- InterceptorDeploymentTerminationError
- InterceptorAdminServiceTerminationError
- InterceptorAdminServiceTerminated
- InterceptorProxyServiceTerminationError
- InterceptorProxyServiceTerminated
- ExternalScalerDeploymentTerminationError
- ExternalScalerDeploymentTerminated
- ExternalScalerServiceTerminationError
- ExternalScalerServiceTerminated
- AppServiceTerminationError
- AppServiceTerminated
- ScaledObjectTerminated
- ScaledObjectTerminationError
- PendingCreation
- HTTPScaledObjectIsReady
type: string
status:
description: Status of the condition, one of True, False, Unknown.
type: string
timestamp:
description: Timestamp of the condition
type: string
type:
description: Type of condition
enum:
- Created
- Error
- Pending
- Unknown
- Terminating
- Terminated
- Ready
type: string
required:
- status
- type
type: object
type: array
type: object
type: object
served: true
Expand Down
32 changes: 26 additions & 6 deletions charts/keda-http-operator/templates/keda-http-operator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,12 @@ metadata:
labels:
httpscaledobjects.http.keda.sh/version: {{ .Values.version }}
keda.sh/addon: keda-http-addon
name: keda-http-addon-keda-http-manager-role
name: keda-http-addon-manager-role
rules:
- apiGroups:
- ""
resources:
- configmaps
- pods
- services
- endpoints
Expand All @@ -67,28 +68,47 @@ rules:
- list
- watch
- apiGroups:
- http.keda.sh
- keda.sh
resources:
- httpscaledobjects
- scaledobjects
verbs:
- create
- delete
- get
- list
- update
- patch
- watch
- apiGroups:
- http.keda.sh
resources:
- httpscaledobjects
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- http.keda.sh
- keda.sh
resources:
- httpscaledobjects/status
verbs:
- get
- patch
- update
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- get
- list
- create
- delete
- update
- apiGroups:
- networking
resources:
Expand Down Expand Up @@ -157,11 +177,11 @@ metadata:
labels:
httpscaledobjects.http.keda.sh/version: {{ .Values.version }}
keda.sh/addon: keda-http-addon
name: keda-http-addon-keda-http-manager-rolebinding
name: keda-http-addon-manager-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: keda-http-addon-keda-http-manager-role
name: keda-http-addon-manager-role
subjects:
- kind: ServiceAccount
name: default
Expand Down
17 changes: 8 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@ module github.com/kedacore/http-add-on
go 1.15

require (
github.com/go-logr/logr v0.1.0
github.com/go-logr/logr v0.3.0
github.com/golang/protobuf v1.4.3
github.com/labstack/echo/v4 v4.1.17
github.com/onsi/ginkgo v1.11.0
github.com/onsi/gomega v1.8.1
github.com/pkg/errors v0.8.1
github.com/onsi/ginkgo v1.14.1
github.com/onsi/gomega v1.10.2
github.com/pkg/errors v0.9.1
google.golang.org/grpc v1.33.2
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.0.1 // indirect
google.golang.org/protobuf v1.25.0
k8s.io/api v0.17.2
k8s.io/apimachinery v0.17.2
k8s.io/client-go v0.17.2
sigs.k8s.io/controller-runtime v0.5.0
k8s.io/api v0.20.2
k8s.io/apimachinery v0.20.2
k8s.io/client-go v0.20.2
sigs.k8s.io/controller-runtime v0.8.1
)

0 comments on commit ebef98e

Please sign in to comment.