lighthouse

package
v0.11.0-rc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

README

lighthouse

Name

Lighthouse - DNS Discovery for services across clusters.

Description

Lighthouse plugin allows Cross Cluster Service Discovery between Kubernetes clusters connected by Submariner.

If the default Kubernetes plugin fails to resolve a DNS request, the lighthouse plugin will try to resolve it using the information it gathered from other clusters that have joined the submariner control plane. On a successful resolution, lighthouse plugin returns the cluster IP of the service in the remote cluster. Submariner ensures that this IP is reachable.

Syntax

Lighthouse requires kubernetes plugin to be present.

lighthouse

Examples

. {
    errors
    log
    kubernetes cluster.local {
      fallthrough
    }
    lighthouse
}

Documentation

Overview

SPDX-License-Identifier: Apache-2.0

Copyright Contributors to the Submariner project.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

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.

SPDX-License-Identifier: Apache-2.0

Copyright Contributors to the Submariner project.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

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.

SPDX-License-Identifier: Apache-2.0

Copyright Contributors to the Submariner project.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

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.

SPDX-License-Identifier: Apache-2.0

Copyright Contributors to the Submariner project.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

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.

SPDX-License-Identifier: Apache-2.0

Copyright Contributors to the Submariner project.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

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.

Index

Constants

View Source
const (
	Svc = "svc"
	Pod = "pod"
)
View Source
const PluginName = "lighthouse"

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterStatus added in v0.6.0

type ClusterStatus interface {
	IsConnected(clusterID string) bool

	LocalClusterID() string
}

type EndpointsStatus added in v0.8.0

type EndpointsStatus interface {
	IsHealthy(name, namespace, clusterID string) bool
}

type Lighthouse

type Lighthouse struct {
	Next  plugin.Handler
	Fall  fall.F
	Zones []string
	// contains filtered or unexported fields
}

func (*Lighthouse) Name

func (lh *Lighthouse) Name() string

Name implements the Handler interface.

func (*Lighthouse) ServeDNS

func (lh *Lighthouse) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error)

ServeDNS implements the plugin.Handler interface.

type LocalServices added in v0.8.0

type LocalServices interface {
	GetIP(name, namespace string) (*serviceimport.DNSRecord, bool)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL