func (vault *Vault) GetIngress() *Ingress {
	if vault.Spec.Ingress != nil {
		// Add the Vault Service as the default backend if not specified
		if vault.Spec.Ingress.Spec.Backend == nil {
			vault.Spec.Ingress.Spec.Backend = &v1beta1.IngressBackend{
				ServiceName: vault.Name,
				ServicePort: intstr.FromInt(8200),
			}
		}

		if vault.Spec.Ingress.Annotations == nil {
			vault.Spec.Ingress.Annotations = map[string]string{}
		}

		// If TLS is enabled add the Ingress TLS backend annotations
		if !vault.Spec.GetTLSDisable() {
			// Supporting the NGINX ingress controller with TLS backends
			// https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#backend-protocol
			vault.Spec.Ingress.Annotations["nginx.ingress.kubernetes.io/backend-protocol"] = "HTTPS"

			// Supporting the Traefik ingress controller with TLS backends
			// https://docs.traefik.io/configuration/backends/kubernetes/#tls-communication-between-traefik-and-backend-pods
			vault.Spec.Ingress.Annotations["ingress.kubernetes.io/protocol"] = "https"

			// Supporting the HAProxy ingress controller with TLS backends
			// https://github.com/jcmoraisjr/haproxy-ingress#secure-backend
			vault.Spec.Ingress.Annotations["ingress.kubernetes.io/secure-backends"] = "true"
		}

		return vault.Spec.Ingress
	}

	return nil
}
// GetIngress the Ingress configuration for Vault if any
GetIngress the Ingress configuration for Vault if any
// GetIngress the Ingress configuration for Vault if any
func (vault *Vault) GetIngress() *Ingress {
	if vault.Spec.Ingress != nil {
		if vault.Spec.Ingress.Spec.Backend == nil {
			vault.Spec.Ingress.Spec.Backend = &v1beta1.IngressBackend{
				ServiceName: vault.Name,
				ServicePort: intstr.FromInt(8200),
			}
		}
		if vault.Spec.Ingress.Annotations == nil {
			vault.Spec.Ingress.Annotations = map[string]string{}
		}
		if !vault.Spec.GetTLSDisable() {
			vault.Spec.Ingress.Annotations["nginx.ingress.kubernetes.io/backend-protocol"] = "HTTPS"
			vault.Spec.Ingress.Annotations["ingress.kubernetes.io/protocol"] = "https"
			vault.Spec.Ingress.Annotations["ingress.kubernetes.io/secure-backends"] = "true"
		}
		return vault.Spec.Ingress
	}
	return nil
}
func ( vault * Vault ) GetIngress ( ) * Ingress { if vault . Spec . Ingress != nil { if vault . Spec . Ingress . Spec . Backend == nil { vault . Spec . Ingress . Spec . Backend = & v1beta1 . IngressBackend { ServiceName : vault . Name , ServicePort : intstr . FromInt ( 8200 ) , } } if vault . Spec . Ingress . Annotations == nil { vault . Spec . Ingress . Annotations = map [ string ] string { } } if ! vault . Spec . GetTLSDisable ( ) { vault . Spec . Ingress . Annotations [ " " ] = " " vault . Spec . Ingress . Annotations [ " " ] = " " vault . Spec . Ingress . Annotations [ " " ] = " " } return vault . Spec . Ingress } return nil }
GetIngress the Ingress configuration for Vault if any
GetIngress the Ingress configuration for Vault if any
// Add the Vault Service as the default backend if not specified // If TLS is enabled add the Ingress TLS backend annotations // Supporting the NGINX ingress controller with TLS backends // https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#backend-protocol // Supporting the Traefik ingress controller with TLS backends // https://docs.traefik.io/configuration/backends/kubernetes/#tls-communication-between-traefik-and-backend-pods // Supporting the HAProxy ingress controller with TLS backends // https://github.com/jcmoraisjr/haproxy-ingress#secure-backend