Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
169 changes: 169 additions & 0 deletions manifests/mw-kube-agent/clusterrole-opsai.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
labels:
k8s-app: mw-app
name: mw-opsai-cluster-role
namespace: "NAMESPACE_VALUE"
rules:
- verbs:
- get
- list
- watch
apiGroups:
- metrics.k8s.io
resources:
- pods
- nodes
- verbs:
- get
- list
- watch
- create
- patch
- delete
apiGroups:
- ''
resources:
- nodes
- nodes/metrics
- nodes/stats
- namespaces
- pods
- serviceaccounts
- services
- configmaps
- endpoints
- persistentvolumeclaims
- replicationcontrollers
- replicationcontrollers/scale
- persistentvolumeclaims
- persistentvolumes
- bindings
- events
- limitranges
- namespaces/status
- pods
- pods/log
- pods/status
- replicationcontrollers/status
- resourcequotas
- resourcequotas/status
- verbs:
- get
- list
- watch
apiGroups:
- discovery.k8s.io
resources:
- endpointslices
- verbs:
- get
apiGroups:
- ''
resources:
- nodes/proxy
- verbs:
- get
- list
- watch
- patch
apiGroups:
- apps
resources:
- daemonsets
- deployments
- deployments/scale
- replicasets
- replicasets/scale
- statefulsets
- verbs:
- get
- list
- watch
apiGroups:
- autoscaling
resources:
- horizontalpodautoscalers
- verbs:
- get
- list
- watch
apiGroups:
- batch
resources:
- cronjobs
- jobs
- verbs:
- get
- list
- watch
apiGroups:
- extensions
resources:
- daemonsets
- deployments
- deployments/scale
- networkpolicies
- replicasets
- replicasets/scale
- replicationcontrollers/scale
- verbs:
- get
- list
- watch
apiGroups:
- networking.k8s.io
resources:
- ingresses
- networkpolicies
- verbs:
- get
- list
- watch
apiGroups:
- policy
resources:
- poddisruptionbudgets
- verbs:
- get
- list
- watch
apiGroups:
- storage.k8s.io
resources:
- storageclasses
- volumeattachments
- verbs:
- get
- list
- watch
apiGroups:
- rbac.authorization.k8s.io
resources:
- clusterrolebindings
- clusterroles
- roles
- rolebindings
- verbs:
- get
nonResourceURLs:
- /metrics
- verbs:
- '*'
apiGroups:
- monitoring.coreos.com
resources:
- servicemonitors
- podmonitors
- probes
- scrapeconfigs
- verbs:
- get
- list
- watch
- create
apiGroups:
- ''
resources:
- secrets
13 changes: 13 additions & 0 deletions manifests/mw-kube-agent/clusterrolebinding-opsai.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: mw-opsai-cluster-role-binding
namespace: "NAMESPACE_VALUE"
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: mw-opsai-cluster-role
subjects:
- kind: ServiceAccount
name: mw-opsai-service-account
namespace: "NAMESPACE_VALUE"
57 changes: 57 additions & 0 deletions manifests/mw-kube-agent/opsai.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
kind: Deployment
apiVersion: apps/v1
metadata:
name: opsai
namespace: "NAMESPACE_VALUE"
spec:
selector:
matchLabels:
app.kubernetes.io/name: mw-kube-agent-v3-opsai
app.kubernetes.io/instance: mw-agent
template:
metadata:
labels:
app.kubernetes.io/name: mw-kube-agent-v3-opsai
app.kubernetes.io/instance: mw-agent
spec:
containers:
- args:
- mw-agent
- start
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: MW_TARGET
value: "MW_TARGET_VALUE"
- name: MW_KUBE_CLUSTER_NAME
value: "MW_KUBE_CLUSTER_NAME_VALUE"
- name: MW_NAMESPACE
value: "NAMESPACE_VALUE"
- name: MW_AGENT_SELF_PROFILING
value: "MW_AGENT_SELF_PROFILING_VALUE"
- name: MW_PROFILING_SERVER_URL
value: "MW_PROFILING_SERVER_URL_VALUE"
- name: MW_AGENT_FEATURES_OPSAI_AUTOFIX
value: "MW_AGENT_FEATURES_OPSAI_AUTOFIX_VALUE"
- name: MW_OPSAI_API_URL
value: "MW_OPSAI_API_URL_VALUE"
- name: MW_OPSAI_UNSUBSCRIBE_ENDPOINT
value: "MW_OPSAI_UNSUBSCRIBE_ENDPOINT_VALUE"
- name: ACCOUNT_UID
value: "ACCOUNT_UID_VALUE"
- name: MW_API_KEY
value: "MW_API_KEY_VALUE"
resources:
limits:
cpu: 200m
memory: 256Mi
requests:
cpu: 100m
memory: 64Mi
image: ghcr.io/middleware-labs/mw-kube-agent-opsai:1.17.1
imagePullPolicy: Always
name: mw-kube-agent-v3
restartPolicy: Always
serviceAccountName: mw-opsai-service-account
8 changes: 8 additions & 0 deletions manifests/mw-kube-agent/serviceaccount-opsai.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: mw-opsai-service-account
namespace: "NAMESPACE_VALUE"
labels:
k8s-app: mw-app
annotations: {}
56 changes: 56 additions & 0 deletions manifests/mw-kube-agent/synthetics.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
kind: Deployment
apiVersion: apps/v1
metadata:
name: synthetics
namespace: "NAMESPACE_VALUE"
spec:
selector:
matchLabels:
app.kubernetes.io/name: mw-kube-agent-v3-synthetic-monitoring
app.kubernetes.io/instance: mw-agent
template:
metadata:
labels:
app.kubernetes.io/name: mw-kube-agent-v3-synthetic-monitoring
app.kubernetes.io/instance: mw-agent
spec:
containers:
- args:
- mw-agent
- start
name: mw-kube-agent-v3
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: MW_TARGET
value: "TARGET_VALUE"
- name: MW_KUBE_CLUSTER_NAME
value: "MW_KUBE_CLUSTER_NAME_VALUE"
- name: MW_NAMESPACE
value: "NAMESPACE_VALUE"
- name: MW_AGENT_SELF_PROFILING
value: "MW_AGENT_SELF_PROFILING_VALUE"
- name: MW_PROFILING_SERVER_URL
value: "MW_PROFILING_SERVER_URL_VALUE"
- name: MW_SYNTHETIC_MONITORING_API_URL
value: "MW_SYNTHETIC_MONITORING_API_URL_VALUE"
- name: MW_SYNTHETIC_MONITORING_UNSUBSCRIBE_ENDPOINT
value: "MW_SYNTHETIC_MONITORING_UNSUBSCRIBE_ENDPOINT_VALUE"
- name: ACCOUNT_UID
value: "ACCOUNT_UID_VALUE"
- name: MW_AGENT_FEATURES_SYNTHETIC_MONITORING
value: "MW_AGENT_FEATURES_SYNTHETIC_MONITORING_VALUE"
- name: MW_API_KEY
value: "MW_API_KEY_VALUE"
resources:
limits:
cpu: 200m
memory: 256Mi
requests:
cpu: 100m
memory: 64Mi
image: ghcr.io/middleware-labs/mw-kube-agent-synthetics:1.17.1
imagePullPolicy: Always
restartPolicy: Always
Loading