Newer
Older
Licensed under the GNU AFFERO GENERAL PUBLIC LICENSE Version 3 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Random value
GenerateRand Generate = "rand"
// Random value of size 12
GenerateRand12 Generate = "rand12"
// Random value of size 24
GenerateRand24 Generate = "rand24"
// Value is generated from a template
// Value container the template and will be replaced
// Parameter is mounted as key/value in the container envVar specs
// Parameter is mounted as as EnvVarSource in the container envVar specs
// Parameter is mouned as file in the container path
MountFile MountType = "file"
// Parameter is mounted as EnvFromSource in the container specs
// Data can be retrieved from the crds or external resources specified in the parameter envFrom
ConfigParameter ParameterType = "configmap"
SecretParameter ParameterType = "secret"
ObjectFieldParameter ParameterType = "field"
)
type MountType string
// +kubebuilder:object:generate=true
type Parameters []*Parameter
// +kubebuilder:object:generate=true
type Parameter struct {
// Key of the parameter, can be mounted as as an environment variable, used in template
// or as in the data fied of configmap/secret
Key string `json:"key,omitempty"`
// Value of the paramater, should not contain secret values
// If it is a template, ParameterType should be template
// ValueFrom when specified indicates the source of the parameter.
// Cannot be used if value is not empty.
// MountPath specifies where the parameter will be mounted as a file
MountPath MountPath `json:"mountFrom,omitempty"`
// Generate if specified defines how the parameter value will be generated
// Type specifies specifies the parameter type
Type ParameterType `json:"type,omitempty"`
// MountType defined how the parameter will be mounted in the pod
// Defaults to EnvFile
MountType MountType `json:"mountType,omitempty"`
type MountPath struct {
Path string `json:"path,omitempty"`
SubPath string `json:"subPath,omitempty"`
}