package kubernetes import ( "errors" "github.com/coredns/coredns/plugin/etcd/msg" "github.com/coredns/coredns/plugin/pkg/dnsutil" "github.com/coredns/coredns/request" ) // The federation node.Labels keys used. const ( // TODO: Do not hardcode these labels. Pull them out of the API instead. // // We can get them via .... // import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" // metav1.LabelZoneFailureDomain // metav1.LabelZoneRegion // // But importing above breaks coredns with flag collision of 'log_dir' LabelZone = "failure-domain.beta.kubernetes.io/zone" LabelRegion = "failure-domain.beta.kubernetes.io/region" ) // Federations is used from the federations plugin to return the service that should be // returned as a CNAME for federation(s) to work. func (k *Kubernetes) Federations(state request.Request, fname, fzone string) (msg.Service, error) { nodeName := k.localNodeName() node, err := k.APIConn.GetNodeByName(nodeName) if err != nil { return msg.Service{}, err } r, err := parseRequest(state) if err != nil { return msg.Service{}, err } lz := node.Labels[LabelZone] lr := node.Labels[LabelRegion] if lz == "" || lr == "" { return msg.Service{}, errors.New("local node missing zone/region labels") } if r.endpoint == "" { return msg.Service{Host: dnsutil.Join(r.service, r.namespace, fname, r.podOrSvc, lz, lr, fzone)}, nil } return msg.Service{Host: dnsutil.Join(r.endpoint, r.service, r.namespace, fname, r.podOrSvc, lz, lr, fzone)}, nil } tion> Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
path: root/packages/astro/test/fixtures/astro-markdown-css/astro.config.mjs (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2022-06-28Fix Tailwind integration Typescript warning (#3732)Gravatar Victor 2-1/+6
2022-06-27[ci] formatGravatar bholmesdev 2-3/+3
2022-06-27Refactor: remove Deno shim to esbuild "banner" (#3734)Gravatar Ben Holmes 7-15/+22
2022-06-27[ci] formatGravatar FredKSchott 9-23/+25
2022-06-27update telemetry to support more anonymized project id (#3713)Gravatar Fred K. Schott 20-351/+311
2022-06-27SImplify "astro add" by removing confusing multi-select (#3715)Gravatar Fred K. Schott 13-258/+157