Documentation
¶
Index ¶
- Constants
- func EventsByInvolvedObjectAPIGroup(obj client.Object) []string
- func FormatClaim(claimName, claimValue string) string
- func FreightApprovedForStages(obj client.Object) []string
- func FreightByCurrentStages(obj client.Object) []string
- func FreightByVerifiedStages(obj client.Object) []string
- func FreightByWarehouse(obj client.Object) []string
- func ProjectConfigsByWebhookReceiverPaths(obj client.Object) []string
- func PromotionsByStage(obj client.Object) []string
- func PromotionsByStageAndFreight(obj client.Object) []string
- func PromotionsByTerminal(obj client.Object) []string
- func RunningPromotionsByArgoCDApplications(ctx context.Context, cl client.Client, shardName string, ...) client.IndexerFunc
- func ServiceAccountsByOIDCClaims(obj client.Object) []string
- func StageAndFreightKey(stage, freight string) string
- func StagesByAnalysisRun(shardName string, isDefaultController bool) client.IndexerFunc
- func StagesByFreight(obj client.Object) []string
- func StagesByUpstreamStages(obj client.Object) []string
- func StagesByWarehouse(obj client.Object) []string
- func WarehousesBySubscribedURLs(obj client.Object) []string
- type SharedFieldIndexer
Constants ¶
const ( EventsByInvolvedObjectAPIGroupField = "involvedObject.apiGroup" FreightByWarehouseField = "warehouse" FreightByCurrentStagesField = "currentlyIn" FreightByVerifiedStagesField = "verifiedIn" FreightApprovedForStagesField = "approvedFor" PromotionsByStageAndFreightField = "stageAndFreight" PromotionsByStageField = "stage" PromotionsByTerminalField = "terminal" RunningPromotionsByArgoCDApplicationsField = "applications" StagesByAnalysisRunField = "analysisRun" StagesByFreightField = "freight" StagesByUpstreamStagesField = "upstreamStages" StagesByWarehouseField = "warehouse" ServiceAccountsByOIDCClaimsField = "claims" WarehousesBySubscribedURLsField = "subscribedURLs" ProjectConfigsByWebhookReceiverPathsField = "receiverPaths" )
Variables ¶
This section is empty.
Functions ¶
func EventsByInvolvedObjectAPIGroup ¶
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 ¶
FreightApprovedForStages is a client.IndexerFunc that indexes Freight by the Stages for which it has been (manually) approved.
func FreightByCurrentStages ¶
FreightByCurrentStages is a client.IndexerFunc that indexes Freight by the Stages in which it is currently in use.
func FreightByVerifiedStages ¶
FreightByVerifiedStages is a client.IndexerFunc that indexes Freight by the Stages in which it has been verified.
func FreightByWarehouse ¶
FreightByWarehouse is a client.IndexerFunc that indexes Freight by the Warehouse it is associated with.
func ProjectConfigsByWebhookReceiverPaths ¶
ProjectConfigsByWebhookReceiverPaths is a client.IndexerFunc that indexes Projects by the paths of their receivers.
func PromotionsByStage ¶
PromotionsByStage returns a client.IndexerFunc that indexes Promotions by the Stage they reference.
func PromotionsByStageAndFreight ¶
PromotionsByStageAndFreight is a client.IndexerFunc that indexes Promotions by the Freight and Stage they reference.
func PromotionsByTerminal ¶
PromotionsByTerminal returns a client.IndexerFunc that indexes Promotions by whether or not that are in a terminal phase.
func RunningPromotionsByArgoCDApplications ¶
func RunningPromotionsByArgoCDApplications( ctx context.Context, cl client.Client, shardName string, isDefaultController bool, ) 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 ¶
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 ¶
func StagesByAnalysisRun( shardName string, isDefaultController bool, ) client.IndexerFunc
StagesByAnalysisRun is a client.IndexerFunc that indexes Stages by the AnalysisRun they are associated with.
func StagesByFreight ¶
StagesByFreight is a client.IndexerFunc that indexes Stages by the Freight they reference.
func StagesByUpstreamStages ¶
StagesByUpstreamStages is a client.IndexerFunc that indexes Stages by the upstream Stages they reference.
func StagesByWarehouse ¶
StagesByWarehouse is a client.IndexerFunc that indexes Stages by the Warehouse they are associated with.
func WarehousesBySubscribedURLs ¶
WarehousesBySubscribedURLs is a client.IndexerFunc that indexes Warehouses by the repositories they subscribe to.
Types ¶
type SharedFieldIndexer ¶
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 ¶
func NewSharedFieldIndexer(indexer client.FieldIndexer) *SharedFieldIndexer
NewSharedFieldIndexer returns a new SharedFieldIndexer.
func (*SharedFieldIndexer) IndexField ¶
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.