Documentation ¶
Index ¶
- Constants
- func ByDestination(targetTo *SecretContext) secretConfigFilter
- func ByDestinationFunc(predicate func(*SecretContext) bool) secretConfigFilter
- func ExplainFilters(filters ...secretConfigFilter) string
- func LoadConfigFromFile(file string, config *Config) error
- func SaveConfigToFile(file string, config *Config) error
- type Config
- type DockerAuth
- type DockerConfigJSON
- type DockerConfigJSONData
- type ItemContext
- type SecretConfig
- type SecretContext
Constants ¶
View Source
const OSDGlobalPullSecretGroupName = "osd_global_pull_secret"
View Source
const OpenShiftConfigPullSecretGroupName = "openshift_config_pull_secret"
Variables ¶
This section is empty.
Functions ¶
func ByDestination ¶
func ByDestination(targetTo *SecretContext) secretConfigFilter
Filter secret that targets a specific destination.
func ByDestinationFunc ¶
func ByDestinationFunc(predicate func(*SecretContext) bool) secretConfigFilter
Filter secrets for which at least one destination matches a predicate function.
func ExplainFilters ¶
func ExplainFilters(filters ...secretConfigFilter) string
func LoadConfigFromFile ¶
LoadConfigFromFile renders a Config object loaded from the given file
func SaveConfigToFile ¶
SaveConfigToFile serializes a Config object to the given file
Types ¶
type Config ¶
type Config struct { VaultDPTPPrefix string `json:"vault_dptp_prefix,omitempty"` ClusterGroups map[string][]string `json:"cluster_groups,omitempty"` Secrets []SecretConfig `json:"secret_configs"` UserSecretsTargetClusters []string `json:"user_secrets_target_clusters,omitempty"` }
Config is what we version in our repository
func (*Config) MarshalJSON ¶
func (*Config) OSDGlobalPullSecretGroup ¶
OSDGlobalPullSecretGroup returns the list of the OSD cluster names where we need to partially manage the global pull secret
func (*Config) UnmarshalJSON ¶
type DockerAuth ¶
type DockerConfigJSON ¶
type DockerConfigJSON struct {
Auths map[string]DockerAuth `json:"auths"`
}
type DockerConfigJSONData ¶
type ItemContext ¶
type ItemContext struct { Item string `json:"item,omitempty"` Field string `json:"field,omitempty"` DockerConfigJSONData []DockerConfigJSONData `json:"dockerconfigJSON,omitempty"` // If the secret should be base64 decoded before uploading to kube. Encoding // it is useful to be able to store binary data. Base64Decode bool `json:"base64_decode,omitempty"` }
type SecretConfig ¶
type SecretConfig struct { From map[string]ItemContext `json:"from"` To []SecretContext `json:"to"` }
func FindSecret ¶
func FindSecret(secrets []SecretConfig, filters ...secretConfigFilter) (*SecretConfig, int)
FindSecret returns the first secret that matches all filters. If found, the second argument represents the secret's index, -1 otherwise.
type SecretContext ¶
type SecretContext struct { // A cluster to target. Mutually exclusive with 'ClusterGroups' Cluster string `json:"cluster,omitempty"` // A list of clusterGroups to target. Mutually exclusive with 'cluster' ClusterGroups []string `json:"cluster_groups,omitempty"` Namespace string `json:"namespace"` Name string `json:"name"` Type corev1.SecretType `json:"type,omitempty"` }
func (SecretContext) String ¶
func (sc SecretContext) String() string
Click to show internal directories.
Click to hide internal directories.