@@ -29,6 +29,53 @@ type DistributedRedisClusterSpec struct {
2929 Storage * RedisStorage `json:"storage,omitempty"`
3030 Resources * corev1.ResourceRequirements `json:"resources,omitempty"`
3131 PasswordSecret * corev1.LocalObjectReference `json:"rootPasswordSecret,omitempty"`
32+ Monitor * AgentSpec `json:"monitor,omitempty"`
33+ }
34+
35+ type AgentSpec struct {
36+ Image string `json:"image,omitempty"`
37+ Prometheus * PrometheusSpec `json:"prometheus,omitempty"`
38+ // Arguments to the entrypoint.
39+ // The docker image's CMD is used if this is not provided.
40+ // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
41+ // cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax
42+ // can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
43+ // regardless of whether the variable exists or not.
44+ // Cannot be updated.
45+ // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
46+ // +optional
47+ Args []string `json:"args,omitempty"`
48+ // List of environment variables to set in the container.
49+ // Cannot be updated.
50+ // +optional
51+ // +patchMergeKey=name
52+ // +patchStrategy=merge
53+ Env []corev1.EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
54+ // Compute Resources required by exporter container.
55+ // Cannot be updated.
56+ // More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
57+ // +optional
58+ Resources corev1.ResourceRequirements `json:"resources,omitempty"`
59+ // Security options the pod should run with.
60+ // More info: https://kubernetes.io/docs/concepts/policy/security-context/
61+ // More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
62+ // +optional
63+ SecurityContext * corev1.SecurityContext `json:"securityContext,omitempty"`
64+ }
65+
66+ type PrometheusSpec struct {
67+ // Port number for the exporter side car.
68+ Port int32 `json:"port,omitempty"`
69+
70+ // Namespace of Prometheus. Service monitors will be created in this namespace.
71+ Namespace string `json:"namespace,omitempty"`
72+ // Labels are key value pairs that is used to select Prometheus instance via ServiceMonitor labels.
73+ // +optional
74+ Labels map [string ]string `json:"labels,omitempty"`
75+
76+ // Interval at which metrics should be scraped
77+ Interval string `json:"interval,omitempty"`
78+ //Annotations map[string]string `json:"annotations,omitempty"`
3279}
3380
3481// RedisStorage defines the structure used to store the Redis Data
0 commit comments