Skip to content

kubeapiserver: rename '--experimental-encryption-provider-config' to …#61592

Closed
marrrvin wants to merge 1 commit intokubernetes:masterfrom
marrrvin:rename-encryption-provider-config
Closed

kubeapiserver: rename '--experimental-encryption-provider-config' to …#61592
marrrvin wants to merge 1 commit intokubernetes:masterfrom
marrrvin:rename-encryption-provider-config

Conversation

@marrrvin
Copy link
Copy Markdown

@marrrvin marrrvin commented Mar 23, 2018

…'--encryption-provider-config'.

This change renames the '--experimental-encryption-provider-config' flag to '--encryption-provider-config'. The old flag is accepted but generates a warning.

In 1.12, we will drop support for '--experimental-encryption-provider-config' entirely.

What this PR does / why we need it:

Encryption at rest with static configs has been promoted to beta.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Updates #61420

Special notes for your reviewer:

Release note:

Encryption at rest with static configs has been promoted to beta.
API server flag `--experimental-encryption-provider-config` has been renamed to `--encryption-provider-config`. The old flag is accepted with a warning but will be removed in 1.12.

…'--encryption-provider-config'.

This change renames the '--experimental-encryption-provider-config' flag to '--encryption-provider-config'. The old flag is accepted but generates a warning.

In 1.12, we will drop support for '--experimental-encryption-provider-config' entirely.
@k8s-ci-robot k8s-ci-robot added do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 23, 2018
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: marrrvin
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approvers: deads2k, mwielgus

Assign the PR to them by writing /assign @deads2k @mwielgus in a comment when ready.

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 23, 2018
@marrrvin
Copy link
Copy Markdown
Author

@php-coder FYI

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Mar 23, 2018
@php-coder
Copy link
Copy Markdown
Contributor

@marrrvin Thank you for your contribution!

Could you update PR title to make it shorter?

Also in the description, please, replace Fixes # by Fixes #61420 (in this case when PR will get merged, the related issue will be closed automatically).

And this issue deserves to be mentioned in the changelog, hence release note is needed. I'd suggest to something like:

Encryption at rest with static configs has been promoted to beta.
API server flag `--experimental-encryption-provider-config` has been renamed to `--encryption-provider-config`. The old flag is accepted with a warning but will be removed in 1.12

@ericchiang @liggitt PTAL. Do we need release note with required action in this case?

/sig auth
/ok-to-test

@k8s-ci-robot k8s-ci-robot added sig/auth Categorizes an issue or PR as relevant to SIG Auth. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 23, 2018
@php-coder
Copy link
Copy Markdown
Contributor

php-coder commented Mar 23, 2018

@marrrvin Please, mention also that Encryption at rest with static configs has been promoted to beta. This is important message to users that it's not in Alpha anymore.

@liggitt
Copy link
Copy Markdown
Member

liggitt commented Mar 23, 2018

before this can be merged, we have to fix the way the encryption config is parsed. currently it uses a non-standard parsing method that pays no attention to the version of the config:

var config EncryptionConfig
err = yaml.Unmarshal(configFileContents, &config)
if err != nil {
return nil, fmt.Errorf("error while parsing file: %v", err)
}
if config.Kind == "" {
return nil, fmt.Errorf("invalid configuration file, missing Kind")
}
if config.Kind != "EncryptionConfig" {
return nil, fmt.Errorf("invalid configuration kind %q provided", config.Kind)
}
// TODO config.APIVersion is unchecked

the types must change to use standard methods for including kind/apiVersion (inlining metav1.TypeMeta like all other objects), define a versioned config (we can promote straight to v1beta1 if we don't require any structural changes), and parsing must require well-formed config files before this is promoted out of experimental mode.

@marrrvin
Copy link
Copy Markdown
Author

@liggitt Thanks. Could you please put me an example of standard parsing method?

@php-coder
Copy link
Copy Markdown
Contributor

php-coder commented Mar 23, 2018

Could you please put me an example of standard parsing method?

Looks like you may follow this example:

// loadConfigFromFile loads the contents of file and decodes it as a
// KubeProxyConfiguration object.
func (o *Options) loadConfigFromFile(file string) (*kubeproxyconfig.KubeProxyConfiguration, error) {
data, err := ioutil.ReadFile(file)
if err != nil {
return nil, err
}
return o.loadConfig(data)
}
// loadConfig decodes data as a KubeProxyConfiguration object.
func (o *Options) loadConfig(data []byte) (*kubeproxyconfig.KubeProxyConfiguration, error) {
configObj, gvk, err := o.codecs.UniversalDecoder().Decode(data, nil, nil)
if err != nil {
return nil, err
}
config, ok := configObj.(*kubeproxyconfig.KubeProxyConfiguration)
if !ok {
return nil, fmt.Errorf("got unexpected config type: %v", gvk)
}
return config, nil
}

@liggitt Please, confirm.

@liggitt
Copy link
Copy Markdown
Member

liggitt commented Mar 23, 2018

yes, roughly that.

  1. fix type definition to actually be a runtime object, inline TypeMeta, etc
  2. define v1beta1 API types, generate conversions/defaults
  3. define scheme/codecs that have the external (v1beta1) and internal (existing) types registered
  4. use that scheme/codec to load the config (handles decoding the v1beta1 version, conversion to internal version)

@php-coder
Copy link
Copy Markdown
Contributor

php-coder commented Mar 23, 2018

@liggitt Thanks, Jordan! I've extracted this task to the separate issue: #61599

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 26, 2018
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

@marrrvin: PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Copy Markdown
Member

@dims dims left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like changes requested by @liggitt was done in another PR

@php-coder
Copy link
Copy Markdown
Contributor

Looks like changes requested by @liggitt was done in another PR

Not yet, unfortunately (as now that PR requires another PR :) )

Copy link
Copy Markdown
Contributor

@php-coder php-coder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides rebasing against the latest master, we need to also update another place that was introduced recently:

$ git grep 'experimental-encryption-provider-config'
...
cluster/gce/gci/apiserver_manifest_test.go:     return fmt.Sprintf("--experimental-encryption-provider-config=%s", path)
cluster/gce/gci/apiserver_manifest_test.go:// EncryptionProviderConfig file of type KMS and inject experimental-encryption-provider-config startup flag.

@marrrvin
Copy link
Copy Markdown
Author

@php-coder ok. I'll try to do it on holidays.

@dims
Copy link
Copy Markdown
Member

dims commented Aug 23, 2018

/milestone v1.12

Looks like this needs to be in 1.12 please drop the milestone if i am reading this wrong

@k8s-ci-robot k8s-ci-robot added this to the v1.12 milestone Aug 23, 2018
@dims
Copy link
Copy Markdown
Member

dims commented Aug 23, 2018

@marrrvin can you please rebase?

@liggitt
Copy link
Copy Markdown
Member

liggitt commented Aug 29, 2018

/hold

while this is definitely desired, we shouldn't drop the experimental prefix until the config driving this graduates from alpha (in progress in #67383)

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 29, 2018
@liggitt liggitt modified the milestones: v1.12, v1.13 Sep 5, 2018
@shubheksha
Copy link
Copy Markdown
Contributor

ping @marrrvin, @liggitt - is this on track for 1.13 since there hasn't been any update?

@dims
Copy link
Copy Markdown
Member

dims commented Nov 16, 2018

@marrrvin this needs rebase ... code freeze is tomorrow! ( https://github.com/kubernetes/sig-release/tree/master/releases/release-1.13 )

@mikedanese mikedanese modified the milestones: v1.13, next-candidate Nov 17, 2018
@stlaz
Copy link
Copy Markdown
Member

stlaz commented Nov 19, 2018

@dims should we just do the rebase ourselves? I've got it ready in https://github.com/stlaz/kubernetes/tree/enc_config_opt but won't be able to push it in this PR.
The hold could also be dropped since the alpha->stable PR was pushed already.

@dims
Copy link
Copy Markdown
Member

dims commented Nov 19, 2018

@stlaz please open a fresh PR and we can discuss there.

@stlaz
Copy link
Copy Markdown
Member

stlaz commented Nov 19, 2018

@dims Done in #71206

@stlaz
Copy link
Copy Markdown
Member

stlaz commented Nov 27, 2018

This PR can now be closed as the above one was merged.

@php-coder
Copy link
Copy Markdown
Contributor

/close

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

@php-coder: Closed this PR.

Details

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/auth Categorizes an issue or PR as relevant to SIG Auth. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants