Skip to content
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.

Commit

Permalink
Merge pull request #12 from utilitywarehouse/release-0.7.2
Browse files Browse the repository at this point in the history
Release v0.7.2
  • Loading branch information
ribbybibby authored Jul 5, 2021
2 parents 1bda819 + f688219 commit 9d20c6e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
PACKAGE = github.com/utilitywarehouse/k8s-sidecar-injector
BINARY = k8s-sidecar-injector
IMAGE = quay.io/utilitywarehouse/k8s-sidecar-injector
DATE ?= $(shell date +%FT%T%z)
BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
COMMIT ?= $(shell git rev-parse HEAD)
VERSION ?= $(shell git describe --tags --always --dirty --match=v* 2> /dev/null || \
cat $(CURDIR)/.version 2> /dev/null || echo v0)

BIN = $(GOPATH)/bin
PKGS = $(or $(PKG),$(shell $(GO) list ./...))
TESTPKGS = $(shell env $(GO) list -f '{{ if or .TestGoFiles .XTestGoFiles }}{{ .ImportPath }}{{ end }}' $(PKGS))
Expand Down Expand Up @@ -117,3 +119,11 @@ help:
.PHONY: version
version:
@echo $(VERSION)

release:
@sd "$(IMAGE):latest" "$(IMAGE):$(VERSION)" $$(rg -l -- $(IMAGE) manifests/)
@git add -- manifests/
@git commit -m "Release $(VERSION)"
@sd "$(IMAGE):$(VERSION)" "$(IMAGE):latest" $$(rg -l -- "$(IMAGE)" manifests/)
@git add -- manifests/
@git commit -m "Clean up release $(VERSION)"
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ endpoints | | load
+----------------+
```


# Run

The image is built and published on [Quay](https://quay.io/repository/utilitywarehouse/k8s-sidecar-injector). See [the example](/manifests/example) for how to run this in Kubernetes.
Expand All @@ -58,12 +57,22 @@ The image is built and published on [Quay](https://quay.io/repository/utilitywar
$ ./bin/k8s-sidecar-injector --tls-port=9000 --config-directory=conf/ --tls-cert-file="${TLS_CERT_FILE}" --tls-key-file="${TLS_KEY_FILE}"
```

*NOTE*: this is not a supported method of running in production. You are highly encouraged to deploy this to Kubernetes in [The Supported Way](/manifests/example).
_NOTE_: this is not a supported method of running in production. You are highly encouraged to deploy this to Kubernetes in [The Supported Way](/manifests/example).

# Hacking

See [hacking.md](/docs/hacking.md)

# Updating

Run `make release VERSION=<version>` to create a new release.
This will create a commit which updates the image in the deployment manifests
and another which reverts the image tag to 'latest'. Tag the former commit
with the release version.

This ensures that the release tag points to manifests that include the
corresponding image version but the `master` branch gives you the `latest` tag.

# License

[Apache 2.0](/LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion manifests/base/k8s-sidecar-injector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ spec:
secretName: k8s-sidecar-injector-webhook-server-cert
containers:
- name: "k8s-sidecar-injector"
image: quay.io/utilitywarehouse/k8s-sidecar-injector:v0.7.1
image: quay.io/utilitywarehouse/k8s-sidecar-injector:latest
command: ["entrypoint.sh"]
args: []
ports:
Expand Down

0 comments on commit 9d20c6e

Please sign in to comment.