Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrIngressRuleAlreadyExists = errors.New("ingress rule already exists")
View Source
var ErrIngressRuleNotFound = errors.New("could not find ingress rule for service")
View Source
var ErrTlsConfigurationAlreadyExists = errors.New("tls configuration for hostname already exists")
Functions ¶
func CreateIngressRule ¶
func CreateIngressRule(hostname string, path string, pathType networking.PathType, backendServiceName string, port int32) *networking.IngressRule
CreateIngressRule creates a new rule for an ingress.
Types ¶
type IngressService ¶
type IngressService struct {
// contains filtered or unexported fields
}
func NewIngressService ¶
func NewIngressService(clientset *kubernetes.Clientset, namespace string, ingressName string, ingressClassName string) *IngressService
func (*IngressService) AddRule ¶
func (i *IngressService) AddRule(ctx context.Context, ingressRule *networking.IngressRule, tlsSecret string) (created bool, err error)
AddRule configures a new backend rule. If an ingress with the given name i.ingressName exists it will be updated, otherwise a new ingress will be created. Returns if the ingress has been created and an error
func (*IngressService) DeleteRule ¶
func (i *IngressService) DeleteRule(ctx context.Context, serviceName string, servicePort int32) (deleted bool, err error)
DeleteRule removes the rule by service name or service name and port. Returns if the resource has been deleted and an error
Click to show internal directories.
Click to hide internal directories.