github.com/caos/orbos@v1.5.14-0.20221103111702-e6cd0cea7ad4/internal/operator/boom/application/applications/apigateway/helm/values.go (about) 1 package helm 2 3 import ( 4 "github.com/caos/orbos/pkg/kubernetes/k8s" 5 "gopkg.in/yaml.v3" 6 ) 7 8 type AdminService struct { 9 Annotations map[string]string `yaml:"annotations"` 10 Create bool `yaml:"create"` 11 Port int `yaml:"port"` 12 Type string `yaml:"type"` 13 } 14 type AuthService struct { 15 Create bool `yaml:"create"` 16 OptionalConfigurations interface{} `yaml:"optional_configurations"` 17 } 18 type Resource struct { 19 Name string `yaml:"name"` 20 TargetAverageUtilization int `yaml:"targetAverageUtilization"` 21 } 22 type Metrics []struct { 23 Resource *Resource `yaml:"resource"` 24 Type string `yaml:"type"` 25 } 26 type Autoscaling struct { 27 Enabled bool `yaml:"enabled"` 28 MaxReplicas int `yaml:"maxReplicas"` 29 Metrics *Metrics `yaml:"metrics"` 30 MinReplicas int `yaml:"minReplicas"` 31 } 32 type Crds struct { 33 Create bool `yaml:"create"` 34 Enabled bool `yaml:"enabled"` 35 Keep bool `yaml:"keep"` 36 } 37 type DeploymentStrategy struct { 38 Type string `yaml:"type"` 39 } 40 type Image struct { 41 PullPolicy string `yaml:"pullPolicy"` 42 Repository string `yaml:"repository"` 43 Tag string `yaml:"tag"` 44 } 45 type LicenseKey struct { 46 CreateSecret bool `yaml:"createSecret"` 47 Value interface{} `yaml:"value"` 48 } 49 type LivenessProbe struct { 50 FailureThreshold int `yaml:"failureThreshold"` 51 InitialDelaySeconds int `yaml:"initialDelaySeconds"` 52 PeriodSeconds int `yaml:"periodSeconds"` 53 } 54 type PrometheusExporter struct { 55 Enabled bool `yaml:"enabled"` 56 PullPolicy string `yaml:"pullPolicy"` 57 Repository string `yaml:"repository"` 58 Resources *k8s.Resources `yaml:"resources"` 59 Tag string `yaml:"tag"` 60 } 61 type RateLimit struct { 62 Create bool `yaml:"create"` 63 } 64 type Rbac struct { 65 Create bool `yaml:"create"` 66 PodSecurityPolicies struct{} `yaml:"podSecurityPolicies"` 67 } 68 type ReadinessProbe struct { 69 FailureThreshold int `yaml:"failureThreshold"` 70 InitialDelaySeconds int `yaml:"initialDelaySeconds"` 71 PeriodSeconds int `yaml:"periodSeconds"` 72 } 73 type RedisAnnotations struct { 74 Deployment map[string]string `yaml:"deployment"` 75 Service map[string]string `yaml:"service"` 76 } 77 type Redis struct { 78 Annotations *RedisAnnotations `yaml:"annotations"` 79 Create bool `yaml:"create"` 80 Resources *k8s.Resources `yaml:"resources"` 81 NodeSelector map[string]string `yaml:"nodeSelector"` 82 } 83 type Scope struct { 84 SingleNamespace bool `yaml:"singleNamespace"` 85 } 86 type Security struct { 87 PodSecurityContext *PodSecurityContext `yaml:"podSecurityContext"` 88 ContainerSecurityContext *ContainerSecurityContext `yaml:"containerSecurityContext"` 89 } 90 type PodSecurityContext struct { 91 RunAsUser int `yaml:"runAsUser"` 92 } 93 type ContainerSecurityContext struct { 94 AllowPrivilegeEscalation bool `yaml:"allowPrivilegeEscalation"` 95 } 96 type Port struct { 97 Name string `yaml:"name"` 98 Port uint16 `yaml:"port,omitempty"` 99 TargetPort uint16 `yaml:"targetPort,omitempty"` 100 NodePort uint16 `yaml:"nodePort,omitempty"` 101 } 102 type Service struct { 103 Annotations *ModuleAnnotation `yaml:"annotations,omitempty"` 104 Ports []*Port `yaml:"ports"` 105 Type string `yaml:"type"` 106 LoadBalancerIP string `yaml:"loadBalancerIP,omitempty"` 107 } 108 109 type ModuleAnnotation struct { 110 Module *AmbassadorModuleAnnotation `yaml:"getambassador.io/config"` 111 } 112 113 type AmbassadorModuleAnnotation struct { 114 ApiVersion string `yaml:"apiVersion"` 115 Kind string `yaml:"kind"` 116 Name string `yaml:"name"` 117 Config *AmbassadorModuleConfig `yaml:"config"` 118 } 119 120 func (m *AmbassadorModuleAnnotation) MarshalYAML() (interface{}, error) { 121 if m == nil { 122 return nil, nil 123 } 124 125 i := *m 126 bytes, err := yaml.Marshal(i) 127 128 return string(bytes), err 129 } 130 131 type AmbassadorModuleConfig struct { 132 UseProxyProto bool `yaml:"use_proxy_proto"` 133 EnableGRPCWeb bool `yaml:"enable_grpc_web"` 134 Diagnostics *AmbassadorDiagnosticst 135 } 136 137 type AmbassadorDiagnosticst struct { 138 Enabled bool `yaml:"enabled"` 139 } 140 141 type ServiceAccount struct { 142 Create bool `yaml:"create"` 143 Name interface{} `yaml:"name"` 144 } 145 146 type Values struct { 147 AdminService *AdminService `yaml:"adminService"` 148 Affinity *k8s.Affinity `yaml:"affinity"` 149 AmbassadorConfig string `yaml:"ambassadorConfig"` 150 AuthService *AuthService `yaml:"authService"` 151 Autoscaling *Autoscaling `yaml:"autoscaling"` 152 Crds *Crds `yaml:"crds"` 153 CreateDevPortalMapping bool `yaml:"createDevPortalMappings"` 154 DaemonSet bool `yaml:"daemonSet"` 155 DeploymentAnnotations map[string]string `yaml:"deploymentAnnotations"` 156 DeploymentStrategy *DeploymentStrategy `yaml:"deploymentStrategy"` 157 DNSPolicy string `yaml:"dnsPolicy"` 158 Env map[string]string `yaml:"env"` 159 FullnameOverride string `yaml:"fullnameOverride"` 160 HostNetwork bool `yaml:"hostNetwork"` 161 Image *Image `yaml:"image"` 162 ImagePullSecrets []interface{} `yaml:"imagePullSecrets"` 163 InitContainers []interface{} `yaml:"initContainers"` 164 LicenseKey *LicenseKey `yaml:"licenseKey"` 165 LivenessProbe *LivenessProbe `yaml:"livenessProbe"` 166 NameOverride string `yaml:"nameOverride"` 167 NodeSelector map[string]string `yaml:"nodeSelector"` 168 PodAnnotations map[string]string `yaml:"podAnnotations"` 169 PodDisruptionBudget struct{} `yaml:"podDisruptionBudget"` 170 PodLabels map[string]string `yaml:"podLabels"` 171 PriorityClassName string `yaml:"priorityClassName"` 172 PrometheusExporter *PrometheusExporter `yaml:"prometheusExporter"` 173 RateLimit *RateLimit `yaml:"rateLimit"` 174 Rbac *Rbac `yaml:"rbac"` 175 ReadinessProbe *ReadinessProbe `yaml:"readinessProbe"` 176 Redis *Redis `yaml:"redis"` 177 RedisURL interface{} `yaml:"redisURL"` 178 ReplicaCount int `yaml:"replicaCount"` 179 Resources *k8s.Resources `yaml:"resources"` 180 Scope *Scope `yaml:"scope"` 181 Security *Security `yaml:"security"` 182 Service *Service `yaml:"service"` 183 ServiceAccount *ServiceAccount `yaml:"serviceAccount"` 184 SidecarContainers []interface{} `yaml:"sidecarContainers"` 185 Tolerations k8s.Tolerations `yaml:"tolerations"` 186 VolumeMounts []interface{} `yaml:"volumeMounts"` 187 Volumes []interface{} `yaml:"volumes"` 188 }