mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 12:18:16 +00:00 
			
		
		
		
	Merge pull request #60503 from serathius/fix-passing-location
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. [fluentd-gcp addon] Fix passing location to event exporter Fix passing argument to event-expoter in https://github.com/kubernetes/kubernetes/pull/58090 ```release-note NONE ```
This commit is contained in:
		@@ -50,7 +50,7 @@ spec:
 | 
				
			|||||||
        image: k8s.gcr.io/event-exporter:v0.1.8
 | 
					        image: k8s.gcr.io/event-exporter:v0.1.8
 | 
				
			||||||
        command:
 | 
					        command:
 | 
				
			||||||
        - /event-exporter
 | 
					        - /event-exporter
 | 
				
			||||||
        - -sink-opts="-location={{ event_exporter_zone }}"
 | 
					        - -sink-opts=-location={{ event_exporter_zone }}
 | 
				
			||||||
      # BEGIN_PROMETHEUS_TO_SD
 | 
					      # BEGIN_PROMETHEUS_TO_SD
 | 
				
			||||||
      - name: prometheus-to-sd-exporter
 | 
					      - name: prometheus-to-sd-exporter
 | 
				
			||||||
        image: k8s.gcr.io/prometheus-to-sd:v0.2.4
 | 
					        image: k8s.gcr.io/prometheus-to-sd:v0.2.4
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -162,7 +162,8 @@ var _ = instrumentation.SIGDescribe("Cluster level logging implemented by Stackd
 | 
				
			|||||||
			}()
 | 
								}()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			ginkgo.By("Waiting for events to ingest")
 | 
								ginkgo.By("Waiting for events to ingest")
 | 
				
			||||||
			c := utils.NewLogChecker(p, utils.UntilFirstEntry, utils.JustTimeout, "")
 | 
								zone := framework.TestContext.CloudConfig.Zone
 | 
				
			||||||
 | 
								c := utils.NewLogChecker(p, utils.UntilFirstEntryFromZone(zone), utils.JustTimeout, "")
 | 
				
			||||||
			err := utils.WaitForLogs(c, ingestionInterval, ingestionTimeout)
 | 
								err := utils.WaitForLogs(c, ingestionInterval, ingestionTimeout)
 | 
				
			||||||
			framework.ExpectNoError(err)
 | 
								framework.ExpectNoError(err)
 | 
				
			||||||
		})
 | 
							})
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -55,6 +55,19 @@ func UntilFirstEntryFromLog(log string) IngestionPred {
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// UntilFirstEntryFromZone is a IngestionPred that checks that at least one
 | 
				
			||||||
 | 
					// entry from the log with a given name was ingested.
 | 
				
			||||||
 | 
					func UntilFirstEntryFromZone(zone string) IngestionPred {
 | 
				
			||||||
 | 
						return func(_ string, entries []LogEntry) (bool, error) {
 | 
				
			||||||
 | 
							for _, e := range entries {
 | 
				
			||||||
 | 
								if e.Location == zone {
 | 
				
			||||||
 | 
									return true, nil
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							return false, nil
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// TimeoutFun is a function that is called when the waiting times out.
 | 
					// TimeoutFun is a function that is called when the waiting times out.
 | 
				
			||||||
type TimeoutFun func([]string, []bool) error
 | 
					type TimeoutFun func([]string, []bool) error
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user