Documentation ¶
Index ¶
- Constants
- func EventsByInvolvedObjectAPIGroup(obj client.Object) []string
- func FormatClaim(claimName string, claimValue string) string
- func FreightApprovedForStages(obj client.Object) []string
- func FreightByVerifiedStages(obj client.Object) []string
- func FreightByWarehouse(obj client.Object) []string
- func PromotionsByStage(obj client.Object) []string
- func PromotionsByStageAndFreight(obj client.Object) []string
- func RunningPromotionsByArgoCDApplications(ctx context.Context, shardName string) client.IndexerFunc
- func ServiceAccountsByOIDCClaims(obj client.Object) []string
- func StageAndFreightKey(stage, freight string) string
- func StagesByAnalysisRun(shardName string) client.IndexerFunc
- func StagesByFreight(obj client.Object) []string
- func StagesByUpstreamStages(obj client.Object) []string
- func StagesByWarehouse(obj client.Object) []string
- type SharedFieldIndexer
Constants ¶
const ( EventsByInvolvedObjectAPIGroupField = "involvedObject.apiGroup" FreightByVerifiedStagesField = "verifiedIn" FreightApprovedForStagesField = "approvedFor" FreightByWarehouseField = "warehouse" PromotionsByStageAndFreightField = "stageAndFreight" PromotionsByStageField = "stage" RunningPromotionsByArgoCDApplicationsField = "applications" StagesByAnalysisRunField = "analysisRun" StagesByFreightField = "freight" StagesByUpstreamStagesField = "upstreamStages" StagesByWarehouseField = "warehouse" ServiceAccountsByOIDCClaimsField = "claims" )
Variables ¶
This section is empty.
Functions ¶
func EventsByInvolvedObjectAPIGroup ¶ added in v1.1.0
EventsByInvolvedObjectAPIGroup is a client.IndexerFunc that indexes Events by the API group of the involved object.
func FormatClaim ¶
FormatClaim formats a claims name and values to be used by the IndexServiceAccountsByOIDCClaims index.
func FreightApprovedForStages ¶ added in v1.1.0
FreightApprovedForStages is a client.IndexerFunc that indexes Freight by the Stages for which it has been (manually) approved.
func FreightByVerifiedStages ¶ added in v1.1.0
FreightByVerifiedStages is a client.IndexerFunc that indexes Freight by the Stages in which it has been verified.
func FreightByWarehouse ¶ added in v1.1.0
FreightByWarehouse is a client.IndexerFunc that indexes Freight by the Warehouse it is associated with.
func PromotionsByStage ¶ added in v1.1.0
PromotionsByStage returns a client.IndexerFunc that indexes Promotions by the Stage they reference.
func PromotionsByStageAndFreight ¶ added in v1.1.0
PromotionsByStageAndFreight is a client.IndexerFunc that indexes Promotions by the Freight and Stage they reference.
func RunningPromotionsByArgoCDApplications ¶ added in v1.1.0
func RunningPromotionsByArgoCDApplications( ctx context.Context, shardName string, ) client.IndexerFunc
RunningPromotionsByArgoCDApplications returns a client.IndexerFunc that indexes running Promotions by the Argo CD Applications they are associated with.
When the provided shardName is non-empty, only Promotions labeled with the provided shardName are indexed. When the provided shardName is empty, only Promotions not labeled with a shardName are indexed.
func ServiceAccountsByOIDCClaims ¶ added in v1.1.0
ServiceAccountsByOIDCClaims is a client.IndexerFunc that indexes ServiceAccounts by their OIDC claims.
func StageAndFreightKey ¶
StageAndFreightKey returns a key that uniquely identifies a Stage and Freight.
func StagesByAnalysisRun ¶ added in v1.1.0
func StagesByAnalysisRun(shardName string) client.IndexerFunc
StagesByAnalysisRun is a client.IndexerFunc that indexes Stages by the AnalysisRun they are associated with.
func StagesByFreight ¶ added in v1.1.0
StagesByFreight is a client.IndexerFunc that indexes Stages by the Freight they reference.
func StagesByUpstreamStages ¶ added in v1.1.0
StagesByUpstreamStages is a client.IndexerFunc that indexes Stages by the upstream Stages they reference.
func StagesByWarehouse ¶ added in v1.1.0
StagesByWarehouse is a client.IndexerFunc that indexes Stages by the Warehouse they are associated with.
Types ¶
type SharedFieldIndexer ¶ added in v1.1.0
type SharedFieldIndexer struct {
// contains filtered or unexported fields
}
SharedFieldIndexer is a wrapper around a client.FieldIndexer that ensures that the same field is not indexed multiple times.
This is useful when multiple reconcilers require the same index, but want to continue to manage their own indices.
func NewSharedFieldIndexer ¶ added in v1.1.0
func NewSharedFieldIndexer(indexer client.FieldIndexer) *SharedFieldIndexer
NewSharedFieldIndexer returns a new SharedFieldIndexer.
func (*SharedFieldIndexer) IndexField ¶ added in v1.1.0
func (i *SharedFieldIndexer) IndexField( ctx context.Context, obj client.Object, field string, extractValue client.IndexerFunc, ) error
IndexField indexes the given field on the given object using the underlying client.FieldIndexer. If the field has already been indexed for the given object type, it will not be indexed again.