Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module contains the definition of the data model of the kubeconfig.
The official definition of the kubeconfig is defined in https://github.com/kubernetes/client-go/blob/master/tools/clientcmd/api/v1/types.go.
This is a mostly straightforward translation into Haskell, with FromJSON
and ToJSON
instances defined.
Synopsis
- camelToWithOverrides :: Char -> Map String String -> Options
- data Config = Config {
- kind :: Maybe Text
- apiVersion :: Maybe Text
- preferences :: Maybe Preferences
- clusters :: [NamedEntity Cluster "cluster"]
- authInfos :: [NamedEntity AuthInfo "user"]
- contexts :: [NamedEntity Context "context"]
- currentContext :: Text
- configJSONOptions :: Options
- newtype Preferences = Preferences {}
- data Cluster = Cluster {}
- data NamedEntity a (typeKey :: Symbol) = NamedEntity {}
- toMap :: [NamedEntity a s] -> Map Text a
- data AuthInfo = AuthInfo {
- clientCertificate :: Maybe FilePath
- clientCertificateData :: Maybe Text
- clientKey :: Maybe FilePath
- clientKeyData :: Maybe Text
- token :: Maybe Text
- tokenFile :: Maybe FilePath
- impersonate :: Maybe Text
- impersonateGroups :: Maybe [Text]
- impersonateUserExtra :: Maybe (Map Text [Text])
- username :: Maybe Text
- password :: Maybe Text
- authProvider :: Maybe AuthProviderConfig
- authInfoJSONOptions :: Options
- data Context = Context {}
- contextJSONOptions :: Options
- data AuthProviderConfig = AuthProviderConfig {}
- getContext :: Config -> Either String Context
- getAuthInfo :: Config -> Either String (Text, AuthInfo)
- getCluster :: Config -> Either String Cluster
Documentation
Represents a kubeconfig.
Config | |
|
Instances
newtype Preferences Source #
Instances
Instances
Eq Cluster Source # | |
Show Cluster Source # | |
Generic Cluster Source # | |
ToJSON Cluster Source # | |
Defined in Kubernetes.Client.KubeConfig | |
FromJSON Cluster Source # | |
type Rep Cluster Source # | |
Defined in Kubernetes.Client.KubeConfig type Rep Cluster = D1 (MetaData "Cluster" "Kubernetes.Client.KubeConfig" "kubernetes-client-0.2.0.0-8CWhQ0RfcQ15Vt04rFZdN" False) (C1 (MetaCons "Cluster" PrefixI True) ((S1 (MetaSel (Just "server") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text) :*: S1 (MetaSel (Just "insecureSkipTLSVerify") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Bool))) :*: (S1 (MetaSel (Just "certificateAuthority") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "certificateAuthorityData") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Text))))) |
data NamedEntity a (typeKey :: Symbol) Source #
Instances
AuthInfo | |
|
Instances
Instances
Eq Context Source # | |
Show Context Source # | |
Generic Context Source # | |
ToJSON Context Source # | |
Defined in Kubernetes.Client.KubeConfig | |
FromJSON Context Source # | |
type Rep Context Source # | |
Defined in Kubernetes.Client.KubeConfig type Rep Context = D1 (MetaData "Context" "Kubernetes.Client.KubeConfig" "kubernetes-client-0.2.0.0-8CWhQ0RfcQ15Vt04rFZdN" False) (C1 (MetaCons "Context" PrefixI True) (S1 (MetaSel (Just "cluster") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text) :*: (S1 (MetaSel (Just "authInfo") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text) :*: S1 (MetaSel (Just "namespace") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Text))))) |
data AuthProviderConfig Source #