Skip to content

Commit

Permalink
revert case changes in policyengine types
Browse files Browse the repository at this point in the history
Signed-off-by: Etai Lev Ran <[email protected]>
  • Loading branch information
elevran committed Jan 4, 2024
1 parent 64596dd commit bbcdaf2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
9 changes: 4 additions & 5 deletions pkg/policyengine/k8sshim/connectivity_policy_crd.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,10 @@ type ConnectivityPolicy struct {

// ConnectivityPolicySpec is a common spec for both PrivilegedConnectivityPolicy and ConnectivityPolicy.
type ConnectivityPolicySpec struct {
Action policytypes.PolicyAction
From policytypes.WorkloadSetOrSelectorList `json:"from"`
To policytypes.WorkloadSetOrSelectorList `json:"to"`
//nolint:tagliatelle // use camelCase, same as k8s convention
ConnectionAttrs []ConnectionAttrs `json:"connectionAttrs,omitempty"`
Action policytypes.PolicyAction
From policytypes.WorkloadSetOrSelectorList `json:"from"`
To policytypes.WorkloadSetOrSelectorList `json:"to"`
ConnectionAttrs []ConnectionAttrs `json:"connectionAttrs,omitempty"`
}

// ConnectionAttrs describes the combination of protocol and port used by a given connection.
Expand Down
4 changes: 1 addition & 3 deletions pkg/policyengine/policytypes/connectivity_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ type WorkloadSetOrSelectorList []WorkloadSetOrSelector
// WorkloadSetOrSelector describes a set of workloads, based on their attributes (labels)
// Exactly one of the two fields should be non-empty.
type WorkloadSetOrSelector struct {
//nolint:tagliatelle // use camelCase, same as k8s convention
WorkloadSets []string `json:"workloadSets,omitempty"`
//nolint:tagliatelle // use camelCase, same as k8s convention
WorkloadSets []string `json:"workloadSets,omitempty"`
WorkloadSelector *metav1.LabelSelector `json:"workloadSelector,omitempty"`
}

Expand Down

0 comments on commit bbcdaf2

Please sign in to comment.