mirror of
https://github.com/k8sgpt-ai/k8sgpt.git
synced 2025-09-19 18:16:09 +00:00
Merge branch 'main' into local_models
This commit is contained in:
18
.github/workflows/golangci_lint.yaml
vendored
Normal file
18
.github/workflows/golangci_lint.yaml
vendored
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
name: Run golangci-lint
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches: [ main ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
golangci-lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out code into the Go module directory
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: golangci-lint
|
||||||
|
uses: reviewdog/action-golangci-lint@v2
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
reporter: github-pr-check
|
@@ -1 +1 @@
|
|||||||
{".":"0.2.6"}
|
{".":"0.2.7"}
|
@@ -1,5 +1,12 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [0.2.7](https://github.com/k8sgpt-ai/k8sgpt/compare/v0.2.6...v0.2.7) (2023-04-25)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* remove pointer to loop variable when searching the latest event to analyze ([#328](https://github.com/k8sgpt-ai/k8sgpt/issues/328)) ([2616220](https://github.com/k8sgpt-ai/k8sgpt/commit/2616220935d450030c8a9f2f2741c3607aa4b663))
|
||||||
|
|
||||||
## [0.2.6](https://github.com/k8sgpt-ai/k8sgpt/compare/v0.2.5...v0.2.6) (2023-04-25)
|
## [0.2.6](https://github.com/k8sgpt-ai/k8sgpt/compare/v0.2.5...v0.2.6) (2023-04-25)
|
||||||
|
|
||||||
|
|
||||||
|
12
README.md
12
README.md
@@ -30,7 +30,7 @@ brew install k8sgpt
|
|||||||
**32 bit:**
|
**32 bit:**
|
||||||
<!---x-release-please-start-version-->
|
<!---x-release-please-start-version-->
|
||||||
```
|
```
|
||||||
curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.2.6/k8sgpt_386.rpm
|
curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.2.7/k8sgpt_386.rpm
|
||||||
sudo rpm -ivh k8sgpt_386.rpm
|
sudo rpm -ivh k8sgpt_386.rpm
|
||||||
```
|
```
|
||||||
<!---x-release-please-end-->
|
<!---x-release-please-end-->
|
||||||
@@ -39,7 +39,7 @@ brew install k8sgpt
|
|||||||
|
|
||||||
<!---x-release-please-start-version-->
|
<!---x-release-please-start-version-->
|
||||||
```
|
```
|
||||||
curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.2.6/k8sgpt_amd64.rpm
|
curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.2.7/k8sgpt_amd64.rpm
|
||||||
sudo rpm -ivh -i k8sgpt_amd64.rpm
|
sudo rpm -ivh -i k8sgpt_amd64.rpm
|
||||||
```
|
```
|
||||||
<!---x-release-please-end-->
|
<!---x-release-please-end-->
|
||||||
@@ -51,7 +51,7 @@ brew install k8sgpt
|
|||||||
**32 bit:**
|
**32 bit:**
|
||||||
<!---x-release-please-start-version-->
|
<!---x-release-please-start-version-->
|
||||||
```
|
```
|
||||||
curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.2.6/k8sgpt_386.deb
|
curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.2.7/k8sgpt_386.deb
|
||||||
sudo dpkg -i k8sgpt_386.deb
|
sudo dpkg -i k8sgpt_386.deb
|
||||||
```
|
```
|
||||||
<!---x-release-please-end-->
|
<!---x-release-please-end-->
|
||||||
@@ -59,7 +59,7 @@ brew install k8sgpt
|
|||||||
|
|
||||||
<!---x-release-please-start-version-->
|
<!---x-release-please-start-version-->
|
||||||
```
|
```
|
||||||
curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.2.6/k8sgpt_amd64.deb
|
curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.2.7/k8sgpt_amd64.deb
|
||||||
sudo dpkg -i k8sgpt_amd64.deb
|
sudo dpkg -i k8sgpt_amd64.deb
|
||||||
```
|
```
|
||||||
<!---x-release-please-end-->
|
<!---x-release-please-end-->
|
||||||
@@ -72,14 +72,14 @@ brew install k8sgpt
|
|||||||
**32 bit:**
|
**32 bit:**
|
||||||
<!---x-release-please-start-version-->
|
<!---x-release-please-start-version-->
|
||||||
```
|
```
|
||||||
curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.2.6/k8sgpt_386.apk
|
curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.2.7/k8sgpt_386.apk
|
||||||
apk add k8sgpt_386.apk
|
apk add k8sgpt_386.apk
|
||||||
```
|
```
|
||||||
<!---x-release-please-end-->
|
<!---x-release-please-end-->
|
||||||
**64 bit:**
|
**64 bit:**
|
||||||
<!---x-release-please-start-version-->
|
<!---x-release-please-start-version-->
|
||||||
```
|
```
|
||||||
curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.2.6/k8sgpt_amd64.apk
|
curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.2.7/k8sgpt_amd64.apk
|
||||||
apk add k8sgpt_amd64.apk
|
apk add k8sgpt_amd64.apk
|
||||||
```
|
```
|
||||||
<!---x-release-please-end-->x
|
<!---x-release-please-end-->x
|
||||||
|
@@ -76,7 +76,11 @@ var ServeCmd = &cobra.Command{
|
|||||||
if aiProvider == nil {
|
if aiProvider == nil {
|
||||||
for _, provider := range configAI.Providers {
|
for _, provider := range configAI.Providers {
|
||||||
if backend == provider.Name {
|
if backend == provider.Name {
|
||||||
aiProvider = &provider
|
// he pointer to the range variable is not really an issue here, as there
|
||||||
|
// is a break right after, but to prevent potential future issues, a temp
|
||||||
|
// variable is assigned
|
||||||
|
p := provider
|
||||||
|
aiProvider = &p
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -19,7 +19,7 @@ spec:
|
|||||||
containers:
|
containers:
|
||||||
- name: k8sgpt-container
|
- name: k8sgpt-container
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
image: ghcr.io/k8sgpt-ai/k8sgpt:v0.2.6 #x-release-please-version
|
image: ghcr.io/k8sgpt-ai/k8sgpt:v0.2.7 #x-release-please-version
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
args: ["serve"]
|
args: ["serve"]
|
||||||
|
@@ -36,10 +36,14 @@ func FetchLatestEvent(ctx context.Context, kubernetesClient *kubernetes.Client,
|
|||||||
var latestEvent *v1.Event
|
var latestEvent *v1.Event
|
||||||
for _, event := range events.Items {
|
for _, event := range events.Items {
|
||||||
if latestEvent == nil {
|
if latestEvent == nil {
|
||||||
latestEvent = &event
|
// this is required, as a pointer to a loop variable would always yield the latest value in the range
|
||||||
|
e := event
|
||||||
|
latestEvent = &e
|
||||||
}
|
}
|
||||||
if event.LastTimestamp.After(latestEvent.LastTimestamp.Time) {
|
if event.LastTimestamp.After(latestEvent.LastTimestamp.Time) {
|
||||||
latestEvent = &event
|
// this is required, as a pointer to a loop variable would always yield the latest value in the range
|
||||||
|
e := event
|
||||||
|
latestEvent = &e
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return latestEvent, nil
|
return latestEvent, nil
|
||||||
|
Reference in New Issue
Block a user