func (c *Template) EncodeNestedObjects(e runtime.Encoder) error { for i := range c.Objects { if err := extension.EncodeNestedRawExtension(runtime.UnstructuredJSONScheme, &c.Objects[i]); err != nil { return err } } return nil }
// EncodeNestedObjects handles encoding RawExtensions on the MasterConfig, ensuring the // objects are encoded with the provided encoder. func (c *MasterConfig) EncodeNestedObjects(e runtime.Encoder) error { for k, v := range c.AdmissionConfig.PluginConfig { if err := extension.EncodeNestedRawExtension(e, &v.Configuration); err != nil { return err } c.AdmissionConfig.PluginConfig[k] = v } if c.KubernetesMasterConfig != nil { for k, v := range c.KubernetesMasterConfig.AdmissionConfig.PluginConfig { if err := extension.EncodeNestedRawExtension(e, &v.Configuration); err != nil { return err } c.KubernetesMasterConfig.AdmissionConfig.PluginConfig[k] = v } } if c.OAuthConfig != nil { for i := range c.OAuthConfig.IdentityProviders { if err := extension.EncodeNestedRawExtension(e, &c.OAuthConfig.IdentityProviders[i].Provider); err != nil { return err } } } return nil }
func (c *PolicyRule) EncodeNestedObjects(e runtime.Encoder) error { return extension.EncodeNestedRawExtension(e, &c.AttributeRestrictions) }