Commit Graph

85 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
8decaf3ae7
Merge pull request #115447 from kidddddddddddddddddddddd/ingress
[ingress] Create with ingressClass annotation and IngressClassName both set
2023-03-15 02:02:16 -07:00
Antonio Ojea
c36562dfd7 IPAddress validation
Validate IPAddress name is in canonical format
Validate ParentRef is required, and Resource and Name.
Validate IPAddress is inmutable on update.
2023-03-14 22:56:44 +00:00
kidddddddddddddddddddddd
488d7650f4 update description 2023-03-14 09:42:41 +08:00
kidddddddddddddddddddddd
113355a5a2 loosen check rules for ingress creation 2023-02-01 15:21:45 +08:00
TommyStarK
f166a52573 pkg/apis: Replace deprecated pointer function
Signed-off-by: TommyStarK <thomasmilox@gmail.com>
2023-01-05 11:48:05 +01:00
Jordan Liggitt
fc69084bf1
Update workload selector validation 2022-11-07 20:52:02 -05:00
Manjusaka
0843c4dfca
Add extra value validation for matchExpression field in LabelSelector 2022-11-07 20:48:21 -05:00
Tim Hockin
0153bfad16
Copy LoadBalancerStatus from core to networking
This type should never have been shared between Service and Ingress.
The `ports` field is unfortunate, but it is needed to stay compatible.
2022-11-02 16:13:31 -07:00
Sarvesh Rangnekar
7093b10416 Introduce networking/v1alpha1 api, ClusterCIDR type
Introduce networking/v1alpha1 api group.

Add `ClusterCIDR` type to networking/v1alpha1 api group, this type
will enable the NodeIPAM controller to support multiple ClusterCIDRs.
2022-08-05 00:54:00 +00:00
Abirdcfly
f715e9cb24 cleanup:use copy other than for loop
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2022-06-28 16:29:22 +08:00
James Laverack
7d57d5c70d Revert "Introduce APIs to support multiple ClusterCIDRs (#108290)"
This reverts commit b9792a9dae.
2022-04-13 13:58:19 +01:00
Sarvesh Rangnekar
b9792a9dae
Introduce APIs to support multiple ClusterCIDRs (#108290)
* Introduce networking/v1alpha1 api, ClusterCIDRConfig type

Introduce networking/v1alpha1 api group.

Add `ClusterCIDRConfig` type to networking/v1alpha1 api group, this type
will enable the NodeIPAM controller to support multiple ClusterCIDRs.

* Change ClusterCIDRConfig.NodeSelector type in api

* Fix review comments for API

* Update ClusterCIDRConfig API Spec

Introduce PerNodeHostBits field, remove PerNodeMaskSize
2022-03-30 19:39:00 -07:00
Ricardo Katz
42a1201082
Implementation on Network Policy Status (#107963)
* Implement status subresource in NetworkPolicy

* add NetworkPolicyStatus generated files

* Fix comments in netpol status review
2022-03-29 01:52:48 -07:00
Harry Bagdi
d09a8c0a88 Graduate IngressClassNamespacedParams to GA 2021-11-10 08:58:39 -08:00
Antonio Ojea
0cd75e8fec run hack/update-netparse-cve.sh 2021-08-20 10:42:09 +02:00
Jordan Liggitt
c702dd4394 Drop legacy validation logic for networking API 2021-08-09 12:37:45 -04:00
Vikram Jadhav
a9a3c4bb9a Refactor of TestValidateIngressClass and TestValidateIngressClassUpdate methods by adding Boilerplate in helper functions #FIXES: 99005 2021-07-07 22:35:35 +05:30
Kubernetes Prow Robot
21f41b8e82
Merge pull request #101711 from hbagdi/ingressclass-namespaced-params-beta
graduate IngressClassNamespacedParams to beta
2021-06-29 17:07:03 -07:00
Harry Bagdi
60377ba1a3 graduate IngressClassNamespacedParams to beta 2021-05-03 15:00:40 -07:00
卢振兴10069964
4e447acab0 code cleanup for pkg/api and pkg/apis 2021-04-28 08:57:23 +08:00
Kubernetes Prow Robot
6409ec97e8
Merge pull request #99165 from danielamlins/test_validate_network_policy_refactor
TestValidateNetworkPolicy refactor
2021-04-08 14:27:49 -07:00
Daniela Lins
6c105c9e8a Linewrap for makePort calls and lint fixes
Signed-off-by: Daniela Lins <danielamlins@gmail.com>
2021-03-25 17:12:02 +01:00
Daniela Lins
22cc8dc3a8 Specify IPV4 on tweak names
Signed-off-by: Daniela Lins <danielamlins@gmail.com>
2021-03-25 16:57:11 +01:00
Daniela Lins
f4e469ee14 Standardize Namespace and Podselector tweaks
Signed-off-by: Daniela Lins <danielamlins@gmail.com>
2021-03-25 16:50:28 +01:00
Daniela Lins
5f47d0e8ef Reduce vertical space
Signed-off-by: Daniela Lins <danielamlins@gmail.com>
2021-03-25 16:41:06 +01:00
Daniela Lins
cb48e3cfca Handle int and string port in makePort
Signed-off-by: Daniela Lins <danielamlins@gmail.com>
2021-03-25 16:35:23 +01:00
Daniela Lins
853d2a6a0a Delete not used tweak
Signed-off-by: Daniela Lins <danielamlins@gmail.com>
2021-03-08 15:03:12 +01:00
Daniela Lins
36e040f86e Fix empty setter logic
Signed-off-by: Daniela Lins <danielamlins@gmail.com>
2021-03-07 13:13:09 +01:00
Harry Bagdi
a7fc92089a Add namespace scoped ParametersReference to IngressClass 2021-03-07 00:45:32 +05:30
Daniela Lins
0444bdc944 Remove success case comments
Signed-off-by: Daniela Lins <danielamlins@gmail.com>
2021-03-06 19:18:19 +01:00
Daniela Lins
f8e7d30e46 Make tweaks only reset slices if empty
Signed-off-by: Daniela Lins <danielamlins@gmail.com>
2021-03-06 18:58:33 +01:00
Daniela Lins
6d330d9738 Refactored setIngressPorts and setEgressPorts
Signed-off-by: Daniela Lins <danielamlins@gmail.com>
2021-03-06 16:51:35 +01:00
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
Daniela Lins
611f061c45 Change error msg and comments to easily find test
Signed-off-by: Daniela Lins <danielamlins@gmail.com>
2021-02-24 13:09:13 +01:00
Daniela Lins
f7482a6766 Went through the review notes
- Adapt tweaks to be clearer
- Use intstr.fromInt and intstr.fromStr
- Added more tests to invalid ports

Signed-off-by: Daniela Lins <danielamlins@gmail.com>
2021-02-21 12:22:17 +01:00
Daniela Lins
c9a5bf14d8 Fixed gofmt issues
Signed-off-by: Daniela Lins <danielamlins@gmail.com>
2021-02-18 10:02:27 +01:00
Daniela Lins
8572c973d8 Add IPV6 IPBlock to success cases
Signed-off-by: Daniela Lins <danielamlins@gmail.com>
2021-02-17 23:02:57 +01:00
Daniela Lins
77da0540e6 Add tweaks and use them to build error structs
Signed-off-by: Daniela Lins <danielamlins@gmail.com>
2021-02-16 19:46:35 +01:00
Daniela Lins
50d93d989f Add tweaking functions to TestValidateNetworkPolicy
Signed-off-by: Daniela Lins <danielamlins@gmail.com>
2021-02-13 17:57:04 +01:00
Carlos Panato
e57ea32158
networking/validation: add endport range validation 2021-02-04 10:28:26 +01:00
Ricardo Katz
b7c82bb83c
Add EndPort to Network Policy - Alpha (#97058)
* Fix merge conflict in kube_features

* Add alpha support for EndPort in Network Policy

Signed-off-by: Ricardo Pchevuzinske Katz <ricardo.katz@gmail.com>

* Add alpha support for EndPort in Network Policy

Signed-off-by: Ricardo Pchevuzinske Katz <ricardo.katz@gmail.com>

* Add alpha support for EndPort in Network Policy

Signed-off-by: Ricardo Pchevuzinske Katz <ricardo.katz@gmail.com>

* Correct some nits

Signed-off-by: Ricardo Pchevuzinske Katz <ricardo.katz@gmail.com>

* Add alpha support for EndPort in Network Policy

* Add alpha support for EndPort in Network Policy

* Add alpha support for EndPort in Network Policy

* Add alpha support for EndPort in Network Policy
2021-02-01 19:24:28 -08:00
Dan Winship
3a110546ed Move SCTP to GA 2020-10-15 08:56:33 -04:00
Matthew Fenwick
d407129cf7 modify DNS-1123 error messages to indicate that RFC 1123 is not followed exactly 2020-09-02 08:04:04 -04:00
Kubernetes Prow Robot
008708d036
Merge pull request #93966 from Miciah/verify-that-an-ingress-with-empty-TLS-is-valid
Verify that an ingress with empty TLS is valid
2020-08-27 04:48:57 -07:00
Miciah Masters
e648deca3b Fix validation of ingress rules with wildcard host
Fix ingress validation so that it validates the rules of an ingress that
specifies a wildcard host.  Commit 60f4fbf4f2
added an inopportune continue statement that caused this validation to be
skipped.  For backwards compatibility, this change restores validation for
v1 of the api but still skips it on v1beta1.

* pkg/apis/networking/validation/validation.go (IngressValidationOptions):
Add AllowInvalidWildcardHostRule field to indicate that validation of rules
should be skipped for ingresses that specify wildcard hosts.
(ValidateIngressCreate): Set AllowInvalidWildcardHostRule to true if the
request is using the v1beta1 API version.
(ValidateIngressUpdate): Set AllowInvalidWildcardHostRule to true if the
request or old ingress is using the v1beta1 API version.
(validateIngressRules): Don't skip validation of the ingress rules unless
the ingress has a wildcard host and AllowInvalidWildcardHostRule is true.
(allowInvalidWildcardHostRule): New helper for ValidateIngressCreate and
ValidateIngressUpdate.
* pkg/apis/networking/validation/validation_test.go
(TestValidateIngressCreate, TestValidateIngressUpdate): Add test cases to
ensure that validation is performed on v1 objects and skipped on v1beta
objects for backwards compatibility.
(TestValidateIngressTLS): Specify PathType so that the test passes.

Co-authored-by: jordan@liggitt.net
2020-08-13 15:53:17 -04:00
Miciah Masters
7ef8fa7207 Verify that an ingress with empty TLS is valid
Add a test that verifies that an ingress with an empty TLS value or with a
TLS value that specifies an empty list of hosts passes validation.

* pkg/apis/networking/validation/validation_test.go
(TestValidateEmptyIngressTLS): New test.
2020-08-13 11:55:18 -04:00
Jordan Liggitt
f87a846e65 Validate ingress TLS secretName in v1 2020-08-12 10:13:08 -04:00
Christopher M. Luciano
2b091f60ca
ingress: Add Ingress to v1 API and update backend to defaultBackend
ingress: use new serviceBackend split

ingress: remove all v1beta1 restrictions on creation

This change removes creation and update restrictions enforced by
k8s 1.18 for not allowing resource backends.

Paths are no longer
required to be valid regex and a PathType is now user-specified
and no longer defaulted.

Also remove all TODOs in staging/net/v1 types

Signed-off-by: Christopher M. Luciano <cmluciano@us.ibm.com>
2020-05-22 11:57:41 -04:00
Jordan Liggitt
1758d17689 Allow resource backends in Ingress 2020-05-12 15:38:19 -04:00
Jordan Liggitt
8f7b8105a1 Remove ingress regex path requirement 2020-05-12 15:38:15 -04:00