Comments (4)
modify sidecar-confimg.yaml file,bu still no mounts
apiVersion: v1
kind: ConfigMap
metadata:
name: sidecar-telegraf-basic
namespace: monitoring
labels:
app: k8s-sidecar-injector
track: prod
data:
sidecar-telegraf-basic: |
name: sidecar-telegraf-basic
hostNetwork: true
hostPID: true
containers:
- name: telegraf-basic
image: registry.icp.com:5000/service/lma/mcp-telegraf:0.1
imagePullPolicy: IfNotPresent
ports:
- containerPort: 9126
volumeMounts:
- name: telegraf-basic-directory
mountPath: /etc/telegraf
volumes:
- name: telegraf-basic-directory
configMap:
name: telegraf-basic-config
configmap
apiVersion: v1
kind: ConfigMap
metadata:
name: telegraf-basic-config
namespace: monitoring
data:
telegraf.conf: |
[global_tags]
[agent]
interval = "15s"
round_interval = false
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = "2s"
from k8s-sidecar-injector.
---
apiVersion: v1
kind: ConfigMap
metadata:
name: sidecar-telegraf-basic
namespace: monitoring
labels:
app: k8s-sidecar-injector
track: prod
data:
sidecar-telegraf-basic: |
name: sidecar-telegraf-basic
hostNetwork: true
hostPID: true
containers:
- name: telegraf-basic
image: registry.icp.com:5000/service/lma/mcp-telegraf:0.1
imagePullPolicy: IfNotPresent
ports:
- containerPort: 9126
volumeMounts:
- name: telegraf-basic-directory
mountPath: /etc/telegraf
volumes:
- name: telegraf-basic-directory
configMap:
name: telegraf-basic-config
---
# configmap
apiVersion: v1
kind: ConfigMap
metadata:
name: telegraf-basic-config
namespace: monitoring
data:
telegraf.conf: |
[global_tags]
[agent]
interval = "15s"
round_interval = false
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = "2s"
from k8s-sidecar-injector.
If you look at the full kubectl describe pod/...
output for the created pod, there should be an annotation added indicating whether or not the injector was able to successfully modify your pod. If the annotation is not present, it points to a misconfiguration in your K8s mutating webhook configuration. If the annotation is present and says it succeeded, that makes me think there is a configuration issue in your ConfigMap - perhaps keys for Volumes at the wrong level, or something?
Please include the logs from the injector's startup - it will tell you how many volumes/containers/env vars it has loaded for each sidecar config. This is a good litmus test to confirm the sidecar injector is reading your configuration properly.
from k8s-sidecar-injector.
ok,very thanks。
from k8s-sidecar-injector.
Related Issues (20)
- Status annotation ignores custom annotation namespace HOT 2
- serviceMonitor error HOT 2
- sidercar-configmap namesapces must equal with k8s-sidecar-injector-prod namespace HOT 2
- deployment LOG_LEVEL don't have effect HOT 1
- ServiceAccount Token missing in sidecar HOT 8
- Remove glog
- Feature Request: Add ExecAction to config(map)
- how to config different configmap for different pod in one statefulset HOT 1
- Default injection for all new containers? HOT 2
- sidecar container inject failed on kubernetes 1.14.3 HOT 5
- Question: Being able to inject in kube-system namespace
- Feature request: inject container at the top of the list of containers
- Ignored namespaces aren't skipped for Deployment pods HOT 3
- openshift copy runAsUser form main container
- serviceaccount in sidecar not inject into pod with another serviceaccount
- sidecar injected though no configmap created, therefore init does not come up
- Add default request from namespace annotation HOT 4
- POD not getting sidecar even though injection is requested HOT 3
- cofigmaps have the same name
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from k8s-sidecar-injector.