Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

mikube/depreq

Repository files navigation

πŸš€ depreq

Deploy Requester for GitOps.

Clone a manifest repository, update tags, commit the change, and create a pull request! (from CI context)

Handmade scripts are no longer needed.

Here is an automatically created pull request sample.

πŸ”± Supported Options

Template Engines

  • Yaml
    • Helm
    • Kustomize
    • Plain kubernetes manifest
  • Any
    • By regular expression

Git Repositories

  • GitHub

πŸ”œ Usage

Download a single binary from release page.

# CI on application repository
depreq \
 --git-user amaya382 \
 --git-email mail@sapphire.in.net \
 --git-token <your-git-token> \
 --git-token-user amaya382 \
 --manifest-uri 'https://github.com/gitops-demo/manifests.git' \
 --manifest-base-branch dev \
 --manifest-values-files app-a/values/dev-app-a.yaml:app-a/values/prd-app-a.yaml \
 --manifest-tag-keys 'image.repository' \
 --app-image gitopsdemo/app-a \
 --app-curr-commit <commit-hash-from-ci> \
 --github-user amaya382

And also you can use docker images.

How to update tags

By key

You can use a brief query. . for map, [*]. for array.

# --manifest-tag-keys 'image.repository'
image:
 repository: gitops-demo/app-a:1234567890abcdef
# --manifest-tag-keys 'tag'
image: gitops-demo/app-a
tag: 1234567890abcdef
# --manifest-tag-keys 'spec.template.spec.containers[*].image'
spec:
 template:
 spec:
 containers:
 - name: app-1
 image: gitops-demo/app-a:1234567890abcdef
 - name: app-2
 image: gitops-demo/app-a:1234567890abcdef

By regular expression

If you want to update tags by regular expression, use '--manifest-tag-pattern' instead of '--manifest-tag-keys'.

# --manifest-tag-pattern 'repository: gitops-demo/app-a:[\da-f]+$'
image:
 repository: gitops-demo/app-a:1234567890abcdef
# --manifest-tag-pattern 'tag: [\da-f]+$'
image: gitops-demo/app-a
tag: 1234567890abcdef
# --manifest-tag-pattern 'image: gitops-demo/app-a:[\da-f]+$'
spec:
 template:
 spec:
 containers:
 - name: app-1
 image: gitops-demo/app-a:1234567890abcdef
 - name: app-2
 image: gitops-demo/app-a:1234567890abcdef

πŸ“ Note

  • Now depreq uses a git commit hash as an image tag

About

πŸš€ A missing piece of GitOps, manifest updater

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /