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
@@ -92,6 +96,7 @@ func (o *GrpcProxyAgentOptions) Flags() *pflag.FlagSet {
92
96
flags.DurationVar(&o.syncInterval, "sync-interval", o.syncInterval, "The interval by which the agent periodically checks that it has connections to all instances of the proxy server.")
93
97
flags.DurationVar(&o.probeInterval, "probe-interval", o.probeInterval, "The interval by which the agent periodically checks if its connections to the proxy server are ready.")
94
98
flags.DurationVar(&o.reconnectInterval, "reconnect-interval", o.reconnectInterval, "The interval by which the agent tries to reconnect.")
99
+
flags.StringVar(&o.serviceAccountTokenPath, "service-account-token-path", o.serviceAccountTokenPath, "If non-empty proxy agent uses this token to prove its identity to the proxy server.")
95
100
returnflags
96
101
}
97
102
@@ -105,6 +110,7 @@ func (o *GrpcProxyAgentOptions) Print() {
105
110
klog.Warningf("SyncInterval set to %v.\n", o.syncInterval)
106
111
klog.Warningf("ProbeInterval set to %v.\n", o.probeInterval)
107
112
klog.Warningf("ReconnectInterval set to %v.\n", o.reconnectInterval)
113
+
klog.Warningf("ServiceAccountTokenPath set to \"%s\".\n", o.serviceAccountTokenPath)
108
114
}
109
115
110
116
func (o*GrpcProxyAgentOptions) Validate() error {
@@ -132,20 +138,26 @@ func (o *GrpcProxyAgentOptions) Validate() error {
132
138
ifo.proxyServerPort<=0 {
133
139
returnfmt.Errorf("proxy server port %d must be greater than 0", o.proxyServerPort)
// Number of proxy server instances, should be 1 unless it is a HA proxy server.
88
89
serverCountuint
90
+
// Agent pod's namespace for token-based agent authentication
91
+
agentNamespacestring
92
+
// Agent pod's service account for token-based agent authentication
93
+
agentServiceAccountstring
94
+
// Token's audience for token-based agent authentication
95
+
authenticationAudiencestring
96
+
// Path to kubeconfig (used by kubernetes client)
97
+
kubeconfigPathstring
89
98
}
90
99
91
100
func (o*ProxyRunOptions) Flags() *pflag.FlagSet {
@@ -103,6 +112,10 @@ func (o *ProxyRunOptions) Flags() *pflag.FlagSet {
103
112
flags.UintVar(&o.adminPort, "admin-port", o.adminPort, "Port we listen for admin connections on.")
104
113
flags.StringVar(&o.serverID, "server-id", o.serverID, "The unique ID of this server.")
105
114
flags.UintVar(&o.serverCount, "server-count", o.serverCount, "The number of proxy server instances, should be 1 unless it is an HA server.")
115
+
flags.StringVar(&o.agentNamespace, "agent-namespace", o.agentNamespace, "Expected agent's namespace during agent authentication (used with agent-service-account, authentication-audience, kubeconfig).")
116
+
flags.StringVar(&o.agentServiceAccount, "agent-service-account", o.agentServiceAccount, "Expected agent's service account during agent authentication (used with agent-namespace, authentication-audience, kubeconfig).")
117
+
flags.StringVar(&o.kubeconfigPath, "kubeconfig", o.kubeconfigPath, "absolute path to the kubeconfig file (used with agent-namespace, agent-service-account, authentication-audience).")
# Register SERVER_TOKEN in [static-token-file](https://kubernetes.io/docs/reference/access-authn-authz/authentication/#static-token-file)
35
+
Append the output of the following line to the [static-token-file](https://kubernetes.io/docs/reference/access-authn-authz/authentication/#static-token-file) and restart **kube-apiserver** on the master
1.[static-token-file](https://kubernetes.io/docs/reference/access-authn-authz/authentication/#static-token-file) location is: **/etc/srv/kubernetes/known_tokens.csv**
0 commit comments