mirror of
https://github.com/kubernetes/sample-controller.git
synced 2026-05-01 00:00:03 +08:00
Merge pull request #62657 from matthyx/master
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Update all script shebangs to use /usr/bin/env interpreter instead of /bin/interpreter This is required to support systems where bash doesn't reside in /bin (such as NixOS, or the *BSD family) and allow users to specify a different interpreter version through $PATH manipulation. https://www.cyberciti.biz/tips/finding-bash-perl-python-portably-using-env.html ```release-note Use /usr/bin/env in all script shebangs to increase portability. ``` Kubernetes-commit: b5f61ac129019d314e473584c1491b7ca62144c7
This commit is contained in:
Generated
Vendored
+1
-3
@@ -19,8 +19,6 @@ limitations under the License.
|
||||
package scheme
|
||||
|
||||
import (
|
||||
os "os"
|
||||
|
||||
registered "k8s.io/apimachinery/pkg/apimachinery/registered"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -34,7 +32,7 @@ var Scheme = runtime.NewScheme()
|
||||
var Codecs = serializer.NewCodecFactory(Scheme)
|
||||
var ParameterCodec = runtime.NewParameterCodec(Scheme)
|
||||
|
||||
var Registry = registered.NewOrDie(os.Getenv("KUBE_API_VERSIONS"))
|
||||
var Registry = registered.NewAPIRegistrationManager()
|
||||
|
||||
func init() {
|
||||
v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"})
|
||||
|
||||
Generated
Vendored
+2
-2
@@ -75,8 +75,8 @@ func setConfigDefaults(config *rest.Config) error {
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group {
|
||||
gv := g.GroupVersion
|
||||
if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersions[0].Group {
|
||||
gv := g.GroupVersions[0]
|
||||
config.GroupVersion = &gv
|
||||
}
|
||||
config.NegotiatedSerializer = scheme.Codecs
|
||||
|
||||
Generated
Vendored
+2
-2
@@ -75,8 +75,8 @@ func setConfigDefaults(config *rest.Config) error {
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group {
|
||||
gv := g.GroupVersion
|
||||
if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersions[0].Group {
|
||||
gv := g.GroupVersions[0]
|
||||
config.GroupVersion = &gv
|
||||
}
|
||||
config.NegotiatedSerializer = scheme.Codecs
|
||||
|
||||
Reference in New Issue
Block a user