summaryrefslogtreecommitdiff
path: root/vendor/k8s.io/client-go/tools/clientcmd/api/types.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/k8s.io/client-go/tools/clientcmd/api/types.go')
-rw-r--r--vendor/k8s.io/client-go/tools/clientcmd/api/types.go32
1 files changed, 32 insertions, 0 deletions
diff --git a/vendor/k8s.io/client-go/tools/clientcmd/api/types.go b/vendor/k8s.io/client-go/tools/clientcmd/api/types.go
index 407dec83a..1391df702 100644
--- a/vendor/k8s.io/client-go/tools/clientcmd/api/types.go
+++ b/vendor/k8s.io/client-go/tools/clientcmd/api/types.go
@@ -119,6 +119,9 @@ type AuthInfo struct {
// AuthProvider specifies a custom authentication plugin for the kubernetes cluster.
// +optional
AuthProvider *AuthProviderConfig `json:"auth-provider,omitempty"`
+ // Exec specifies a custom exec-based authentication plugin for the kubernetes cluster.
+ // +optional
+ Exec *ExecConfig `json:"exec,omitempty"`
// Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields
// +optional
Extensions map[string]runtime.Object `json:"extensions,omitempty"`
@@ -147,6 +150,35 @@ type AuthProviderConfig struct {
Config map[string]string `json:"config,omitempty"`
}
+// ExecConfig specifies a command to provide client credentials. The command is exec'd
+// and outputs structured stdout holding credentials.
+//
+// See the client.authentiction.k8s.io API group for specifications of the exact input
+// and output format
+type ExecConfig struct {
+ // Command to execute.
+ Command string `json:"command"`
+ // Arguments to pass to the command when executing it.
+ // +optional
+ Args []string `json:"args"`
+ // Env defines additional environment variables to expose to the process. These
+ // are unioned with the host's environment, as well as variables client-go uses
+ // to pass argument to the plugin.
+ // +optional
+ Env []ExecEnvVar `json:"env"`
+
+ // Preferred input version of the ExecInfo. The returned ExecCredentials MUST use
+ // the same encoding version as the input.
+ APIVersion string `json:"apiVersion,omitempty"`
+}
+
+// ExecEnvVar is used for setting environment variables when executing an exec-based
+// credential plugin.
+type ExecEnvVar struct {
+ Name string `json:"name"`
+ Value string `json:"value"`
+}
+
// NewConfig is a convenience function that returns a new Config object with non-nil maps
func NewConfig() *Config {
return &Config{