Merge branch 'master' into addPauseButton
commit
1eaf510922
|
@ -50,6 +50,8 @@ var (
|
|||
showProblems bool
|
||||
// fileOutput is where to write logs to. If omitted, writes to stdout.
|
||||
fileOutput string
|
||||
// auditLogs only shows the audit logs
|
||||
auditLogs bool
|
||||
)
|
||||
|
||||
// logsCmd represents the logs command
|
||||
|
@ -73,7 +75,13 @@ var logsCmd = &cobra.Command{
|
|||
exit.Error(reason.Usage, "Failed to create file", err)
|
||||
}
|
||||
}
|
||||
|
||||
if auditLogs {
|
||||
err := logs.OutputAudit(numberOfLines)
|
||||
if err != nil {
|
||||
klog.Errorf("failed to output audit logs: %v", err)
|
||||
}
|
||||
return
|
||||
}
|
||||
logs.OutputOffline(numberOfLines, logOutput)
|
||||
|
||||
if shouldSilentFail() {
|
||||
|
@ -91,7 +99,6 @@ var logsCmd = &cobra.Command{
|
|||
if err != nil {
|
||||
exit.Error(reason.InternalNewRuntime, "Unable to get runtime", err)
|
||||
}
|
||||
|
||||
if followLogs {
|
||||
err := logs.Follow(cr, bs, *co.Config, co.CP.Runner, logOutput)
|
||||
if err != nil {
|
||||
|
@ -142,4 +149,5 @@ func init() {
|
|||
logsCmd.Flags().IntVarP(&numberOfLines, "length", "n", 60, "Number of lines back to go within the log")
|
||||
logsCmd.Flags().StringVar(&nodeName, "node", "", "The node to get logs from. Defaults to the primary control plane.")
|
||||
logsCmd.Flags().StringVar(&fileOutput, "file", "", "If present, writes to the provided file instead of stdout.")
|
||||
logsCmd.Flags().BoolVar(&auditLogs, "audit", false, "Show only the audit logs")
|
||||
}
|
||||
|
|
17
go.mod
17
go.mod
|
@ -4,7 +4,7 @@ go 1.18
|
|||
|
||||
require (
|
||||
cloud.google.com/go/storage v1.22.0
|
||||
contrib.go.opencensus.io/exporter/stackdriver v0.13.11
|
||||
contrib.go.opencensus.io/exporter/stackdriver v0.13.12
|
||||
github.com/Delta456/box-cli-maker/v2 v2.2.2
|
||||
github.com/GoogleCloudPlatform/docker-credential-gcr v0.0.0-20210713212222-faed5e8b8ca2
|
||||
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.4.0
|
||||
|
@ -81,14 +81,14 @@ require (
|
|||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211
|
||||
golang.org/x/text v0.3.7
|
||||
gonum.org/v1/plot v0.11.0
|
||||
google.golang.org/api v0.74.0
|
||||
google.golang.org/api v0.75.0
|
||||
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0
|
||||
k8s.io/api v0.23.5
|
||||
k8s.io/apimachinery v0.23.5
|
||||
k8s.io/client-go v0.23.5
|
||||
k8s.io/api v0.23.6
|
||||
k8s.io/apimachinery v0.23.6
|
||||
k8s.io/client-go v0.23.6
|
||||
k8s.io/cluster-bootstrap v0.0.0
|
||||
k8s.io/component-base v0.23.5
|
||||
k8s.io/component-base v0.23.6
|
||||
k8s.io/klog/v2 v2.60.1
|
||||
k8s.io/kubectl v0.23.5
|
||||
k8s.io/utils v0.0.0-20211116205334-6203023598ed
|
||||
|
@ -104,7 +104,7 @@ require (
|
|||
|
||||
require (
|
||||
cloud.google.com/go v0.100.2 // indirect
|
||||
cloud.google.com/go/compute v1.5.0 // indirect
|
||||
cloud.google.com/go/compute v1.6.0 // indirect
|
||||
cloud.google.com/go/iam v0.3.0 // indirect
|
||||
cloud.google.com/go/monitoring v1.1.0 // indirect
|
||||
cloud.google.com/go/trace v1.2.0 // indirect
|
||||
|
@ -180,6 +180,7 @@ require (
|
|||
github.com/prometheus/client_model v0.2.0 // indirect
|
||||
github.com/prometheus/common v0.28.0 // indirect
|
||||
github.com/prometheus/procfs v0.6.0 // indirect
|
||||
github.com/prometheus/prometheus v2.5.0+incompatible // indirect
|
||||
github.com/rivo/uniseg v0.2.0 // indirect
|
||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||
github.com/sirupsen/logrus v1.8.1 // indirect
|
||||
|
@ -200,7 +201,7 @@ require (
|
|||
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
|
||||
golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f // indirect
|
||||
google.golang.org/appengine v1.6.7 // indirect
|
||||
google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac // indirect
|
||||
google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4 // indirect
|
||||
google.golang.org/grpc v1.45.0 // indirect
|
||||
google.golang.org/protobuf v1.28.0 // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
|
|
28
go.sum
28
go.sum
|
@ -40,8 +40,9 @@ cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4g
|
|||
cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=
|
||||
cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow=
|
||||
cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM=
|
||||
cloud.google.com/go/compute v1.5.0 h1:b1zWmYuuHz7gO9kDcM/EpHGr06UgsYNRpNJzI2kFiLM=
|
||||
cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M=
|
||||
cloud.google.com/go/compute v1.6.0 h1:XdQIN5mdPTSBVwSIVDuY5e8ZzVAccsHvD3qTEz4zIps=
|
||||
cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s=
|
||||
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
|
||||
cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
|
||||
cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk=
|
||||
|
@ -64,8 +65,8 @@ cloud.google.com/go/storage v1.22.0/go.mod h1:GbaLEoMqbVm6sx3Z0R++gSiBlgMv6yUi2q
|
|||
cloud.google.com/go/trace v1.0.0/go.mod h1:4iErSByzxkyHWzzlAj63/Gmjz0NH1ASqhJguHpGcr6A=
|
||||
cloud.google.com/go/trace v1.2.0 h1:oIaB4KahkIUOpLSAAjEJ8y2desbjY/x/RfP4O3KAtTI=
|
||||
cloud.google.com/go/trace v1.2.0/go.mod h1:Wc8y/uYyOhPy12KEnXG9XGrvfMz5F5SrYecQlbW1rwM=
|
||||
contrib.go.opencensus.io/exporter/stackdriver v0.13.11 h1:YzmWJ2OT2K3ouXyMm5FmFQPoDs5TfLjx6Xn5x5CLN0I=
|
||||
contrib.go.opencensus.io/exporter/stackdriver v0.13.11/go.mod h1:I5htMbyta491eUxufwwZPQdcKvvgzMB4O9ni41YnIM8=
|
||||
contrib.go.opencensus.io/exporter/stackdriver v0.13.12 h1:bjBKzIf7/TAkxd7L2utGaLM78bmUWlCval5K9UeElbY=
|
||||
contrib.go.opencensus.io/exporter/stackdriver v0.13.12/go.mod h1:mmxnWlrvrFdpiOHOhxBaVi1rkc0WOqhgfknj4Yg0SeQ=
|
||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20201218220906-28db891af037/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||
git.sr.ht/~sbinet/gg v0.3.1 h1:LNhjNn8DerC8f9DHLz6lS0YYul/b602DUxDgGkd/Aik=
|
||||
|
@ -986,6 +987,8 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O
|
|||
github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
|
||||
github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4=
|
||||
github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
|
||||
github.com/prometheus/prometheus v2.5.0+incompatible h1:7QPitgO2kOFG8ecuRn9O/4L9+10He72rVRJvMXrE9Hg=
|
||||
github.com/prometheus/prometheus v2.5.0+incompatible/go.mod h1:oAIUtOny2rjMX0OWN5vPR5/q/twIROJvdqnQKDdil/s=
|
||||
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
|
||||
github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||
github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
|
||||
|
@ -1609,8 +1612,9 @@ google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tD
|
|||
google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g=
|
||||
google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA=
|
||||
google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8=
|
||||
google.golang.org/api v0.74.0 h1:ExR2D+5TYIrMphWgs5JCgwRhEDlPDXXrLwHHMgPHTXE=
|
||||
google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs=
|
||||
google.golang.org/api v0.75.0 h1:0AYh/ae6l9TDUvIQrDw5QRpM100P6oHgD+o3dYHMzJg=
|
||||
google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA=
|
||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
|
@ -1699,8 +1703,10 @@ google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2
|
|||
google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI=
|
||||
google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E=
|
||||
google.golang.org/genproto v0.0.0-20220405205423-9d709892a2bf/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo=
|
||||
google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac h1:qSNTkEN+L2mvWcLgJOR+8bdHX9rN/IdU3A1Ghpfb1Rg=
|
||||
google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo=
|
||||
google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo=
|
||||
google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4 h1:myaecH64R0bIEDjNORIel4iXubqzaHU1K2z8ajBwWcM=
|
||||
google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo=
|
||||
google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
|
||||
|
@ -1811,15 +1817,17 @@ k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo=
|
|||
k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ=
|
||||
k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8=
|
||||
k8s.io/api v0.22.4/go.mod h1:Rgs+9gIGYC5laXQSZZ9JqT5NevNgoGiOdVWi1BAB3qk=
|
||||
k8s.io/api v0.23.5 h1:zno3LUiMubxD/V1Zw3ijyKO3wxrhbUF1Ck+VjBvfaoA=
|
||||
k8s.io/api v0.23.5/go.mod h1:Na4XuKng8PXJ2JsploYYrivXrINeTaycCGcYgF91Xm8=
|
||||
k8s.io/api v0.23.6 h1:yOK34wbYECH4RsJbQ9sfkFK3O7f/DUHRlzFehkqZyVw=
|
||||
k8s.io/api v0.23.6/go.mod h1:1kFaYxGCFHYp3qd6a85DAj/yW8aVD6XLZMqJclkoi9g=
|
||||
k8s.io/apimachinery v0.19.1/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA=
|
||||
k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU=
|
||||
k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU=
|
||||
k8s.io/apimachinery v0.20.6/go.mod h1:ejZXtW1Ra6V1O5H8xPBGz+T3+4gfkTCeExAHKU57MAc=
|
||||
k8s.io/apimachinery v0.22.4/go.mod h1:yU6oA6Gnax9RrxGzVvPFFJ+mpnW6PBSqp0sx0I0HHW0=
|
||||
k8s.io/apimachinery v0.23.5 h1:Va7dwhp8wgkUPWsEXk6XglXWU4IKYLKNlv8VkX7SDM0=
|
||||
k8s.io/apimachinery v0.23.5/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM=
|
||||
k8s.io/apimachinery v0.23.6 h1:RH1UweWJkWNTlFx0D8uxOpaU1tjIOvVVWV/bu5b3/NQ=
|
||||
k8s.io/apimachinery v0.23.6/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM=
|
||||
k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU=
|
||||
k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM=
|
||||
k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q=
|
||||
|
@ -1828,16 +1836,18 @@ k8s.io/client-go v0.19.1/go.mod h1:AZOIVSI9UUtQPeJD3zJFp15CEhSjRgAuQP5PWRJrCIQ=
|
|||
k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y=
|
||||
k8s.io/client-go v0.20.4/go.mod h1:LiMv25ND1gLUdBeYxBIwKpkSC5IsozMMmOOeSJboP+k=
|
||||
k8s.io/client-go v0.20.6/go.mod h1:nNQMnOvEUEsOzRRFIIkdmYOjAZrC8bgq0ExboWSU1I0=
|
||||
k8s.io/client-go v0.23.5 h1:zUXHmEuqx0RY4+CsnkOn5l0GU+skkRXKGJrhmE2SLd8=
|
||||
k8s.io/client-go v0.23.5/go.mod h1:flkeinTO1CirYgzMPRWxUCnV0G4Fbu2vLhYCObnt/r4=
|
||||
k8s.io/client-go v0.23.6 h1:7h4SctDVQAQbkHQnR4Kzi7EyUyvla5G1pFWf4+Od7hQ=
|
||||
k8s.io/client-go v0.23.6/go.mod h1:Umt5icFOMLV/+qbtZ3PR0D+JA6lvvb3syzodv4irpK4=
|
||||
k8s.io/cluster-bootstrap v0.22.4 h1:2ZhV/1K4GiCrnmDHHbBnN3bERWn+Nxrtxmxp6uYYThI=
|
||||
k8s.io/cluster-bootstrap v0.22.4/go.mod h1:fTQZ6u9G6fg2LHhB8nEgZLnXIhCDSRYuLUUS5pgW8RY=
|
||||
k8s.io/code-generator v0.23.5/go.mod h1:S0Q1JVA+kSzTI1oUvbKAxZY/DYbA/ZUb4Uknog12ETk=
|
||||
k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk=
|
||||
k8s.io/component-base v0.20.4/go.mod h1:t4p9EdiagbVCJKrQ1RsA5/V4rFQNDfRlevJajlGwgjI=
|
||||
k8s.io/component-base v0.20.6/go.mod h1:6f1MPBAeI+mvuts3sIdtpjljHWBQ2cIy38oBIWMYnrM=
|
||||
k8s.io/component-base v0.23.5 h1:8qgP5R6jG1BBSXmRYW+dsmitIrpk8F/fPEvgDenMCCE=
|
||||
k8s.io/component-base v0.23.5/go.mod h1:c5Nq44KZyt1aLl0IpHX82fhsn84Sb0jjzwjpcA42bY0=
|
||||
k8s.io/component-base v0.23.6 h1:8dhVZ4VrRcNdV2EGjl8tj8YOHwX6ysgCGMJ2Oyy0NW8=
|
||||
k8s.io/component-base v0.23.6/go.mod h1:FGMPeMrjYu0UZBSAFcfloVDplj9IvU+uRMTOdE23Fj0=
|
||||
k8s.io/component-helpers v0.23.5/go.mod h1:5riXJgjTIs+ZB8xnf5M2anZ8iQuq37a0B/0BgoPQuSM=
|
||||
k8s.io/cri-api v0.17.3/go.mod h1:X1sbHmuXhwaHs9xxYffLqJogVsnI+f6cPRcgPel7ywM=
|
||||
k8s.io/cri-api v0.20.1/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI=
|
||||
|
|
|
@ -69,7 +69,7 @@ int ClusterModel::rowCount(const QModelIndex &) const
|
|||
|
||||
int ClusterModel::columnCount(const QModelIndex &) const
|
||||
{
|
||||
return 6;
|
||||
return 7;
|
||||
}
|
||||
|
||||
static QStringList binaryAbbrs = { "B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB" };
|
||||
|
@ -81,7 +81,7 @@ QVariant ClusterModel::data(const QModelIndex &index, int role) const
|
|||
|
||||
if (index.row() >= clusterList.size())
|
||||
return QVariant();
|
||||
if (index.column() >= 6)
|
||||
if (index.column() >= 7)
|
||||
return QVariant();
|
||||
|
||||
if (role == Qt::TextAlignmentRole) {
|
||||
|
@ -97,6 +97,8 @@ QVariant ClusterModel::data(const QModelIndex &index, int role) const
|
|||
case 4:
|
||||
// fall-through
|
||||
case 5:
|
||||
// fall-through
|
||||
case 6:
|
||||
return QVariant(Qt::AlignHCenter | Qt::AlignVCenter);
|
||||
}
|
||||
}
|
||||
|
@ -112,8 +114,10 @@ QVariant ClusterModel::data(const QModelIndex &index, int role) const
|
|||
case 3:
|
||||
return cluster.containerRuntime();
|
||||
case 4:
|
||||
return QString::number(cluster.cpus());
|
||||
return cluster.k8sVersion();
|
||||
case 5:
|
||||
return QString::number(cluster.cpus());
|
||||
case 6:
|
||||
return QString::number(cluster.memory());
|
||||
}
|
||||
}
|
||||
|
@ -136,8 +140,10 @@ QVariant ClusterModel::headerData(int section, Qt::Orientation orientation, int
|
|||
case 3:
|
||||
return tr("Container Runtime");
|
||||
case 4:
|
||||
return tr("CPUs");
|
||||
return tr("Kubernetes Version");
|
||||
case 5:
|
||||
return tr("CPUs");
|
||||
case 6:
|
||||
return tr("Memory (MB)");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -64,7 +64,13 @@ class Cluster
|
|||
public:
|
||||
Cluster() : Cluster("") { }
|
||||
Cluster(const QString &name)
|
||||
: m_name(name), m_status(""), m_driver(""), m_container_runtime(""), m_cpus(0), m_memory(0)
|
||||
: m_name(name),
|
||||
m_status(""),
|
||||
m_driver(""),
|
||||
m_container_runtime(""),
|
||||
m_k8s_version(""),
|
||||
m_cpus(0),
|
||||
m_memory(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -75,6 +81,8 @@ public:
|
|||
void setDriver(QString driver) { m_driver = driver; }
|
||||
QString containerRuntime() const { return m_container_runtime; }
|
||||
void setContainerRuntime(QString containerRuntime) { m_container_runtime = containerRuntime; }
|
||||
QString k8sVersion() const { return m_k8s_version; }
|
||||
void setK8sVersion(QString k8sVersion) { m_k8s_version = k8sVersion; }
|
||||
int cpus() const { return m_cpus; }
|
||||
void setCpus(int cpus) { m_cpus = cpus; }
|
||||
int memory() const { return m_memory; }
|
||||
|
@ -86,6 +94,7 @@ private:
|
|||
QString m_status;
|
||||
QString m_driver;
|
||||
QString m_container_runtime;
|
||||
QString m_k8s_version;
|
||||
int m_cpus;
|
||||
int m_memory;
|
||||
};
|
||||
|
|
|
@ -391,6 +391,10 @@ Cluster Window::createClusterObject(QJsonObject obj)
|
|||
QString containerRuntime = k8sConfig["ContainerRuntime"].toString();
|
||||
cluster.setContainerRuntime(containerRuntime);
|
||||
}
|
||||
if (k8sConfig.contains("KubernetesVersion")) {
|
||||
QString k8sVersion = k8sConfig["KubernetesVersion"].toString();
|
||||
cluster.setK8sVersion(k8sVersion);
|
||||
}
|
||||
return cluster;
|
||||
}
|
||||
|
||||
|
@ -435,6 +439,7 @@ void Window::createClusterGroupBox()
|
|||
clusterListView->horizontalHeader()->setSectionResizeMode(3, QHeaderView::ResizeToContents);
|
||||
clusterListView->horizontalHeader()->setSectionResizeMode(4, QHeaderView::ResizeToContents);
|
||||
clusterListView->horizontalHeader()->setSectionResizeMode(5, QHeaderView::ResizeToContents);
|
||||
clusterListView->horizontalHeader()->setSectionResizeMode(6, QHeaderView::ResizeToContents);
|
||||
setSelectedClusterName("default");
|
||||
|
||||
connect(clusterListView, SIGNAL(clicked(QModelIndex)), this, SLOT(updateButtons()));
|
||||
|
@ -725,13 +730,12 @@ void Window::outputFailedStart(QString text)
|
|||
errorMessage->setStyleSheet("background-color:white;");
|
||||
createLabel("Link to documentation", url, &form, true);
|
||||
createLabel("Link to related issue", issues, &form, true);
|
||||
// Enabling once https://github.com/kubernetes/minikube/issues/13925 is fixed
|
||||
// QLabel *fileLabel = new QLabel(this);
|
||||
// fileLabel->setOpenExternalLinks(true);
|
||||
// fileLabel->setWordWrap(true);
|
||||
// QString logFile = QDir::homePath() + "/.minikube/logs/lastStart.txt";
|
||||
// fileLabel->setText("<a href='file:///" + logFile + "'>View log file</a>");
|
||||
// form.addRow(fileLabel);
|
||||
QLabel *fileLabel = new QLabel(this);
|
||||
fileLabel->setOpenExternalLinks(true);
|
||||
fileLabel->setWordWrap(true);
|
||||
QString logFile = QDir::homePath() + "/.minikube/logs/lastStart.txt";
|
||||
fileLabel->setText("<a href='file:///" + logFile + "'>View log file</a>");
|
||||
form.addRow(fileLabel);
|
||||
QDialogButtonBox buttonBox(Qt::Horizontal, &dialog);
|
||||
buttonBox.addButton(QString(tr("OK")), QDialogButtonBox::AcceptRole);
|
||||
connect(&buttonBox, &QDialogButtonBox::accepted, &dialog, &QDialog::accept);
|
||||
|
|
|
@ -238,8 +238,8 @@ var Addons = map[string]*Addon{
|
|||
"ingress-deploy.yaml",
|
||||
"0640"),
|
||||
}, false, "ingress", "", map[string]string{
|
||||
// https://github.com/kubernetes/ingress-nginx/blob/fc38b9f2aa2d68ee00c417cf97e727b77a00c175/deploy/static/provider/kind/deploy.yaml#L331
|
||||
"IngressController": "ingress-nginx/controller:v1.1.1@sha256:0bc88eb15f9e7f84e8e56c14fa5735aaa488b840983f87bd79b1054190e660de",
|
||||
// https://github.com/kubernetes/ingress-nginx/blob/6d9a39eda7b180f27b34726d7a7a96d73808ce75/deploy/static/provider/kind/deploy.yaml#L417
|
||||
"IngressController": "ingress-nginx/controller:v1.2.0@sha256:d8196e3bc1e72547c5dec66d6556c0ff92a23f6d0919b206be170bc90d5f9185",
|
||||
// https://github.com/kubernetes/ingress-nginx/blob/fc38b9f2aa2d68ee00c417cf97e727b77a00c175/deploy/static/provider/kind/deploy.yaml#L621
|
||||
"KubeWebhookCertgenCreate": "k8s.gcr.io/ingress-nginx/kube-webhook-certgen:v1.1.1@sha256:64d8c73dca984af206adf9d6d7e46aa550362b1d7a01f3a0a91b20cc67868660",
|
||||
// https://github.com/kubernetes/ingress-nginx/blob/fc38b9f2aa2d68ee00c417cf97e727b77a00c175/deploy/static/provider/kind/deploy.yaml#L673
|
||||
|
|
|
@ -18,10 +18,15 @@ package constants
|
|||
|
||||
var (
|
||||
KubeadmImages = map[string]map[string]string{
|
||||
"v1.25": {
|
||||
"coredns/coredns": "v1.8.6",
|
||||
"etcd": "3.5.3-0",
|
||||
"pause": "3.7",
|
||||
},
|
||||
"v1.24": {
|
||||
"coredns/coredns": "v1.8.6",
|
||||
"etcd": "3.5.1-0",
|
||||
"pause": "3.6",
|
||||
"etcd": "3.5.3-0",
|
||||
"pause": "3.7",
|
||||
},
|
||||
"v1.23": {
|
||||
"coredns/coredns": "v1.8.6",
|
||||
|
|
|
@ -208,7 +208,7 @@ func Output(r cruntime.Manager, bs bootstrapper.Bootstrapper, cfg config.Cluster
|
|||
}
|
||||
|
||||
// outputAudit displays the audit logs.
|
||||
func outputAudit(lines int) error {
|
||||
func OutputAudit(lines int) error {
|
||||
out.Styled(style.Empty, "")
|
||||
out.Styled(style.Empty, "==> Audit <==")
|
||||
r, err := audit.Report(lines)
|
||||
|
@ -252,7 +252,7 @@ func OutputOffline(lines int, logOutput *os.File) {
|
|||
defer out.SetOutFile(os.Stdout)
|
||||
out.SetErrFile(logOutput)
|
||||
defer out.SetErrFile(os.Stderr)
|
||||
if err := outputAudit(lines); err != nil {
|
||||
if err := OutputAudit(lines); err != nil {
|
||||
klog.Errorf("failed to output audit logs: %v", err)
|
||||
}
|
||||
if err := outputLastStart(); err != nil {
|
||||
|
|
|
@ -20,6 +20,7 @@ minikube logs [flags]
|
|||
### Options
|
||||
|
||||
```
|
||||
--audit Show only the audit logs
|
||||
--file string If present, writes to the provided file instead of stdout.
|
||||
-f, --follow Show only the most recent journal entries, and continuously print new entries as they are appended to the journal.
|
||||
-n, --length int Number of lines back to go within the log (default 60)
|
||||
|
|
|
@ -29,11 +29,13 @@ import (
|
|||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/blang/semver/v4"
|
||||
"github.com/docker/machine/libmachine/state"
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"k8s.io/minikube/pkg/minikube/bootstrapper/images"
|
||||
"k8s.io/minikube/pkg/minikube/constants"
|
||||
"k8s.io/minikube/pkg/minikube/detect"
|
||||
"k8s.io/minikube/pkg/util"
|
||||
)
|
||||
|
||||
// TestStartStop tests starting, stopping and restarting a minikube clusters with various Kubernetes versions and configurations
|
||||
|
@ -112,6 +114,21 @@ func TestStartStop(t *testing.T) {
|
|||
startArgs = append(startArgs, StartArgs()...)
|
||||
startArgs = append(startArgs, fmt.Sprintf("--kubernetes-version=%s", tc.version))
|
||||
|
||||
version, err := util.ParseKubernetesVersion(tc.version)
|
||||
if err != nil {
|
||||
t.Errorf("failed to parse %s: %v", tc.version, err)
|
||||
}
|
||||
if version.GTE(semver.MustParse("1.24.0-alpha.2")) {
|
||||
args := []string{}
|
||||
for _, arg := range args {
|
||||
if arg == "--extra-config=kubelet.network-plugin=cni" {
|
||||
continue
|
||||
}
|
||||
args = append(args, arg)
|
||||
}
|
||||
startArgs = args
|
||||
}
|
||||
|
||||
t.Run("serial", func(t *testing.T) {
|
||||
serialTests := []struct {
|
||||
name string
|
||||
|
|
|
@ -244,6 +244,7 @@
|
|||
"Failed to change permissions for {{.minikube_dir_path}}: {{.error}}": "Fehler beim Ändern der Berechtigungen für {{.minikube_dir_path}}: {{.error}}",
|
||||
"Failed to check main repository and mirrors for images": "Prüfen des Haupt-Repositories und der Mirrors für Images fehlgeschlagen",
|
||||
"Failed to configure metallb IP {{.profile}}": "Konfiguration der metallb IP {{.profile}} fehlgeschlagen",
|
||||
"Failed to configure network plugin": "",
|
||||
"Failed to create file": "Erstellen der Datei fehlgeschlagen",
|
||||
"Failed to create runtime": "Erstellen der Runtime fehlgeschlagen",
|
||||
"Failed to delete cluster {{.name}}, proceeding with retry anyway.": "Löschen des Clusters {{.name}} fehlgeschlagen, versuche es dennoch erneut.",
|
||||
|
@ -574,6 +575,7 @@
|
|||
"Setting profile failed": "Setzten des Profiles fehlgeschlagen",
|
||||
"Show a list of global command-line options (applies to all commands).": "Zeige eine Liste von globalen Kommandozeilen Parametern (die auf alle Befehle angewendet werden können)",
|
||||
"Show only log entries which point to known problems": "Zeige nur Log Einträge, die auf bekannte Probleme hinweisen",
|
||||
"Show only the audit logs": "",
|
||||
"Show only the most recent journal entries, and continuously print new entries as they are appended to the journal.": "Zeige die aktuellsten Journal Einträge und gebe neue Einträge aus, sobald diese im Journal eingetragen werden.",
|
||||
"Simulate numa node count in minikube, supported numa node count range is 1-8 (kvm2 driver only)": "Simuliere den Numa Node Count in Minikube, der unterstützte Numa Node Count Bereich ist 1-8 (nur kvm2 Treiber)",
|
||||
"Skipped switching kubectl context for {{.profile_name}} because --keep-context was set.": "Wechsel des kubectl Kontexts für {{.profile_name}} übersprungen, weil --keep-context gesetzt wurde.",
|
||||
|
|
|
@ -253,6 +253,7 @@
|
|||
"Failed to change permissions for {{.minikube_dir_path}}: {{.error}}": "No se han podido cambiar los permisos de {{.minikube_dir_path}}: {{.error}}",
|
||||
"Failed to check main repository and mirrors for images": "",
|
||||
"Failed to configure metallb IP {{.profile}}": "",
|
||||
"Failed to configure network plugin": "",
|
||||
"Failed to create file": "No se pudo crear el fichero",
|
||||
"Failed to create runtime": "",
|
||||
"Failed to delete cluster {{.name}}, proceeding with retry anyway.": "",
|
||||
|
@ -581,6 +582,7 @@
|
|||
"Setting profile failed": "",
|
||||
"Show a list of global command-line options (applies to all commands).": "",
|
||||
"Show only log entries which point to known problems": "",
|
||||
"Show only the audit logs": "",
|
||||
"Show only the most recent journal entries, and continuously print new entries as they are appended to the journal.": "",
|
||||
"Simulate numa node count in minikube, supported numa node count range is 1-8 (kvm2 driver only)": "",
|
||||
"Skipped switching kubectl context for {{.profile_name}} because --keep-context was set.": "",
|
||||
|
|
|
@ -239,6 +239,7 @@
|
|||
"Failed to change permissions for {{.minikube_dir_path}}: {{.error}}": "Échec de la modification des autorisations pour {{.minikube_dir_path}} : {{.error}}",
|
||||
"Failed to check main repository and mirrors for images": "Échec de la vérification du référentiel principal et des miroirs pour les images",
|
||||
"Failed to configure metallb IP {{.profile}}": "Échec de la configuration de metallb IP {{.profile}}",
|
||||
"Failed to configure network plugin": "Échec de la configuration du plug-in réseau",
|
||||
"Failed to create file": "La création du fichier a échoué",
|
||||
"Failed to create runtime": "Échec de la création de l'environnement d'exécution",
|
||||
"Failed to delete cluster {{.name}}, proceeding with retry anyway.": "Échec de la suppression du cluster {{.name}}, réessayez quand même.",
|
||||
|
@ -556,6 +557,7 @@
|
|||
"Setting profile failed": "Échec de la définition du profil",
|
||||
"Show a list of global command-line options (applies to all commands).": "Affiche une liste des options de ligne de commande globales (s'applique à toutes les commandes).",
|
||||
"Show only log entries which point to known problems": "Afficher uniquement les entrées de journal qui pointent vers des problèmes connus",
|
||||
"Show only the audit logs": "Afficher uniquement les journaux d'audit",
|
||||
"Show only the most recent journal entries, and continuously print new entries as they are appended to the journal.": "Affichez uniquement les entrées de journal les plus récentes et imprimez en continu de nouvelles entrées au fur et à mesure qu'elles sont ajoutées au journal.",
|
||||
"Simulate numa node count in minikube, supported numa node count range is 1-8 (kvm2 driver only)": "Simulez le nombre de nœuds numa dans minikube, la plage de nombre de nœuds numa pris en charge est de 1 à 8 (pilote kvm2 uniquement)",
|
||||
"Skipped switching kubectl context for {{.profile_name}} because --keep-context was set.": "Changement de contexte kubectl ignoré pour {{.profile_name}} car --keep-context a été défini.",
|
||||
|
|
|
@ -245,6 +245,7 @@
|
|||
"Failed to change permissions for {{.minikube_dir_path}}: {{.error}}": "{{.minikube_dir_path}} に対する権限の変更に失敗しました: {{.error}}",
|
||||
"Failed to check main repository and mirrors for images": "メインリポジトリーとミラーのイメージのチェックに失敗しました",
|
||||
"Failed to configure metallb IP {{.profile}}": "metallb IP {{.profile}} の設定に失敗しました",
|
||||
"Failed to configure network plugin": "",
|
||||
"Failed to create file": "ファイルの作成に失敗しました",
|
||||
"Failed to create runtime": "ランタイムの作成に失敗しました",
|
||||
"Failed to delete cluster {{.name}}, proceeding with retry anyway.": "{{.name}} クラスターを削除できませんでしたが、処理を続行します。",
|
||||
|
@ -572,6 +573,7 @@
|
|||
"Setting profile failed": "プロファイルの設定に失敗しました",
|
||||
"Show a list of global command-line options (applies to all commands).": "(全コマンドに適用される) グローバルコマンドラインオプションの一覧を表示します。",
|
||||
"Show only log entries which point to known problems": "既知の問題を示すログエントリーのみ表示します",
|
||||
"Show only the audit logs": "",
|
||||
"Show only the most recent journal entries, and continuously print new entries as they are appended to the journal.": "直近のジャーナルエントリーのみ表示し、ジャーナルに追加された新しいエントリーを連続して表示します。",
|
||||
"Simulate numa node count in minikube, supported numa node count range is 1-8 (kvm2 driver only)": "minikube 中の NUMA ノードカウントをシミュレートします (対応 NUMA ノードカウント範囲は 1~8 (kvm2 ドライバーのみ))",
|
||||
"Skipped switching kubectl context for {{.profile_name}} because --keep-context was set.": "--keep-context が設定されたので、{{.profile_name}} 用 kubectl コンテキストの切替をスキップしました。",
|
||||
|
|
|
@ -266,6 +266,7 @@
|
|||
"Failed to check if machine exists": "머신이 존재하는지 확인하는 데 실패하였습니다",
|
||||
"Failed to check main repository and mirrors for images": "",
|
||||
"Failed to configure metallb IP {{.profile}}": "",
|
||||
"Failed to configure network plugin": "",
|
||||
"Failed to create file": "",
|
||||
"Failed to create runtime": "",
|
||||
"Failed to delete cluster {{.name}}, proceeding with retry anyway.": "",
|
||||
|
@ -593,6 +594,7 @@
|
|||
"Setting profile failed": "프로필 설정이 실패하였습니다",
|
||||
"Show a list of global command-line options (applies to all commands).": "",
|
||||
"Show only log entries which point to known problems": "",
|
||||
"Show only the audit logs": "",
|
||||
"Show only the most recent journal entries, and continuously print new entries as they are appended to the journal.": "",
|
||||
"Simulate numa node count in minikube, supported numa node count range is 1-8 (kvm2 driver only)": "",
|
||||
"Skipped switching kubectl context for {{.profile_name}} because --keep-context was set.": "",
|
||||
|
|
|
@ -255,6 +255,7 @@
|
|||
"Failed to change permissions for {{.minikube_dir_path}}: {{.error}}": "Nie udało się zmienić uprawnień pliku {{.minikube_dir_path}}: {{.error}}",
|
||||
"Failed to check main repository and mirrors for images": "",
|
||||
"Failed to configure metallb IP {{.profile}}": "",
|
||||
"Failed to configure network plugin": "",
|
||||
"Failed to create file": "",
|
||||
"Failed to create runtime": "",
|
||||
"Failed to delete cluster {{.name}}, proceeding with retry anyway.": "",
|
||||
|
@ -594,6 +595,7 @@
|
|||
"Setting profile failed": "Ustawianie profilu nie powiodło się",
|
||||
"Show a list of global command-line options (applies to all commands).": "",
|
||||
"Show only log entries which point to known problems": "Pokaż logi które wskazują na znane problemy",
|
||||
"Show only the audit logs": "",
|
||||
"Show only the most recent journal entries, and continuously print new entries as they are appended to the journal.": "",
|
||||
"Simulate numa node count in minikube, supported numa node count range is 1-8 (kvm2 driver only)": "",
|
||||
"Skipped switching kubectl context for {{.profile_name}} because --keep-context was set.": "Zignorowano zmianę kontekstu kubectl dla {{.profile_name}} ponieważ --keep-context zostało przekazane",
|
||||
|
|
|
@ -229,6 +229,7 @@
|
|||
"Failed to change permissions for {{.minikube_dir_path}}: {{.error}}": "",
|
||||
"Failed to check main repository and mirrors for images": "",
|
||||
"Failed to configure metallb IP {{.profile}}": "",
|
||||
"Failed to configure network plugin": "",
|
||||
"Failed to create file": "",
|
||||
"Failed to create runtime": "",
|
||||
"Failed to delete cluster {{.name}}, proceeding with retry anyway.": "",
|
||||
|
@ -541,6 +542,7 @@
|
|||
"Setting profile failed": "",
|
||||
"Show a list of global command-line options (applies to all commands).": "",
|
||||
"Show only log entries which point to known problems": "",
|
||||
"Show only the audit logs": "",
|
||||
"Show only the most recent journal entries, and continuously print new entries as they are appended to the journal.": "",
|
||||
"Simulate numa node count in minikube, supported numa node count range is 1-8 (kvm2 driver only)": "",
|
||||
"Skipped switching kubectl context for {{.profile_name}} because --keep-context was set.": "",
|
||||
|
|
|
@ -229,6 +229,7 @@
|
|||
"Failed to change permissions for {{.minikube_dir_path}}: {{.error}}": "",
|
||||
"Failed to check main repository and mirrors for images": "",
|
||||
"Failed to configure metallb IP {{.profile}}": "",
|
||||
"Failed to configure network plugin": "",
|
||||
"Failed to create file": "",
|
||||
"Failed to create runtime": "",
|
||||
"Failed to delete cluster {{.name}}, proceeding with retry anyway.": "",
|
||||
|
@ -541,6 +542,7 @@
|
|||
"Setting profile failed": "",
|
||||
"Show a list of global command-line options (applies to all commands).": "",
|
||||
"Show only log entries which point to known problems": "",
|
||||
"Show only the audit logs": "",
|
||||
"Show only the most recent journal entries, and continuously print new entries as they are appended to the journal.": "",
|
||||
"Simulate numa node count in minikube, supported numa node count range is 1-8 (kvm2 driver only)": "",
|
||||
"Skipped switching kubectl context for {{.profile_name}} because --keep-context was set.": "",
|
||||
|
|
|
@ -314,6 +314,7 @@
|
|||
"Failed to check main repository and mirrors for images": "",
|
||||
"Failed to check main repository and mirrors for images for images": "无法检测主仓库和镜像仓库中的镜像",
|
||||
"Failed to configure metallb IP {{.profile}}": "",
|
||||
"Failed to configure network plugin": "",
|
||||
"Failed to create file": "",
|
||||
"Failed to create runtime": "",
|
||||
"Failed to delete cluster {{.name}}, proceeding with retry anyway.": "",
|
||||
|
@ -677,6 +678,7 @@
|
|||
"Setting profile failed": "设置配置文件失败",
|
||||
"Show a list of global command-line options (applies to all commands).": "显示全局命令行选项列表 (应用于所有命令)。",
|
||||
"Show only log entries which point to known problems": "",
|
||||
"Show only the audit logs": "",
|
||||
"Show only the most recent journal entries, and continuously print new entries as they are appended to the journal.": "",
|
||||
"Simulate numa node count in minikube, supported numa node count range is 1-8 (kvm2 driver only)": "",
|
||||
"Skipped switching kubectl context for {{.profile_name}} because --keep-context was set.": "",
|
||||
|
|
Loading…
Reference in New Issue