The ioutils module was deprecated in Go 1.16. This updates the example test code
to use the newer recommended replacement.
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Major revisions included:
- Fake Job labels and selectors generation for validation.
- Remove obsolete PVC validation options.
- Include newly discovered manifests into the test case.
- Remove tests related to PodSecurityPolicy which is gone forever.
This PR makes sure the manifests under `content/en/examples`
are valid in v1.28. The primary fixes are:
- Updated the go.mod/go.sum file for testing against v1.28.0 release.
- Revise test case code to ensure newly added manifests are tested;
- Adapt Pod validation options to upstream validation code change;
- Move a ValidatingWebhookConfiguration YAML back to inline because
the manifest cannot validate against the validator. The CA bundle
referenced is not a valid string (base64 encoded). That means the
YAML cannot be used/tested as is by users.
- Some examples are actually not good "examples", i.e. they are not
not ready for the users to try out.
- Some examples are failing the validation in their current format.
- Some examples skipped the test case.
These issues are fixed.
This PR fixes the examples test so that all YAML manifests under
examples directory are assured to be working under 1.25.
The content/js/examples/examples_test.go is out-dated and it is blocking
the `go mod tidy` run unfortunately. So this PR removes it.
This PR updates the go.mod file so that tests of the example manifests
are run against the 1.20 branch. The missing test cases for newly added
examples are also added. To perform tests on your local machine, run the
following command on the root of your local clone:
```
go test k8s.io/website/content/en/examples
```
* feat: graduate TaintNodesByCondition to GA (#17073)
* Promote StartupProbe to beta (enabled by default). (#17164)
* Watch bookmarks to GA (#17026)
* feat: graduate ScheduleDaemonSetPods to GA (#17350)
* Update Docker installation instructions (#17405)
* Use exact version numbers for installing Docker in Ubuntu (#17428)
* Move CSIMigration and CSIMigrationGCE to Beta in Kubernetes v1.17 (#17478)
* Promote NodeLease feature to GA (#17189)
* Update docs for csi topology ga (#17408)
* Update RunAsUsername to beta (#17460)
* doc:Update RunAsUsername to beta
* doc: update samples - kubernetes.io/os is no longer beta
* Updating based on review feedback
* Promote Node-specific volume limits to GA (#17432)
* Promote PodShareProcessNamespace to stable (#17192)
* Promote PodShareProcessNamespace to stable
* Add for_k8s_version to feature-state label
Co-Authored-By: Tim Bannister <tim@scalefactory.com>
* Readd version-check to shareProcessNamespace task
* Update service load balancer finalizer doc for GA (#17438)
* Update Topology Manager docs (#17451)
* Added information on how device plugins can take advantage
of Topology Manager
* Updated the Topology Manager documentation to include additionalinformation and update some out of date sections
* Fix broken Topology Manager link (#17746)
Part of What's Next Device Plugin section
* Update CRD defaulting docs for GA (#17450)
* Add documentation for VolumeSnapshot Beta (#17233)
* Updating EndpointSlice documentation for beta release in 1.17 (#17411)
* (docs/dualstack): v1.17 updates (#17457)
* Add placehold doc updates for dualstack in 1.17
Signed-off-by: Lachlan Evenson <lachlan.evenson@microsoft.com>
* Add Downward API and /etc/hosts Pod IP validation
Signed-off-by: Lachlan Evenson <lachlan.evenson@microsoft.com>
* remove addressed known issue via k/k pr 85246
Signed-off-by: Lachlan Evenson <lachlan.evenson@microsoft.com>
* Remove known issue and add flag as part of k/k 79993
Signed-off-by: Lachlan Evenson <lachlan.evenson@microsoft.com>
* remove follow up placeholders
Signed-off-by: Lachlan Evenson <lachlan.evenson@microsoft.com>
* Update verbiage
Signed-off-by: Lachlan Evenson <lachlan.evenson@microsoft.com>
* Make IP addressing consistent throughout the task
Signed-off-by: Lachlan Evenson <lachlan.evenson@microsoft.com>
* Update to status.podIPs
Signed-off-by: Lachlan Evenson <lachlan.evenson@microsoft.com>
* Update content/en/docs/tasks/network/validate-dual-stack.md
Use set instead of env
Co-Authored-By: Khaled Henidak (Kal) <khnidk@outlook.com>
* add topology.kubernetes.io/zone, topology.kubernetes.io/region and node.kubernetes.io/instance-type labels to docs (#17498)
Signed-off-by: Andrew Sy Kim <kiman@vmware.com>
* Service topology alpha documentation (#17459)
* Update list of feature flags for in-tree plugins migrated to CSI (#17533)
Signed-off-by: Deep Debroy <ddebroy@docker.com>
* Update Node concept for TaintNodesByCondition going GA (#17577)
* feat: graduate ResourceQuotaScopeSelectors to GA in 1.17 (#17554)
* kubeadm: update the upgrade documentation for 1.17 (#17587)
* doc: Simplify Windows deployments with RuntimeClass (#16697)
* doc: Simplify Windows deployments with RuntimeClass
* Updating on review feedback
* doc: Adding windows-build label from enhancement 1301
* update doc for kubelet option --reserved-cpus (#17648)
* feat: update TaintNodesByCondition in feature gates table (#17377)
* Update docs for v1 resource quota configuration (#17547)
* AdmissionConfiguration v1 (#17548)
* Update WebhookAdmissionConfiguration examples (#17549)
* Update AWS EBS Migration Feature state (#16126)
* Add resource version section to api-concepts documentation (#16910)
* Add Resource Version semantics section to api concepts
* Clarify risks of going back in time, add details about compaction and watch cache sizes
* Apply suggestions from liggitt
Co-Authored-By: Jordan Liggitt <jordan@liggitt.net>
* remove pesudocode, apply feedback
* Fix typo
* Clarify equality rules
* Cleanup kubectl generators docs (#17609)
* Write ReplicationController without a space
* Drop mentioning unsupported cluster versions
* Fix capitalization for “API group”
* Tweak wording
* Avoid using deprecated generator in example
* add Antrea description in dev-1.17 (#17919)
* Promote VolumeSubpathEnvExpansion to GA
* Reference Documentation for the Kubernetes API for 1.17 (#18019)
* Update feature-gates.md (#18033)
* Reference Documentation for kubectl Commands for 1.17 (#18017)
* Update for v1.17 (#18034)
* Update config.toml(release-1.17) for 1.17 (#18031)
* Move examples ahead of commands that use them
In support of https://github.com/kubernetes/website/issues/12740
The aim is to adopt a consistent style around providing downloadable
examples for use with kubectl, etc.
* Tweak wording for stateful app pod example
* Adopt formatting conventions for code blocks
* Move ReplicationController sample YAML to examples
In aid of https://github.com/kubernetes/website/issues/12740
* Move PodDisruptionBudget sample YAML to examples
In aid of https://github.com/kubernetes/website/issues/12740
* Update test schema for new examples
* Use Unicode ellipsis in example
Aim here is to make the elision more obvious
* First draft of the updates to the ReplicaSet Docs
To start with, I tried to cleanup the docs to adhere to the style guide https://kubernetes.io/docs/contribute/style/style-guide/. I then added some description of the ReplicaSet-Pod link via the owner reference field and behavior by it. I also made a clarification on the ReplicaSet demo where it was being redundant for the sake of demonstrating the different forms of usage. I consider this draft incomplete as I still lack knowledge of how the pod labels affect the behavior.
* Clearing up RC refs & explaining acquisition behavior
I'm beginning to address the cr by cleaning up references to the ReplicationController and making it clear that RCs are discouraged/old. I then expanded on the behavior of ReplicaSet in the presence of pods it can acquire but are not created directly by it.
* Mismatched link seems to have disappeared from preview
"As with all other Kubernetes API objects," etc... is present in the sibling concepts/workloads/controllers/ files, so I am hesitant to change that w/o changing the others, but I did abbreviate it.
"The `.spec.template` is the only required field of the `.spec`." is false, we also need the selector
Trying to address passive voice
Cleaned up Writing a ReplicaSet Manifest section
removed How to use a ReplicaSet section as it has redundant info from the examples and Alternatives section
Expanded examples a bit
Cleared up passive voice
* refactoring link to example yaml
* adding pod-rs test case
* Addressing Steve Perry's comments
Capitalize Pod throughout.
Link is not rendering correctly. Use () instead of [] for the path.
Ending with "for the creation" seems vague to me. Maybe this:
"...reach the desired number. When a ReplicaSet needs to create new Pods, it uses its Pod template."
Suggestion: "is via the Pod's metadata.ownerReferences field." That way the reader won't jump to the incorrect conclusion that we're talking about the ReplicaSet's metadata.ownerReferences field.
with fields, including a selector that
and plans accordingly
Our style for headings is sentence case. So this heading would be "How a ReplicaSet works".
Several headings in this topic need to be converted to sentence case.
cleaned up frontend.yaml example
added example checking the Pod's owner reference being set to it's parent ReplicaSet
* Previous commit broke Pod example links due to casing
* Forgot 1 comment
Suggestion: In the ReplicaSet, .spec.template.metadata.labels must match spec.selector, or ...
* Addressing grammar/syntax errors
This PR moves the examples test to where it belongs and also include the
following improvements:
- Removed test cases defined for non-existent files;
- Add guard against ineffective tests against missing files;
- Remove the special case for scheduler-policy-config which is no longer
an example, the dependency on the related go module is thus
eliminated;
- Updated the .tavis.yml file to use the new test case: the instruction
sequence is adjusted to ensure the correct version of kubernetes is
fully prepared before we do `go get -v -t`.
- The examples_test.go is formatted using `gofmt`;
- Verbose output during test has been added.
- A separate test case is added for CN translation.
Related: #9285