Skip to content

Commit

Permalink
Add podAntiAffinity
Browse files Browse the repository at this point in the history
  • Loading branch information
chenzhiguo committed Dec 23, 2024
1 parent 9f91653 commit 3cb6f1f
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 10 deletions.
26 changes: 17 additions & 9 deletions deploy/all-cr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ data:
app.location.laneSpaceId=${APPLICATION_LOCATION_LANESPACE_ID}
app.location.lane=${APPLICATION_LOCATION_LANE}
agent.enhance.shutdownOnError=${CONFIG_ENHANCE_SHUTDOWN_ON_ERROR:true}
agent.enhance.excludeApp=${CONFIG_ENHANCE_EXCLUDE_APPS:com.taobao.arthas.boot.Bootstrap,org.netbeans.Main}
classloader.contextLoaderEnabled=${CLASSLOADER_CONTEXT_LOADER_ENABLED:true}
classloader.core.configExtensions=yaml,yml,xml,json,properties
#classloader.core.parentResources=
Expand All @@ -138,6 +139,7 @@ data:
excludeInterfaces: null
excludeClassLoaders:
- com.jd.jr.sgm.agent.loader.ClientLibClassLoader
- com.jd.jr.sgm.agent.loader.ClientAppClassLoader
- com.jd.pfinder.profiler.load.InterceptorClassLoader
- com.jd.pfinder.profiler.utils.ModuleClassLoader
- com.jd.pfinder.profiler.load.ModuleInterceptorClassLoader
Expand Down Expand Up @@ -516,18 +518,13 @@ data:
prometheus:
endpoint: 0.0.0.0:8889
namespace: ''
logging: {}
service:
extensions: [zpages]
pipelines:
traces:
receivers: [otlp]
processors: [memory_limiter, batch]
exporters: [logging]
metrics:
receivers: [otlp]
processors: [memory_limiter, batch]
exporters: [logging, prometheus]
exporters: [prometheus]
---
# Source: joylive-injector/templates/rbac.yaml
apiVersion: rbac.authorization.k8s.io/v1
Expand Down Expand Up @@ -666,6 +663,15 @@ spec:
app: joylive-injector
spec:
serviceAccountName: joylive-injector
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchLabels:
app: joylive-injector
topologyKey: "kubernetes.io/hostname"
containers:
- env:
- name: log.level
Expand Down Expand Up @@ -736,7 +742,7 @@ spec:
- command:
- "/otelcol"
- "--config=/conf/otel-collector-config.yaml"
image: otel/opentelemetry-collector:0.100.0
image: otel/opentelemetry-collector:0.115.1
name: otel-collector
resources:
limits:
Expand Down Expand Up @@ -806,7 +812,7 @@ webhooks:
admissionReviewVersions: [ "v1", "v1beta1" ]
sideEffects: None
timeoutSeconds: 5
failurePolicy: Ignore
failurePolicy: Fail
objectSelector:
matchLabels:
x-live-enabled : "true"
Expand All @@ -828,7 +834,7 @@ webhooks:
admissionReviewVersions: [ "v1", "v1beta1" ]
sideEffects: None
timeoutSeconds: 5
failurePolicy: Ignore
failurePolicy: Fail
objectSelector:
matchLabels:
x-live-enabled : "true"
Expand All @@ -854,6 +860,8 @@ spec:
endpoints:
- port: prometheus
interval: 10s
- port: metrics
interval: 10s
namespaceSelector:
any: true
selector:
Expand Down
11 changes: 10 additions & 1 deletion deploy/joylive-injector/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ spec:
app: {{ include "joylive-injector.name" . }}
spec:
serviceAccountName: {{ include "joylive-injector.serviceAccountName" . }}
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchLabels:
app: {{ include "joylive-injector.name" . }}
topologyKey: "kubernetes.io/hostname"
containers:
- env:
- name: log.level
Expand Down Expand Up @@ -51,4 +60,4 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
{{- toYaml .Values.Volumes | nindent 8 }}
{{- toYaml .Values.Volumes | nindent 8 }}
Binary file modified deploy/packages/joylive-injector-1.3.6.tgz
Binary file not shown.

0 comments on commit 3cb6f1f

Please sign in to comment.