You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+32-31Lines changed: 32 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -143,37 +143,38 @@ When running a container with a non-root user, you need to give the container ac
143
143
144
144
```
145
145
Usage of amazon-eks-pod-identity-webhook:
146
-
--add_dir_header If true, adds the file directory to the header
147
-
--alsologtostderr log to standard error as well as files
148
-
--annotation-prefix string The Service Account annotation to look for (default "eks.amazonaws.com")
149
-
--aws-default-region string If set, AWS_DEFAULT_REGION and AWS_REGION will be set to this value in mutated containers
150
-
--enable-debugging-handlers Enable debugging handlers. Currently /debug/alpha/cache is supported
151
-
--in-cluster Use in-cluster authentication and certificate request API (default true)
152
-
--kube-api string (out-of-cluster) The url to the API server
153
-
--kubeconfig string (out-of-cluster) Absolute path to the API server kubeconfig file
154
-
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
155
-
--log_dir string If non-empty, write log files in this directory
156
-
--log_file string If non-empty, use this log file
157
-
--log_file_max_size uint Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited. (default 1800)
158
-
--logtostderr log to standard error instead of files (default true)
159
-
--metrics-port int Port to listen on for metrics (http) (default 9999)
160
-
--namespace string (in-cluster) The namespace name this webhook, the TLS secret, and configmap resides in (default "eks")
161
-
--port int Port to listen on (default 443)
162
-
--service-name string (in-cluster) The service name fronting this webhook (default "pod-identity-webhook")
163
-
--skip_headers If true, avoid header prefixes in the log messages
164
-
--skip_log_headers If true, avoid headers when opening log files
165
-
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
166
-
--sts-regional-endpoint false Whether to inject the AWS_STS_REGIONAL_ENDPOINTS=regional env var in mutated pods. Defaults to false.
--tls-secret string (in-cluster) The secret name for storing the TLS serving cert (default "pod-identity-webhook")
170
-
--token-audience string The default audience for tokens. Can be overridden by annotation (default "sts.amazonaws.com")
171
-
--token-expiration int The token expiration (default 86400)
172
-
--token-mount-path string The path to mount tokens (default "/var/run/secrets/eks.amazonaws.com/serviceaccount")
173
-
-v, --v Level number for the log level verbosity
174
-
--version Display the version and exit
175
-
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
176
-
--watch-config-map Enables watching serviceaccounts that are configured through the pod-identity-webhook configmap instead of using annotations
146
+
--add_dir_header If true, adds the file directory to the header
147
+
--alsologtostderr log to standard error as well as files
148
+
--annotation-prefix string The Service Account annotation to look for (default "eks.amazonaws.com")
149
+
--aws-default-region string If set, AWS_DEFAULT_REGION and AWS_REGION will be set to this value in mutated containers
150
+
--enable-debugging-handlers Enable debugging handlers. Currently /debug/alpha/cache is supported
151
+
--in-cluster Use in-cluster authentication and certificate request API (default true)
152
+
--kube-api string (out-of-cluster) The url to the API server
153
+
--kubeconfig string (out-of-cluster) Absolute path to the API server kubeconfig file
154
+
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
155
+
--log_dir string If non-empty, write log files in this directory
156
+
--log_file string If non-empty, use this log file
157
+
--log_file_max_size uint Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited. (default 1800)
158
+
--logtostderr log to standard error instead of files (default true)
159
+
--metrics-port int Port to listen on for metrics (http) (default 9999)
160
+
--namespace string (in-cluster) The namespace name this webhook, the TLS secret, and configmap resides in (default "eks")
161
+
--port int Port to listen on (default 443)
162
+
--service-name string (in-cluster) The service name fronting this webhook (default "pod-identity-webhook")
163
+
--service-account-lookup-grace-period The grace period for service account to be available in cache before not mutating a pod. Set to 0 to deactivate waiting. Carefully use higher values as it may have significant impact on Kubernetes' pod scheduling performance. (default 100ms)
164
+
--skip_headers If true, avoid header prefixes in the log messages
165
+
--skip_log_headers If true, avoid headers when opening log files
166
+
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
167
+
--sts-regional-endpoint false Whether to inject the AWS_STS_REGIONAL_ENDPOINTS=regional env var in mutated pods. Defaults to false.
Copy file name to clipboardExpand all lines: main.go
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -86,6 +86,8 @@ func main() {
86
86
87
87
debug:=flag.Bool("enable-debugging-handlers", false, "Enable debugging handlers. Currently /debug/alpha/cache is supported")
88
88
89
+
saLookupGracePeriod:=flag.Duration("service-account-lookup-grace-period", 0, "The grace period for service account to be available in cache before not mutating a pod. Defaults to 0, what deactivates waiting. Carefully use values higher than a bunch of milliseconds as it may have significant impact on Kubernetes' pod scheduling performance.")
90
+
89
91
klog.InitFlags(goflag.CommandLine)
90
92
// Add klog CommandLine flags to pflag CommandLine
0 commit comments