Skip to content

Commit

Permalink
Re-visit logging
Browse files Browse the repository at this point in the history
  • Loading branch information
dee-kryvenko committed Feb 11, 2025
1 parent 6e0e4de commit b8f37c1
Show file tree
Hide file tree
Showing 44 changed files with 238 additions and 204 deletions.
2 changes: 0 additions & 2 deletions api/autoscaler/common/load_index.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ type LoadIndex struct {
Shard Shard `json:"shard,omitempty"`
// Value is a value of this load index.
// +kubebuilder:validation:Required
// +kubebuilder:validation:Type:=number
// +kubebuilder:validation:Format:=float
Value resource.Quantity `json:"value,omitempty"`
// DisplayValue is the string representation of the without precision guarantee.
// This is meaningless and exists purely for convenience of someone who is looking at the kubectl get output.
Expand Down
2 changes: 0 additions & 2 deletions api/autoscaler/common/metric_value.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ type MetricValue struct {
Query string `json:"query,omitempty"`
// Value is the value of the metric.
// +kubebuilder:validation:Required
// +kubebuilder:validation:Type:=number
// +kubebuilder:validation:Format:=float
Value resource.Quantity `json:"value,omitempty"`
// DisplayValue is the string representation of the without precision guarantee.
// This is meaningless and exists purely for convenience of someone who is looking at the kubectl get output.
Expand Down
2 changes: 0 additions & 2 deletions api/autoscaler/v1alpha1/prometheuspoll_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ type PrometheusMetric struct {
// NoData if set will be used as the value when no data is available in Prometheus.
// If not set - missing data will result in error.
// There are metrics like argocd_app_k8s_request_total that might have a bug and not being reported for prolonged periods of time.
// +kubebuilder:validation:Type:=number
// +kubebuilder:validation:Format:=float
NoData *resource.Quantity `json:"noData,omitempty"`
}

Expand Down
2 changes: 0 additions & 2 deletions api/autoscaler/v1alpha1/weightedpnormloadindex_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ type WeightedPNormLoadIndexWeight struct {

// Weight of this metric.
// +kubebuilder:validation:Required
// +kubebuilder:validation:Type:=number
// +kubebuilder:validation:Format:=float
Weight resource.Quantity `json:"weight,omitempty"`

// Negative by default is true,
Expand Down
1 change: 0 additions & 1 deletion config/certmanager/certificate-metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ metadata:
app.kubernetes.io/name: kubebuilder
app.kubernetes.io/managed-by: kustomize
name: metrics-certs # this name should match the one appeared in kustomizeconfig.yaml
namespace: system
spec:
dnsNames:
# SERVICE_NAME and SERVICE_NAMESPACE will be substituted by kustomize
Expand Down
1 change: 0 additions & 1 deletion config/certmanager/issuer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ metadata:
app.kubernetes.io/name: kubebuilder
app.kubernetes.io/managed-by: kustomize
name: selfsigned-issuer
namespace: system
spec:
selfSigned: {}
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,7 @@ spec:
- type: integer
- type: string
description: Value is a value of this load index.
format: float
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
type: number
x-kubernetes-int-or-string: true
required:
- displayValue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,7 @@ spec:
- type: integer
- type: string
description: Value is a value of this load index.
format: float
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
type: number
x-kubernetes-int-or-string: true
required:
- displayValue
Expand Down Expand Up @@ -308,9 +306,7 @@ spec:
- type: integer
- type: string
description: Value is a value of this load index.
format: float
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
type: number
x-kubernetes-int-or-string: true
required:
- displayValue
Expand Down Expand Up @@ -389,9 +385,7 @@ spec:
- type: integer
- type: string
description: Value is a value of this load index.
format: float
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
type: number
x-kubernetes-int-or-string: true
required:
- displayValue
Expand Down
4 changes: 0 additions & 4 deletions config/crd/bases/autoscaler.argoproj.io_prometheuspolls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,7 @@ spec:
NoData if set will be used as the value when no data is available in Prometheus.
If not set - missing data will result in error.
There are metrics like argocd_app_k8s_request_total that might have a bug and not being reported for prolonged periods of time.
format: float
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
type: number
x-kubernetes-int-or-string: true
query:
description: |-
Expand Down Expand Up @@ -229,9 +227,7 @@ spec:
- type: integer
- type: string
description: Value is the value of the metric.
format: float
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
type: number
x-kubernetes-int-or-string: true
required:
- displayValue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,7 @@ spec:
- type: integer
- type: string
description: Value is a value of this load index.
format: float
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
type: number
x-kubernetes-int-or-string: true
required:
- displayValue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,7 @@ spec:
- type: integer
- type: string
description: Value is the value of the metric.
format: float
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
type: number
x-kubernetes-int-or-string: true
required:
- displayValue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,7 @@ spec:
- type: integer
- type: string
description: Value is a value of this load index.
format: float
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
type: number
x-kubernetes-int-or-string: true
required:
- displayValue
Expand Down Expand Up @@ -294,9 +292,7 @@ spec:
- type: integer
- type: string
description: Value is a value of this load index.
format: float
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
type: number
x-kubernetes-int-or-string: true
required:
- displayValue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,7 @@ spec:
- type: integer
- type: string
description: Weight of this metric.
format: float
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
type: number
x-kubernetes-int-or-string: true
required:
- id
Expand Down Expand Up @@ -220,9 +218,7 @@ spec:
- type: integer
- type: string
description: Value is a value of this load index.
format: float
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
type: number
x-kubernetes-int-or-string: true
required:
- displayValue
Expand Down
6 changes: 6 additions & 0 deletions config/default/manager_zap_devel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,9 @@
- op: add
path: /spec/template/spec/containers/0/args/0
value: --zap-devel
# - op: add
# path: /spec/template/spec/containers/0/args/0
# value: --zap-encoder=console
# - op: add
# path: /spec/template/spec/containers/0/args/0
# value: --zap-log-level=1
1 change: 0 additions & 1 deletion config/default/metrics_service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ metadata:
app.kubernetes.io/name: argocd-autoscaler
app.kubernetes.io/managed-by: kustomize
name: controller-manager-metrics-service
namespace: system
spec:
ports:
- name: https
Expand Down
1 change: 0 additions & 1 deletion config/e2e/argocd_application_controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
name: argocd-application-controller
namespace: system
spec:
replicas: 0
selector:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ metadata:
app.kubernetes.io/name: argocd-autoscaler
app.kubernetes.io/managed-by: kustomize
name: longestprocessingtimepartition-sample
namespace: system
spec:
loadIndexProviderRef:
apiGroup: autoscaler.argoproj.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ metadata:
app.kubernetes.io/name: argocd-autoscaler
app.kubernetes.io/managed-by: kustomize
name: mostwantedtwophasehysteresisevaluation-sample
namespace: system
spec:
partitionProviderRef:
apiGroup: autoscaler.argoproj.io
Expand Down
1 change: 0 additions & 1 deletion config/e2e/autoscaler_v1alpha1_prometheuspoll.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ metadata:
app.kubernetes.io/name: argocd-autoscaler
app.kubernetes.io/managed-by: kustomize
name: prometheuspoll-sample
namespace: system
spec:
shardManagerRef:
apiGroup: autoscaler.argoproj.io
Expand Down
3 changes: 1 addition & 2 deletions config/e2e/autoscaler_v1alpha1_replicasetscaler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ metadata:
app.kubernetes.io/name: argocd-autoscaler
app.kubernetes.io/managed-by: kustomize
name: replicasetscaler-sample
namespace: system
spec:
partitionProviderRef:
apiGroup: autoscaler.argoproj.io
Expand All @@ -19,7 +18,7 @@ spec:
apiGroup: apps
kind: StatefulSet
name: argocd-autoscaler-argocd-application-controller
mode:
mode: {}
# default:
# rolloutRestart: true
# x0y: {}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ metadata:
app.kubernetes.io/name: argocd-autoscaler
app.kubernetes.io/managed-by: kustomize
name: robustscalingnormalizer-sample
namespace: system
spec:
metricValuesProviderRef:
apiGroup: autoscaler.argoproj.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ metadata:
app.kubernetes.io/name: argocd-autoscaler
app.kubernetes.io/managed-by: kustomize
name: secrettypeclustershardmanager-sample
namespace: system
spec:
labelSelector:
matchLabels:
Expand Down
1 change: 0 additions & 1 deletion config/e2e/autoscaler_v1alpha1_weightedpnormloadindex.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ metadata:
app.kubernetes.io/name: argocd-autoscaler
app.kubernetes.io/managed-by: kustomize
name: weightedpnormloadindex-sample
namespace: system
spec:
metricValuesProviderRef:
apiGroup: autoscaler.argoproj.io
Expand Down
1 change: 0 additions & 1 deletion config/e2e/secret_type_cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ metadata:
labels:
test.argocd.argoproj.io/secret-type: cluster
name: sample-cluster
namespace: system
stringData:
name: sample-cluster
server: https://kubernetes.default.svc
Expand Down
1 change: 0 additions & 1 deletion config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: controller-manager
namespace: system
labels:
control-plane: controller-manager
app.kubernetes.io/name: argocd-autoscaler
Expand Down
1 change: 0 additions & 1 deletion config/network-policy/allow-metrics-traffic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ metadata:
app.kubernetes.io/name: argocd-autoscaler
app.kubernetes.io/managed-by: kustomize
name: allow-metrics-traffic
namespace: system
spec:
podSelector:
matchLabels:
Expand Down
1 change: 0 additions & 1 deletion config/prometheus/monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ metadata:
app.kubernetes.io/name: argocd-autoscaler
app.kubernetes.io/managed-by: kustomize
name: controller-manager-metrics-monitor
namespace: system
spec:
endpoints:
- path: /metrics
Expand Down
1 change: 0 additions & 1 deletion config/prometheus/monitor_tls_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: controller-manager-metrics-monitor
namespace: system
spec:
endpoints:
- path: /metrics
Expand Down
1 change: 0 additions & 1 deletion config/rbac/leader_election_role_binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ roleRef:
subjects:
- kind: ServiceAccount
name: controller-manager
namespace: system
1 change: 0 additions & 1 deletion config/rbac/metrics_auth_role_binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ roleRef:
subjects:
- kind: ServiceAccount
name: controller-manager
namespace: system
1 change: 0 additions & 1 deletion config/rbac/role_binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ roleRef:
subjects:
- kind: ServiceAccount
name: controller-manager
namespace: system
1 change: 0 additions & 1 deletion config/rbac/service_account.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ metadata:
app.kubernetes.io/name: argocd-autoscaler
app.kubernetes.io/managed-by: kustomize
name: controller-manager
namespace: system
Loading

0 comments on commit b8f37c1

Please sign in to comment.