Change container base image to cgr.dev/chainguard/static (#2881)
* Change container base image to cgr.dev/chainguard/static * Lint fixes * fix test failure * Add router deployment wait * add check command in upgrade script --------- Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
@@ -26,7 +26,7 @@ type (
|
||||
Input interface {
|
||||
Context() context.Context
|
||||
|
||||
//Parse(input interface{}) error
|
||||
// Parse(input interface{}) error
|
||||
|
||||
// IsSet checks whether a flag has been set by the user
|
||||
IsSet(key string) bool
|
||||
|
||||
@@ -103,7 +103,7 @@ func (opts *LogSubCommand) do(input cli.Input) error {
|
||||
t = time.Now().UTC() // next time fetch values from this time
|
||||
if err != nil {
|
||||
console.Verbose(2, "error querying logs: %s", err)
|
||||
if dbType == logdb.KUBERNETES { //in case of Kubernetes log we print pod namespace warning once
|
||||
if dbType == logdb.KUBERNETES { // in case of Kubernetes log we print pod namespace warning once
|
||||
warn = false
|
||||
}
|
||||
responseChan <- struct{}{}
|
||||
@@ -116,7 +116,7 @@ func (opts *LogSubCommand) do(input cli.Input) error {
|
||||
continue
|
||||
}
|
||||
|
||||
if dbType == logdb.KUBERNETES { //in case of Kubernetes log we print pods info only once. And then print new logs
|
||||
if dbType == logdb.KUBERNETES { // in case of Kubernetes log we print pods info only once. And then print new logs
|
||||
detail = false
|
||||
}
|
||||
responseChan <- struct{}{}
|
||||
|
||||
@@ -517,7 +517,7 @@ func localArchiveFromSpec(specDir string, aus *spectypes.ArchiveUploadSpec) (*fv
|
||||
// to do a filepath.Walk and call path.Match on each path...
|
||||
files := make([]string, 0)
|
||||
|
||||
//checking if file is a zip
|
||||
// checking if file is a zip
|
||||
if match, _ := utils.IsZip(aus.IncludeGlobs[0]); match && len(aus.IncludeGlobs) == 1 {
|
||||
files = append(files, aus.IncludeGlobs[0])
|
||||
} else {
|
||||
@@ -560,7 +560,7 @@ func localArchiveFromSpec(specDir string, aus *spectypes.ArchiveUploadSpec) (*fv
|
||||
}
|
||||
archiveFileName = archiveFile.Name()
|
||||
|
||||
//This instance is required to allow overwriting and not changing DefaultZip
|
||||
// This instance is required to allow overwriting and not changing DefaultZip
|
||||
zipOverwrite := archiver.Zip{OverwriteExisting: true}
|
||||
err = zipOverwrite.Archive(files, archiveFileName)
|
||||
if err != nil {
|
||||
|
||||
@@ -79,7 +79,7 @@ func (influx InfluxDB) GetLogs(ctx context.Context, filter LogFilter, output *by
|
||||
parameters := make(map[string]interface{})
|
||||
parameters["funcuid"] = filter.FuncUid
|
||||
parameters["time"] = timestamp
|
||||
//the parameters above are only for the where clause and do not work with LIMIT
|
||||
// the parameters above are only for the where clause and do not work with LIMIT
|
||||
|
||||
orderCondition := " order by \"time\" asc"
|
||||
if filter.Reverse {
|
||||
@@ -104,7 +104,7 @@ func (influx InfluxDB) GetLogs(ctx context.Context, filter LogFilter, output *by
|
||||
for _, r := range response.Results {
|
||||
for _, series := range r.Series {
|
||||
|
||||
//create map of columns to row indices
|
||||
// create map of columns to row indices
|
||||
indexMap := makeIndexMap(series.Columns)
|
||||
|
||||
// TODO: Remove fallback indexes. Some of index's name changed in fluent-bit, here we add extra fallbackIndexes to address compatibility problem.
|
||||
@@ -130,16 +130,16 @@ func (influx InfluxDB) GetLogs(ctx context.Context, filter LogFilter, output *by
|
||||
return err
|
||||
}
|
||||
entry := LogEntry{
|
||||
//The attributes of the LogEntry are selected as relative to their position in InfluxDB's line protocol response
|
||||
// The attributes of the LogEntry are selected as relative to their position in InfluxDB's line protocol response
|
||||
Timestamp: t,
|
||||
Container: getEntryValue(row, container, container_1),
|
||||
FuncName: getEntryValue(row, functionName, -1),
|
||||
FuncUid: getEntryValue(row, funcuid, funcuid_1, funcuid_2),
|
||||
Message: strings.TrimSuffix(getEntryValue(row, logMessage, -1), "\n"), //log field
|
||||
Message: strings.TrimSuffix(getEntryValue(row, logMessage, -1), "\n"), // log field
|
||||
Namespace: getEntryValue(row, nameSpace, -1),
|
||||
Pod: getEntryValue(row, podName, -1),
|
||||
Stream: getEntryValue(row, stream, -1),
|
||||
Sequence: seqNum, //sequence tag
|
||||
Sequence: seqNum, // sequence tag
|
||||
}
|
||||
logEntries = append(logEntries, entry)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user