mirror of
https://github.com/kubernetes/sample-controller.git
synced 2026-04-12 00:00:26 +08:00
Merge pull request #63059 from ceshihao/upgrade_json_package_fix_base64_newline
Automatic merge from submit-queue (batch tested with PRs 59965, 59115, 63076, 63059). 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>. Upgrade dep json-iterator/go to fix base64 decode bug **What this PR does / why we need it**: upgrade dep `json-iterator/go` to fix base64 decode bug #62742 **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes #62742 **Special notes for your reviewer**: Just upgrade `json-iterator/go` to latest which includes base64 decode fix https://github.com/json-iterator/go/pull/266 No other code changes **Release note**: ```release-note None ``` Kubernetes-commit: 3dbcd1ddcee786f443f89a82514bbd9c6ad06c99
This commit is contained in:
Generated
Vendored
+8
-11
@@ -96,16 +96,14 @@ func (g *GenScheme) GenerateType(c *generator.Context, t *types.Type, w io.Write
|
||||
"runtimeScheme": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/runtime", Name: "Scheme"}),
|
||||
"schemaGroupVersion": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/runtime/schema", Name: "GroupVersion"}),
|
||||
"metav1AddToGroupVersion": c.Universe.Function(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "AddToGroupVersion"}),
|
||||
"announcedAPIGroupFactoryRegistry": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apimachinery/announced", Name: "APIGroupFactoryRegistry"}),
|
||||
"registeredNewOrDie": c.Universe.Function(types.Name{Package: "k8s.io/apimachinery/pkg/apimachinery/registered", Name: "NewOrDie"}),
|
||||
"registeredAPIRegistrationManager": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apimachinery/registered", Name: "APIRegistrationManager"}),
|
||||
}
|
||||
globals := map[string]string{
|
||||
"Scheme": "Scheme",
|
||||
"Codecs": "Codecs",
|
||||
"ParameterCodec": "ParameterCodec",
|
||||
"Registry": "Registry",
|
||||
"GroupFactoryRegistry": "GroupFactoryRegistry",
|
||||
"Scheme": "Scheme",
|
||||
"Codecs": "Codecs",
|
||||
"ParameterCodec": "ParameterCodec",
|
||||
"Registry": "Registry",
|
||||
}
|
||||
for k, v := range globals {
|
||||
if g.PrivateScheme {
|
||||
@@ -140,20 +138,19 @@ var $.ParameterCodec$ = $.runtimeNewParameterCodec|raw$($.Scheme$)
|
||||
|
||||
var registryRegistration = `
|
||||
var $.Registry$ = $.registeredNewOrDie|raw$($.osGetenv|raw$("KUBE_API_VERSIONS"))
|
||||
var $.GroupFactoryRegistry$ = make($.announcedAPIGroupFactoryRegistry|raw$)
|
||||
|
||||
func init() {
|
||||
$.metav1AddToGroupVersion|raw$($.Scheme$, $.schemaGroupVersion|raw${Version: "v1"})
|
||||
Install($.GroupFactoryRegistry$, $.Registry$, $.Scheme$)
|
||||
Install($.Registry$, $.Scheme$)
|
||||
}
|
||||
|
||||
// Install registers the API group and adds types to a scheme
|
||||
func Install(groupFactoryRegistry $.announcedAPIGroupFactoryRegistry|raw$, registry *$.registeredAPIRegistrationManager|raw$, scheme *$.runtimeScheme|raw$) {
|
||||
func Install(registry *$.registeredAPIRegistrationManager|raw$, scheme *$.runtimeScheme|raw$) {
|
||||
$- range .allInstallGroups$
|
||||
$.InstallPackageAlias$.Install(groupFactoryRegistry, registry, scheme)
|
||||
$.InstallPackageAlias$.Install(registry, scheme)
|
||||
$- end$
|
||||
$if .customRegister$
|
||||
ExtraInstall(groupFactoryRegistry, registry, scheme)
|
||||
ExtraInstall(registry, scheme)
|
||||
$end -$
|
||||
}
|
||||
`
|
||||
|
||||
Reference in New Issue
Block a user