Compare commits

..

13 Commits

Author SHA1 Message Date
Alex Jones
e76781ceae merged
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2023-05-19 21:50:17 +01:00
Alex Jones
5bedcddb3c chore: test fmt causing issues will open another pr
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2023-05-19 09:22:46 +01:00
Alex Jones
a5f8459bc2 updated remove.go
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2023-05-19 09:18:34 +01:00
Alex Jones
660a815295 Merge branch 'main' into feat/caching
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2023-05-19 08:01:58 +01:00
Alex Jones
cf33e291e0 chore: clarified remove command 2023-05-19 08:00:52 +01:00
Alex Jones
99704017bf chore: region is a must have
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2023-05-19 07:56:08 +01:00
Alex Jones
6852e9851b updated README.md
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2023-05-19 07:56:08 +01:00
Alex Jones
6efdb42cac update README.md
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2023-05-19 07:56:07 +01:00
Alex Jones
afbb52b4bf updated README.md
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2023-05-19 07:56:07 +01:00
Alex Jones
4441196c8b feat: s3 based caching
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2023-05-19 07:56:05 +01:00
Alex Jones
2d244f20c3 feat: s3 based caching
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2023-05-19 07:56:04 +01:00
Alex Jones
4aa87db38c feat: added the ability to set a user default AI provider
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2023-05-19 07:56:04 +01:00
Alex Jones
0bf4da1718 feat: added the ability to set a user default AI provider
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2023-05-19 07:56:04 +01:00
9 changed files with 16 additions and 62 deletions

View File

@@ -15,8 +15,6 @@ builds:
- darwin
ldflags:
- -s -w -X main.version={{.Version}}
- -s -w -X main.commit={{.ShortCommit}}
- -s -w -X main.Date={{.CommitDate}}
nfpms:
- file_name_template: '{{ .ProjectName }}_{{ .Arch }}'

View File

@@ -1 +1 @@
{".":"0.3.3"}
{".":"0.3.2"}

View File

@@ -1,22 +1,5 @@
# Changelog
## [0.3.3](https://github.com/k8sgpt-ai/k8sgpt/compare/v0.3.2...v0.3.3) (2023-05-20)
### Features
* caching ([#439](https://github.com/k8sgpt-ai/k8sgpt/issues/439)) ([948dae5](https://github.com/k8sgpt-ai/k8sgpt/commit/948dae5e288ec3bb0165eb3ce32171b12003f9c7))
* rework auth commands ([#438](https://github.com/k8sgpt-ai/k8sgpt/issues/438)) ([c659a87](https://github.com/k8sgpt-ai/k8sgpt/commit/c659a875fc296849a3703bfd7f0c4796f44bdf5a))
### Bug Fixes
* append coreAnalyzer if active_filter is empty and integration is added ([#441](https://github.com/k8sgpt-ai/k8sgpt/issues/441)) ([b7dc384](https://github.com/k8sgpt-ai/k8sgpt/commit/b7dc3845476759bedb3a55f77c8779e4a9f460dd))
* **deps:** update kubernetes packages to v0.27.2 ([#436](https://github.com/k8sgpt-ai/k8sgpt/issues/436)) ([d13b913](https://github.com/k8sgpt-ai/k8sgpt/commit/d13b91301cab5e05349b68716cd506fa1705f36f))
* **deps:** update module github.com/aws/aws-sdk-go to v1.44.265 ([#445](https://github.com/k8sgpt-ai/k8sgpt/issues/445)) ([c588e96](https://github.com/k8sgpt-ai/k8sgpt/commit/c588e963de3f238f07200d6cf09fe6f9781484f5))
* docker version ([#444](https://github.com/k8sgpt-ai/k8sgpt/issues/444)) ([1f767eb](https://github.com/k8sgpt-ai/k8sgpt/commit/1f767ebd2e31e61decab36218b1b85f2b3b6207d))
* use coreAnalyzer if there are no filters selected and no active_filters ([#432](https://github.com/k8sgpt-ai/k8sgpt/issues/432)) ([f0d3f36](https://github.com/k8sgpt-ai/k8sgpt/commit/f0d3f36f6d56bd76248590c0b841dffb7769a2ee))
## [0.3.2](https://github.com/k8sgpt-ai/k8sgpt/compare/v0.3.1...v0.3.2) (2023-05-16)

View File

@@ -54,7 +54,7 @@ all: tidy add-copyright lint cover build
build:
@echo "$(shell go version)"
@echo "===========> Building binary $(BUILDAPP) *[Git Info]: $(VERSION)-$(GIT_COMMIT)"
@export CGO_ENABLED=0 && go build -o $(BUILDAPP) -ldflags "-s -w -X main.version=dev -X main.commit=$$(git rev-parse --short HEAD) -X main.date=$$(date +%FT%TZ)" $(BUILDFILE)
@export CGO_ENABLED=0 && go build -o $(BUILDAPP) -ldflags '-s -w' $(BUILDFILE)
## tidy: tidy go.mod
.PHONY: tidy

View File

@@ -34,7 +34,7 @@ brew install k8sgpt
**32 bit:**
<!---x-release-please-start-version-->
```
curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.3.3/k8sgpt_386.rpm
curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.3.2/k8sgpt_386.rpm
sudo rpm -ivh k8sgpt_386.rpm
```
<!---x-release-please-end-->
@@ -43,7 +43,7 @@ brew install k8sgpt
<!---x-release-please-start-version-->
```
curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.3.3/k8sgpt_amd64.rpm
curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.3.2/k8sgpt_amd64.rpm
sudo rpm -ivh -i k8sgpt_amd64.rpm
```
<!---x-release-please-end-->
@@ -55,7 +55,7 @@ brew install k8sgpt
**32 bit:**
<!---x-release-please-start-version-->
```
curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.3.3/k8sgpt_386.deb
curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.3.2/k8sgpt_386.deb
sudo dpkg -i k8sgpt_386.deb
```
<!---x-release-please-end-->
@@ -63,7 +63,7 @@ brew install k8sgpt
<!---x-release-please-start-version-->
```
curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.3.3/k8sgpt_amd64.deb
curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.3.2/k8sgpt_amd64.deb
sudo dpkg -i k8sgpt_amd64.deb
```
<!---x-release-please-end-->
@@ -76,14 +76,14 @@ brew install k8sgpt
**32 bit:**
<!---x-release-please-start-version-->
```
curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.3.3/k8sgpt_386.apk
curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.3.2/k8sgpt_386.apk
apk add k8sgpt_386.apk
```
<!---x-release-please-end-->
**64 bit:**
<!---x-release-please-start-version-->
```
curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.3.3/k8sgpt_amd64.apk
curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.3.2/k8sgpt_amd64.apk
apk add k8sgpt_amd64.apk
```
<!---x-release-please-end-->x

View File

@@ -34,9 +34,7 @@ var (
cfgFile string
kubecontext string
kubeconfig string
Version string
Commit string
Date string
version string
)
// rootCmd represents the base command when called without any subcommands
@@ -51,10 +49,8 @@ var rootCmd = &cobra.Command{
// Execute adds all child commands to the root command and sets flags appropriately.
// This is called by main.main(). It only needs to happen once to the rootCmd.
func Execute(v string, c string, d string) {
Version = v
Commit = c
Date = d
func Execute(v string) {
version = v
err := rootCmd.Execute()
if err != nil {
os.Exit(1)

View File

@@ -14,9 +14,6 @@ limitations under the License.
package cmd
import (
"fmt"
"runtime/debug"
"github.com/spf13/cobra"
)
@@ -26,21 +23,7 @@ var versionCmd = &cobra.Command{
Short: "Print the version number of k8sgpt",
Long: `All software has versions. This is k8sgpt's`,
Run: func(cmd *cobra.Command, args []string) {
if Version == "dev" {
details, ok := debug.ReadBuildInfo()
if ok && details.Main.Version != "" && details.Main.Version != "(devel)" {
Version = details.Main.Version
for _, i := range details.Settings {
if i.Key == "vcs.time" {
Date = i.Value
}
if i.Key == "vcs.revision" {
Commit = i.Value
}
}
}
}
fmt.Printf("ks8gpt: %s (%s), built at: %s\n", Version, Commit, Date)
cmd.Printf("k8sgpt version %s\n", version)
},
}

View File

@@ -12,9 +12,7 @@
FROM golang:1.20.4-alpine3.16 AS builder
ENV CGO_ENABLED=0
ARG VERSION
ARG COMMIT
ARG DATE
WORKDIR /workspace
COPY go.mod go.sum ./
@@ -22,7 +20,7 @@ RUN go mod download
COPY ./ ./
RUN go build -o /workspace/k8sgpt -ldflags "-X main.version=${VERSION} -X main.commit=${COMMIT} -X main.date=${DATE}" ./
RUN go build -o /workspace/k8sgpt ./
FROM gcr.io/distroless/static AS production

View File

@@ -15,12 +15,8 @@ package main
import "github.com/k8sgpt-ai/k8sgpt/cmd"
var (
version = "dev"
commit = "HEAD"
date = "unknown"
)
var version = "dev"
func main() {
cmd.Execute(version, commit, date)
cmd.Execute(version)
}