Revision 2fc54dd6dd9edb507cb3111e175071000189b81c authored by Daneyon Hansen on 04 March 2024, 23:58:46 UTC, committed by christarazi on 17 June 2024, 14:16:33 UTC
- `operator/option/config.go`: Adds an option for enabling AWS IPv6 prefix delegation (PD).
- `*_test.go`: Updates IPAM implementation unit tests to call `NewNodeManager()` with IPv6 PD config option.
- `pkg/ipam/node.go`: Adds `ipv6Alloc` field to `Node` type to represent IPv6-specific allocation node attributes.
- `pkg/ipam/node_manager.go`: Adds IPv6 PD field to the `NodeManager` type and associated `NewNodeManager()`.

Supports: #30684

Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
1 parent 51ff384
Raw File
svcname.go
// SPDX-License-Identifier: Apache-2.0
// Copyright Authors of Cilium

package iana

import (
	"regexp"
)

// IANA Service Name consists of alphanumeric characters of which at
// least one is not a number, as well as non-consecutive dashes ('-')
// except for in the beginning or the end.
// Note: Character case must be ignored when comparing service names.
var isSvcName = regexp.MustCompile(`^([a-zA-Z0-9]-?)*[a-zA-Z](-?[a-zA-Z0-9])*$`).MatchString

// IsSvcName returns true if the string conforms to IANA Service Name specification
// (RFC 6335 Section 5.1. Service Name Syntax)
func IsSvcName(name string) bool {
	return len(name) > 0 && len(name) <= 15 && isSvcName(name)
}
back to top