github.com/banzaicloud/operator-tools@v0.28.10/pkg/helm/values.go (about)

     1  // Copyright © 2020 Banzai Cloud
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //    http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  package helm
    16  
    17  import (
    18  	corev1 "k8s.io/api/core/v1"
    19  )
    20  
    21  // +kubebuilder:object:generate=true
    22  type Image struct {
    23  	Repository string            `json:"repository,omitempty"`
    24  	Tag        string            `json:"tag,omitempty"`
    25  	PullPolicy corev1.PullPolicy `json:"pullPolicy,omitempty"`
    26  }
    27  
    28  type Selectors struct {
    29  	NodeSelector map[string]string   `json:"nodeSelector,omitempty"`
    30  	Tolerations  []corev1.Toleration `json:"tolerations,omitempty"`
    31  	Affinity     *corev1.Affinity    `json:"affinity,omitempty"`
    32  }
    33  
    34  // +kubebuilder:object:generate=true
    35  type EnvironmentVariables struct {
    36  	Env              map[string]string  `json:"env,omitempty"`
    37  	EnvSecrets       []EnvSecret        `json:"envSecrets,omitempty"`
    38  	EnvResourceField []EnvResourceField `json:"envResourceField,omitempty"`
    39  	EnvConfigMap     []EnvConfigMap     `json:"envConfigMaps,omitempty"`
    40  }
    41  
    42  
    43  // +kubebuilder:object:generate=true
    44  type EnvConfigMap struct {
    45  	Name            string                      `json:"name"`
    46  	ConfigMapKeyRef corev1.ConfigMapKeySelector `json:"configMapKeyRef"`
    47  }
    48  
    49  // +kubebuilder:object:generate=true
    50  type EnvResourceField struct {
    51  	Name             string                       `json:"name"`
    52  	ResourceFieldRef corev1.ResourceFieldSelector `json:"resourceFieldRef"`
    53  }
    54  
    55  // +kubebuilder:object:generate=true
    56  type EnvSecret struct {
    57  	Name         string                   `json:"name"`
    58  	SecretKeyRef corev1.SecretKeySelector `json:"secretKeyRef"`
    59  }