Commit Graph

4 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
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
Eng Zer Jun 27703ab900
Replace `github.com/ghodss/yaml` with `sigs.k8s.io/yaml` (#10610)
At the time of making this commit, the package `github.com/ghodss/yaml`
is no longer actively maintained.

`sigs.k8s.io/yaml` is a permanent fork of `ghodss/yaml` and is actively
maintained by Kubernetes SIG.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2023-03-24 09:20:55 -05: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