Commit Graph

7 Commits

Author SHA1 Message Date
Alejandro Pedraza 71291fe7bc
Add `accessPolicy` field to Server CRD (#12845)
Followup to #12844

This new field defines the default policy for Servers, i.e. if a request doesn't match the policy associated to a Server then this policy applies. The values are the same as for `proxy.defaultInboundPolicy` and the `config.linkerd.io/default-inbound-policy` annotation (all-unauthenticated, all-authenticated, cluster-authenticated, cluster-unauthenticated, deny), plus a new value "audit". The default is "deny", thus remaining backwards-compatible.

This field is also exposed as an additional printer column.
2024-07-22 09:01:09 -05:00
Kevin Ingelman 5f068bfbd7
Restore Server v1beta1 Go API definition (#12529)
The `v1beta1` Go API definition for Servers was removed in #11920, in favor of the `v1beta2` definition that was being added. For backwards compatibility, the `v1beta1` definition should have been left in place.

Signed-off-by: Kevin Ingelman <ki@buoyant.io>
2024-05-01 16:16:48 -07:00
Zahari Dichev 391ce919f5
policy: regenerate Server go bindings (#11920)
Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>
2024-01-15 11:09:31 +02:00
Alejandro Pedraza a268ff11c9
Allow `Server` CRD to have empty `PodSelector` (#7925)
Fixes #7904

Allow the `Server` CRD to have the `PodSelector` entry be an empty object, by removing the `omitempty` tag from its go type definition and the `oneof` section in the CRD. No update to the CRD version is required, as this is BC change -- The CRD overriding was tested fine.

Also added some unit tests to confirm podSelector conditions are ANDed, and some minor refactorings in the `Selector` constructors.

Co-authored-by: Oliver Gould <ver@buoyant.io>
2022-02-23 13:45:34 +00:00
Zahari Dichev 40cdb7fc23
add mc crd to codegen (#7335)
Currently, the MC `Link` CRD is being handled using the dynamic k8s client. It would be useful for consumers of this API if there was a typed API for this CRD.

The solution is to update the codegen script to generate this code.

Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>
2021-11-23 15:49:14 -07:00
Zahari Dichev d1b444ee41
fix wrong group names in fake client (#7173)
The `Group` attribute of the`GroupVersionResource` is wrong for the fake clients.
This leads to tests failing as types are not registered and keyed correctly.

Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>
Co-authored-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
2021-10-29 16:02:06 -06:00
Kevin Leimkuhler 00e018d277
Add policy CRD APIs (#7095)
This adds the policy CRD APIs for `Server` and `ServerAuthorization` CRDs.

The structure of each (in their respective `types.go`) is based off the `policy-crd.yaml` specs for each CRD.

Unlike service profiles, servers and server authorizations use the `oneof` extensively so I encoded that as a struct with a pointer for each possible `oneof`. For example, a server's `PodSelector` is either `MatchExpressions` or `MatchLabels`. Therefore, a `PodSelector` is defined as:

```
type PodSelector struct {
	MatchExpressions *MatchExpressions
	MatchLabels      *MatchLabels
}
```

Closes #6970 

Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
2021-10-22 15:54:09 -06:00