Skip to content

Commit 3676680

Browse files
committed
chore: rename to ezdeploy
1 parent 6df83f9 commit 3676680

25 files changed

+146
-132
lines changed

.vscode/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"cSpell.words": [
3+
"ezdeploy",
4+
"jsonnet",
5+
"kubeconfig"
6+
]
7+
}

CODE_OF_CONDUCT.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
1717
Examples of behavior that contributes to a positive environment for our
1818
community include:
1919

20-
* Demonstrating empathy and kindness toward other people
21-
* Being respectful of differing opinions, viewpoints, and experiences
22-
* Giving and gracefully accepting constructive feedback
23-
* Accepting responsibility and apologizing to those affected by our mistakes,
20+
- Demonstrating empathy and kindness toward other people
21+
- Being respectful of differing opinions, viewpoints, and experiences
22+
- Giving and gracefully accepting constructive feedback
23+
- Accepting responsibility and apologizing to those affected by our mistakes,
2424
and learning from the experience
25-
* Focusing on what is best not just for us as individuals, but for the
25+
- Focusing on what is best not just for us as individuals, but for the
2626
overall community
2727

2828
Examples of unacceptable behavior include:
2929

30-
* The use of sexualized language or imagery, and sexual attention or
30+
- The use of sexualized language or imagery, and sexual attention or
3131
advances of any kind
32-
* Trolling, insulting or derogatory comments, and personal or political attacks
33-
* Public or private harassment
34-
* Publishing others' private information, such as a physical or email
32+
- Trolling, insulting or derogatory comments, and personal or political attacks
33+
- Public or private harassment
34+
- Publishing others' private information, such as a physical or email
3535
address, without their explicit permission
36-
* Other conduct which could reasonably be considered inappropriate in a
36+
- Other conduct which could reasonably be considered inappropriate in a
3737
professional setting
3838

3939
## Enforcement Responsibilities
@@ -60,7 +60,7 @@ representative at an online or offline event.
6060

6161
Instances of abusive, harassing, or otherwise unacceptable behavior may be
6262
reported to the community leaders responsible for enforcement at
63-
hi@guoyk.xyz.
63+
hi@yankeguo.com.
6464
All complaints will be reviewed and investigated promptly and fairly.
6565

6666
All community leaders are obligated to respect the privacy and security of the
@@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban.
106106
### 4. Permanent Ban
107107

108108
**Community Impact**: Demonstrating a pattern of violation of community
109-
standards, including sustained inappropriate behavior, harassment of an
109+
standards, including sustained inappropriate behavior, harassment of an
110110
individual, or aggression toward or disparagement of classes of individuals.
111111

112112
**Consequence**: A permanent ban from any sort of public interaction within

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM golang:1.22 AS builder
22
ENV CGO_ENABLED 0
33
WORKDIR /go/src/app
44
ADD . .
5-
RUN go build -o /ezops ./cmd/ezops
5+
RUN go build -o /ezdeploy ./cmd/ezdeploy
66

77
FROM alpine:3.19
88

@@ -15,8 +15,8 @@ RUN apk add --no-cache ca-certificates tzdata curl && \
1515
mv helm/helm /usr/local/bin/helm && \
1616
rm -rf helm.tar.gz helm
1717

18-
COPY --from=builder /ezops /usr/local/bin/ezops
18+
COPY --from=builder /ezdeploy /usr/local/bin/ezdeploy
1919

20-
ENTRYPOINT ["ezops"]
20+
ENTRYPOINT ["ezdeploy"]
2121

2222
WORKDIR /data

README.md

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
1-
# ezops
1+
# ezdeploy
22

3-
[![Go Reference](https://pkg.go.dev/badge/github.com/yankeguo/ezops.svg)](https://pkg.go.dev/github.com/yankeguo/ezops)
4-
5-
A simple GitOps tool, based on one-off run, easy to integrate with existing CI/CD routine
3+
A simple tool to deploy various Kubernetes resources
64

75
NO DAEMON, NO SERVICE, JUST ONE-OFF EXECUTION
86

9-
## 中文使用说明
10-
11-
[ezops - 简易 GitOps 工具](https://mp.weixin.qq.com/s/TI2ZozyA5xWltTEwIF46ag)
12-
137
## Features
148

159
- Support `yaml`, `json`, `jsonnet` and `Helm`
@@ -22,20 +16,20 @@ You can either build binary from source, or just download pre-built binary.
2216
- Build from source
2317

2418
```shell
25-
git clone https://github.com/yankeguo/ezops.git
26-
cd ezops
27-
go build -o ezops ./cmd/ezops
19+
git clone https://github.com/yankeguo/ezdeploy.git
20+
cd ezdeploy
21+
go build -o ezdeploy ./cmd/ezdeploy
2822
```
2923

3024
- Download pre-built binaries
3125

32-
View <https://github.com/yankeguo/ezops/releases>
26+
View <https://github.com/yankeguo/ezdeploy/releases>
3327

3428
## Usage
3529

3630
1. Ensure `kubectl` and `helm` are available in `$PATH`
3731
2. Prepare a **manifests directory**, see below
38-
3. Run `ezops`
32+
3. Run `ezdeploy`
3933

4034
## Options
4135

@@ -79,10 +73,10 @@ kube-system/
7973
main.ingress-nginx.helm.yaml
8074
```
8175

82-
`ezops` will create or update a **release** named `main`, using **chart** `_helm/ingress-nginx`, and **values file**
76+
`ezdeploy` will create or update a **release** named `main`, using **chart** `_helm/ingress-nginx`, and **values file**
8377
`kube-system/primary.ingress-nginx.helm.yaml`
8478

85-
`ezops` also support `Helm` values file in `JSONNet`
79+
`ezdeploy` also support values file in `jsonnet`
8680

8781
## Credits
8882

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88

99
## Reporting a Vulnerability
1010

11-
Send an encrypted mail to hi@guoyk.xyz, with [this GPG public key](https://guoyk.xyz/gpg/133641b2.asc.txt)
11+
Send an encrypted mail to hi@yankeguo.com, with [this GPG public key](https://keys.openpgp.org/search?q=hi%40yankeguo.com)

checksum.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package ezops
1+
package ezdeploy
22

33
import (
44
"crypto/md5"

checksum_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package ezops
1+
package ezdeploy
22

33
import (
44
"crypto/md5"

client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package ezops
1+
package ezdeploy
22

33
import (
44
"encoding/base64"
@@ -81,7 +81,7 @@ func ResolveKubernetesClient(optKubeconfig string) (source KubernetesClientSourc
8181
if buf, err = base64.StdEncoding.DecodeString(envKubeconfigBase64); err != nil {
8282
return
8383
}
84-
if source.TemporaryDir, err = os.MkdirTemp("", "ezops-kubeconfig-*"); err != nil {
84+
if source.TemporaryDir, err = os.MkdirTemp("", "ezdeploy-kubeconfig-*"); err != nil {
8585
return
8686
}
8787
source.KubeconfigPath = filepath.Join(source.TemporaryDir, "kubeconfig")

client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package ezops
1+
package ezdeploy
22

33
import (
44
"encoding/base64"

cmd/ezops/main.go renamed to cmd/ezdeploy/main.go

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ import (
1010
"os/exec"
1111
"strings"
1212

13-
"github.com/yankeguo/ezops"
14-
"github.com/yankeguo/ezops/pkg/ezkv"
15-
"github.com/yankeguo/ezops/pkg/ezlog"
16-
"github.com/yankeguo/ezops/pkg/ezsync"
17-
"github.com/yankeguo/ezops/pkg/eztmp"
13+
"github.com/yankeguo/ezdeploy"
14+
"github.com/yankeguo/ezdeploy/pkg/ezkv"
15+
"github.com/yankeguo/ezdeploy/pkg/ezlog"
16+
"github.com/yankeguo/ezdeploy/pkg/ezsync"
17+
"github.com/yankeguo/ezdeploy/pkg/eztmp"
1818
"github.com/yankeguo/rg"
1919
)
2020

@@ -23,7 +23,7 @@ type syncNamespaceOptions struct {
2323
Kubeconfig string
2424
Root string
2525
Namespace string
26-
Charts map[string]ezops.Chart
26+
Charts map[string]ezdeploy.Chart
2727
DryRun bool
2828
}
2929

@@ -33,7 +33,7 @@ func syncNamespace(ctx context.Context, opts syncNamespaceOptions) (err error) {
3333
title := "[" + opts.Namespace + "]"
3434
log.Println(title, "scanning")
3535

36-
res := rg.Must(ezops.Load(opts.Root, opts.Namespace, ezops.LoadOptions{Charts: opts.Charts}))
36+
res := rg.Must(ezdeploy.Load(opts.Root, opts.Namespace, ezdeploy.LoadOptions{Charts: opts.Charts}))
3737

3838
rg.Must0(syncResources(ctx, syncResourcesOptions{
3939
DB: opts.DB,
@@ -69,7 +69,7 @@ func syncNamespace(ctx context.Context, opts syncNamespaceOptions) (err error) {
6969

7070
type syncResourcesOptions struct {
7171
DB *ezkv.Database
72-
Resources []ezops.Resource
72+
Resources []ezdeploy.Resource
7373
Title string
7474
Namespace string
7575
Kubeconfig string
@@ -79,7 +79,7 @@ type syncResourcesOptions struct {
7979
func syncResources(ctx context.Context, opts syncResourcesOptions) (err error) {
8080
defer rg.Guard(&err)
8181

82-
var resources []ezops.Resource
82+
var resources []ezdeploy.Resource
8383

8484
for _, res := range opts.Resources {
8585
if opts.DB.Get(res.ID) == res.Checksum {
@@ -97,7 +97,7 @@ func syncResources(ctx context.Context, opts syncResourcesOptions) (err error) {
9797
raws = append(raws, res.Raw)
9898
}
9999

100-
buf := rg.Must(json.Marshal(ezops.NewList(raws)))
100+
buf := rg.Must(json.Marshal(ezdeploy.NewList(raws)))
101101

102102
args := []string{"apply", "-f", "-"}
103103

@@ -136,7 +136,7 @@ func syncResources(ctx context.Context, opts syncResourcesOptions) (err error) {
136136

137137
type syncReleaseOptions struct {
138138
DB *ezkv.Database
139-
Release ezops.Release
139+
Release ezdeploy.Release
140140
Title string
141141
Namespace string
142142
Kubeconfig string
@@ -153,8 +153,8 @@ func syncRelease(ctx context.Context, opts syncReleaseOptions) (err error) {
153153
valuesFile := opts.Release.ValuesFile
154154

155155
// convert jsonnet file to yaml file
156-
if strings.HasSuffix(opts.Release.ValuesFile, ezops.SuffixHelmValuesJSONNet) {
157-
if valuesFile, err = ezops.ConvertJSONNetFileToYAML(valuesFile, opts.Namespace); err != nil {
156+
if strings.HasSuffix(opts.Release.ValuesFile, ezdeploy.SuffixHelmValuesJSONNet) {
157+
if valuesFile, err = ezdeploy.ConvertJSONNetFileToYAML(valuesFile, opts.Namespace); err != nil {
158158
return
159159
}
160160
}
@@ -218,7 +218,7 @@ func main() {
218218
ctx := context.Background()
219219

220220
// kubernetes client source
221-
cs := rg.Must(ezops.ResolveKubernetesClient(optKubeconfig))
221+
cs := rg.Must(ezdeploy.ResolveKubernetesClient(optKubeconfig))
222222
defer cs.CleanUp()
223223

224224
if cs.InCluster {
@@ -234,14 +234,14 @@ func main() {
234234
db := rg.Must(ezkv.Open(ctx, ezkv.Options{
235235
Client: client,
236236
Namespace: "default",
237-
Name: "ezopsdb",
237+
Name: "ezdeploydb",
238238
}))
239239
defer func() {
240240
_ = db.Save(ctx)
241241
}()
242242

243243
// scan
244-
result := rg.Must(ezops.Scan("."))
244+
result := rg.Must(ezdeploy.Scan("."))
245245

246246
// sync namespaces
247247
err = ezsync.DoPara(ctx, result.Namespaces, 5, func(ctx context.Context, namespace string) (err error) {

collect_helm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package ezops
1+
package ezdeploy
22

33
import (
44
"errors"

collect_resource.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package ezops
1+
package ezdeploy
22

33
import (
44
"bytes"

dist.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ cd "$(dirname "${0}")"
66

77
rm -rf dist && mkdir dist
88

9-
EXECUTABLE_NAME="ezops"
9+
EXECUTABLE_NAME="ezdeploy"
1010

1111
build() {
1212
rm -rf build && mkdir build

go.mod

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,34 @@
1-
module github.com/yankeguo/ezops
1+
module github.com/yankeguo/ezdeploy
22

3-
go 1.21
3+
go 1.22.0
4+
5+
toolchain go1.22.4
46

57
retract v1.0.0
68

79
require (
810
github.com/google/go-jsonnet v0.20.0
911
github.com/karrick/godirwalk v1.17.0
1012
github.com/stretchr/testify v1.9.0
11-
github.com/yankeguo/rg v1.1.0
13+
github.com/yankeguo/rg v1.3.0
1214
gopkg.in/yaml.v3 v3.0.1
13-
k8s.io/api v0.29.3
14-
k8s.io/apimachinery v0.29.3
15-
k8s.io/client-go v0.29.3
15+
k8s.io/api v0.31.0
16+
k8s.io/apimachinery v0.31.0
17+
k8s.io/client-go v0.31.0
1618
)
1719

1820
require (
19-
github.com/davecgh/go-spew v1.1.1 // indirect
20-
github.com/emicklei/go-restful/v3 v3.12.0 // indirect
21-
github.com/go-logr/logr v1.4.1 // indirect
21+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
22+
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
23+
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
24+
github.com/go-logr/logr v1.4.2 // indirect
2225
github.com/go-openapi/jsonpointer v0.21.0 // indirect
2326
github.com/go-openapi/jsonreference v0.21.0 // indirect
2427
github.com/go-openapi/swag v0.23.0 // indirect
2528
github.com/gogo/protobuf v1.3.2 // indirect
2629
github.com/golang/protobuf v1.5.4 // indirect
2730
github.com/google/gnostic-models v0.6.8 // indirect
31+
github.com/google/go-cmp v0.6.0 // indirect
2832
github.com/google/gofuzz v1.2.0 // indirect
2933
github.com/google/uuid v1.6.0 // indirect
3034
github.com/imdario/mergo v0.3.16 // indirect
@@ -34,20 +38,21 @@ require (
3438
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
3539
github.com/modern-go/reflect2 v1.0.2 // indirect
3640
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
37-
github.com/pmezard/go-difflib v1.0.0 // indirect
41+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
3842
github.com/spf13/pflag v1.0.5 // indirect
39-
golang.org/x/net v0.24.0 // indirect
40-
golang.org/x/oauth2 v0.19.0 // indirect
41-
golang.org/x/sys v0.19.0 // indirect
42-
golang.org/x/term v0.19.0 // indirect
43-
golang.org/x/text v0.14.0 // indirect
44-
golang.org/x/time v0.5.0 // indirect
45-
google.golang.org/protobuf v1.33.0 // indirect
43+
github.com/x448/float16 v0.8.4 // indirect
44+
golang.org/x/net v0.28.0 // indirect
45+
golang.org/x/oauth2 v0.22.0 // indirect
46+
golang.org/x/sys v0.24.0 // indirect
47+
golang.org/x/term v0.23.0 // indirect
48+
golang.org/x/text v0.17.0 // indirect
49+
golang.org/x/time v0.6.0 // indirect
50+
google.golang.org/protobuf v1.34.2 // indirect
4651
gopkg.in/inf.v0 v0.9.1 // indirect
4752
gopkg.in/yaml.v2 v2.4.0 // indirect
48-
k8s.io/klog/v2 v2.120.1 // indirect
49-
k8s.io/kube-openapi v0.0.0-20240403164606-bc84c2ddaf99 // indirect
50-
k8s.io/utils v0.0.0-20240310230437-4693a0247e57 // indirect
53+
k8s.io/klog/v2 v2.130.1 // indirect
54+
k8s.io/kube-openapi v0.0.0-20240812233141-91dab695df6f // indirect
55+
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect
5156
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
5257
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
5358
sigs.k8s.io/yaml v1.4.0 // indirect

0 commit comments

Comments
 (0)