k8s.io/kubernetes@v1.31.0-alpha.0.0.20240520171757-56147500dadc/cmd/kube-proxy/app/server_other.go (about) 1 //go:build !windows && !linux 2 // +build !windows,!linux 3 4 /* 5 Copyright 2024 The Kubernetes Authors. 6 7 Licensed under the Apache License, Version 2.0 (the "License"); 8 you may not use this file except in compliance with the License. 9 You may obtain a copy of the License at 10 11 http://www.apache.org/licenses/LICENSE-2.0 12 13 Unless required by applicable law or agreed to in writing, software 14 distributed under the License is distributed on an "AS IS" BASIS, 15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 See the License for the specific language governing permissions and 17 limitations under the License. 18 */ 19 20 // Package app does all of the work necessary to configure and run a 21 // Kubernetes app process. 22 package app 23 24 import ( 25 "context" 26 "fmt" 27 "runtime" 28 29 "k8s.io/kubernetes/pkg/proxy" 30 proxyconfigapi "k8s.io/kubernetes/pkg/proxy/apis/config" 31 ) 32 33 // platformApplyDefaults is called after parsing command-line flags and/or reading the 34 // config file, to apply platform-specific default values to config. 35 func (o *Options) platformApplyDefaults(config *proxyconfigapi.KubeProxyConfiguration) { 36 } 37 38 var unsupportedError = fmt.Errorf(runtime.GOOS + "/" + runtime.GOARCH + "is unsupported") 39 40 // platformSetup is called after setting up the ProxyServer, but before creating the 41 // Proxier. It should fill in any platform-specific fields and perform other 42 // platform-specific setup. 43 func (s *ProxyServer) platformSetup(ctx context.Context) error { 44 return unsupportedError 45 } 46 47 // platformCheckSupported is called immediately before creating the Proxier, to check 48 // what IP families are supported (and whether the configuration is usable at all). 49 func (s *ProxyServer) platformCheckSupported(ctx context.Context) (ipv4Supported, ipv6Supported, dualStackSupported bool, err error) { 50 return false, false, false, unsupportedError 51 } 52 53 // createProxier creates the proxy.Provider 54 func (s *ProxyServer) createProxier(ctx context.Context, config *proxyconfigapi.KubeProxyConfiguration, dualStackMode, initOnly bool) (proxy.Provider, error) { 55 return nil, unsupportedError 56 } 57 58 // platformCleanup removes stale kube-proxy rules that can be safely removed. 59 func platformCleanup(ctx context.Context, mode proxyconfigapi.ProxyMode, cleanupAndExit bool) error { 60 return unsupportedError 61 }