Documentation ¶
Index ¶
- func HashObject(obj runtime.Object, codec runtime.Codec) (string, error)
- func LookupContainerPortNumberByName(pod api.Pod, name string) (int32, error)
- func LookupContainerPortNumberByServicePort(svc api.Service, pod api.Pod, port int32) (int32, error)
- func ParseFileSource(source string) (keyName, filePath string, err error)
- func ParseLiteralSource(source string) (keyName, value string, err error)
- func ParseRFC3339(s string, nowFn func() metav1.Time) (metav1.Time, error)
- func Umask(mask int) (old int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LookupContainerPortNumberByName ¶ added in v1.10.6
Lookup containerPort number by its named port name
func LookupContainerPortNumberByServicePort ¶ added in v1.10.6
func LookupContainerPortNumberByServicePort(svc api.Service, pod api.Pod, port int32) (int32, error)
Lookup containerPort number from Service port number It implements the handling of resolving container named port, as well as ignoring targetPort when clusterIP=None It returns an error when a named port can't find a match (with -1 returned), or when the service does not declare such port (with the input port number returned).
func ParseFileSource ¶ added in v1.9.0
ParseFileSource parses the source given.
Acceptable formats include: 1. source-path: the basename will become the key name 2. source-name=source-path: the source-name will become the key name and source-path is the path to the key file.
Key names cannot include '='.
func ParseLiteralSource ¶ added in v1.9.0
ParseLiteralSource parses the source key=val pair into its component pieces. This functionality is distinguished from strings.SplitN(source, "=", 2) since it returns an error in the case of empty keys, values, or a missing equals sign.
func ParseRFC3339 ¶
ParseRFC3339 parses an RFC3339 date in either RFC3339Nano or RFC3339 format.
Types ¶
This section is empty.