-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update controller code to process v1alpha2 ObservabilityPolicies
- Loading branch information
Showing
16 changed files
with
513 additions
and
478 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package v1alpha2 | ||
|
||
import ( | ||
"sigs.k8s.io/gateway-api/apis/v1alpha2" | ||
) | ||
|
||
// FIXME(kate-osborn): https://github.com/nginxinc/nginx-gateway-fabric/issues/1939. | ||
// Figure out a way to generate these methods for all our policies. | ||
// These methods implement the policies.Policy interface which extends client.Object to add the following methods. | ||
|
||
func (p *ObservabilityPolicy) GetTargetRefs() []v1alpha2.LocalPolicyTargetReference { | ||
return p.Spec.TargetRefs | ||
} | ||
|
||
func (p *ObservabilityPolicy) GetPolicyStatus() v1alpha2.PolicyStatus { | ||
return p.Status | ||
} | ||
|
||
func (p *ObservabilityPolicy) SetPolicyStatus(status v1alpha2.PolicyStatus) { | ||
p.Status = status | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.