Skip to content

Commit

Permalink
Remove k8s-workload-registrar (spiffe#3853)
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Harding <[email protected]>
  • Loading branch information
azdagron authored Feb 13, 2023
1 parent 5403149 commit 1c7f065
Show file tree
Hide file tree
Showing 88 changed files with 17 additions and 8,680 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/scripts/load-oci-archives.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ command -v docker >/dev/null 2>&1 || { usage; echo -e "\n * The docker cli is re
# linux/arm64/v7
PLATFORM="${PLATFORM:-local}"
OCI_IMAGES=(
spire-server spire-agent k8s-workload-registrar oidc-discovery-provider
spire-server spire-agent oidc-discovery-provider
)

echo "Importing ${OCI_IMAGES[*]} into docker".
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@ svid.*.pem
# within the respective main packages.
/spire-server
/spire-agent
/k8s-workload-registrar
/oidc-discovery-provider
cmd/spire-server/spire-server
cmd/spire-agent/spire-agent
support/k8s/k8s-workload-registrar/k8s-workload-registrar
support/oidc-discovery-provider/oidc-discovery-provider
tools/spire-plugingen/spire-plugingen

Expand Down
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ run:

skip-files:
- ".*\\.pb\\.go"
- support/k8s/k8s-workload-registrar/mode-crd/api/spiffeid/v1beta1/spiffeid_types.go

linters:
enable:
Expand Down
6 changes: 0 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,6 @@ ENTRYPOINT ["/opt/spire/bin/spire-agent", "run"]
COPY --link --from=builder /spireagentroot /
COPY --link --from=builder /spire/bin/static/spire-agent bin/

# K8S Workload Registrar
FROM spire-base AS k8s-workload-registrar
USER ${spireuid}:${spiregid}
ENTRYPOINT ["/opt/spire/bin/k8s-workload-registrar"]
COPY --link --from=builder /spire/bin/static/k8s-workload-registrar bin/

# OIDC Discovery Provider
FROM spire-base AS oidc-discovery-provider
USER ${spireuid}:${spiregid}
Expand Down
5 changes: 0 additions & 5 deletions Dockerfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ FROM spire-base-windows AS spire-agent-windows
ENTRYPOINT ["c:/spire/bin/spire-agent.exe", "run"]
COPY ./bin/spire-agent.exe C:/spire/bin/spire-agent.exe

# K8S Workload Registrar
FROM spire-base-windows AS k8s-workload-registrar-windows
ENTRYPOINT ["c:/spire/bin/k8s-workload-registrar.exe"]
COPY ./bin/k8s-workload-registrar.exe C:/spire/bin/k8s-workload-registrar.exe

# OIDC Discovery Provider
FROM spire-base-windows AS oidc-discovery-provider-windows
ENTRYPOINT ["c:/spire/bin/oidc-discovery-provider.exe"]
Expand Down
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,11 @@ help:
@echo " $(cyan)images$(reset) - build all SPIRE Docker images"
@echo " $(cyan)spire-server-image$(reset) - build SPIRE server Docker image"
@echo " $(cyan)spire-agent-image$(reset) - build SPIRE agent Docker image"
@echo " $(cyan)k8s-workload-registrar-image$(reset) - build Kubernetes Workload Registrar Docker image"
@echo " $(cyan)oidc-discovery-provider-image$(reset) - build OIDC Discovery Provider Docker image"
@echo "$(bold)Windows docker image:$(reset)"
@echo " $(cyan)images-windows$(reset) - build all SPIRE Docker images for windows"
@echo " $(cyan)spire-server-image-windows$(reset) - build SPIRE server Docker image for windows"
@echo " $(cyan)spire-agent-image-windows$(reset) - build SPIRE agent Docker image for windows"
@echo " $(cyan)k8s-workload-registrar-image-windows$(reset) - build Kubernetes Workload Registrar Docker image for windows"
@echo " $(cyan)oidc-discovery-provider-image-windows$(reset) - build OIDC Discovery Provider Docker image for windows"
@echo "$(bold)Developer support:$(reset)"
@echo " $(cyan)dev-image$(reset) - build the development Docker image"
Expand Down Expand Up @@ -107,7 +105,7 @@ endif

PLATFORMS ?= linux/amd64,linux/arm64

binaries := spire-server spire-agent oidc-discovery-provider k8s-workload-registrar
binaries := spire-server spire-agent oidc-discovery-provider

build_dir := $(DIR)/.build/$(os1)-$(arch1)

Expand Down Expand Up @@ -348,7 +346,6 @@ images: $(addsuffix -image,$(binaries))

$(eval $(call image_rule,spire-server-image,spire-server,Dockerfile))
$(eval $(call image_rule,spire-agent-image,spire-agent,Dockerfile))
$(eval $(call image_rule,k8s-workload-registrar-image,k8s-workload-registrar,Dockerfile))
$(eval $(call image_rule,oidc-discovery-provider-image,oidc-discovery-provider,Dockerfile))

load-images:
Expand All @@ -375,7 +372,6 @@ images-windows: $(addsuffix -windows-image,$(binaries))

$(eval $(call windows_image_rule,spire-server-windows-image,spire-server-windows,Dockerfile.windows))
$(eval $(call windows_image_rule,spire-agent-windows-image,spire-agent-windows,Dockerfile.windows))
$(eval $(call windows_image_rule,k8s-workload-registrar-windows-image,k8s-workload-registrar-windows,Dockerfile.windows))
$(eval $(call windows_image_rule,oidc-discovery-provider-windows-image,oidc-discovery-provider-windows,Dockerfile.windows))

#############################################################################
Expand Down
10 changes: 3 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@ require (
github.com/cenkalti/backoff/v3 v3.2.2
github.com/docker/docker v23.0.1+incompatible
github.com/envoyproxy/go-control-plane v0.11.0
github.com/go-logr/logr v1.2.3
github.com/go-sql-driver/mysql v1.7.0
github.com/gofrs/uuid v4.4.0+incompatible
github.com/golang-jwt/jwt/v4 v4.4.3
github.com/golang/mock v1.6.0
github.com/golang/protobuf v1.5.2
github.com/google/go-cmp v0.5.9
github.com/google/go-containerregistry v0.13.0
Expand Down Expand Up @@ -81,7 +79,6 @@ require (
k8s.io/apimachinery v0.26.1
k8s.io/client-go v0.26.1
k8s.io/kube-aggregator v0.26.1
k8s.io/utils v0.0.0-20221128185143-99ec85e7a448
sigs.k8s.io/controller-runtime v0.14.4
)

Expand Down Expand Up @@ -170,8 +167,8 @@ require (
github.com/ghodss/yaml v1.0.0 // indirect
github.com/go-chi/chi v4.1.2+incompatible // indirect
github.com/go-jose/go-jose/v3 v3.0.0 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-logr/zapr v1.2.3 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-openapi/analysis v0.21.4 // indirect
github.com/go-openapi/errors v0.20.3 // indirect
Expand All @@ -191,6 +188,7 @@ require (
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/golang/glog v1.0.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/mock v1.6.0 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/btree v1.1.2 // indirect
github.com/google/certificate-transparency-go v1.1.3 // indirect
Expand Down Expand Up @@ -338,18 +336,16 @@ require (
golang.org/x/text v0.7.0 // indirect
golang.org/x/tools v0.5.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
gopkg.in/cheggaaa/pb.v1 v1.0.28 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.26.1 // indirect
k8s.io/component-base v0.26.1 // indirect
k8s.io/klog/v2 v2.80.1 // indirect
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect
k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 // indirect
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
sigs.k8s.io/release-utils v0.7.3 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
Expand Down
7 changes: 0 additions & 7 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,6 @@ github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0+
github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5 h1:Yzb9+7DPaBjB8zlTR87/ElzFsnQfuHnVUVqpZZIcV5Y=
github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0=
github.com/etcd-io/gofail v0.0.0-20190801230047-ad7f989257ca/go.mod h1:49H/RkXP8pKaZy4h0d+NW16rSLhyVBt4o6VLJbmOqDE=
github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ=
github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84=
github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww=
Expand Down Expand Up @@ -902,7 +901,6 @@ github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbV
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A=
github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4=
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
github.com/go-openapi/analysis v0.21.2/go.mod h1:HZwRk4RRisyG8vx2Oe6aqeSQcoxRp47Xkp3+K6q+LdY=
Expand Down Expand Up @@ -2048,7 +2046,6 @@ go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ=
go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI=
go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw=
go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60=
go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg=
Expand Down Expand Up @@ -2523,7 +2520,6 @@ golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNq
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk=
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8=
gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY=
gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY=
google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
google.golang.org/api v0.5.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
Expand Down Expand Up @@ -2863,13 +2859,10 @@ honnef.co/go/tools v0.0.1-2020.1.5/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9
k8s.io/api v0.26.1 h1:f+SWYiPd/GsiWwVRz+NbFyCgvv75Pk9NK6dlkZgpCRQ=
k8s.io/api v0.26.1/go.mod h1:xd/GBNgR0f707+ATNyPmQ1oyKSgndzXij81FzWGsejg=
k8s.io/apiextensions-apiserver v0.26.1 h1:cB8h1SRk6e/+i3NOrQgSFij1B2S0Y0wDoNl66bn8RMI=
k8s.io/apiextensions-apiserver v0.26.1/go.mod h1:AptjOSXDGuE0JICx/Em15PaoO7buLwTs0dGleIHixSM=
k8s.io/apimachinery v0.26.1 h1:8EZ/eGJL+hY/MYCNwhmDzVqq2lPl3N3Bo8rvweJwXUQ=
k8s.io/apimachinery v0.26.1/go.mod h1:tnPmbONNJ7ByJNz9+n9kMjNP8ON+1qoAIIC70lztu74=
k8s.io/client-go v0.26.1 h1:87CXzYJnAMGaa/IDDfRdhTzxk/wzGZ+/HUQpqgVSZXU=
k8s.io/client-go v0.26.1/go.mod h1:IWNSglg+rQ3OcvDkhY6+QLeasV4OYHDjdqeWkDQZwGE=
k8s.io/component-base v0.26.1 h1:4ahudpeQXHZL5kko+iDHqLj/FSGAEUnSVO0EBbgDd+4=
k8s.io/component-base v0.26.1/go.mod h1:VHrLR0b58oC035w6YQiBSbtsf0ThuSwXP+p5dD/kAWU=
k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4=
k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
k8s.io/kube-aggregator v0.26.1 h1:TqDWwuaUJpyhWGWw4JrXR8ZAAaHa9qrsXxR41aR3igw=
Expand Down
3 changes: 0 additions & 3 deletions release/posix/spire-extras/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# SPIRE Extras

- [SPIRE Kubernetes Workload Registrar](https://github.com/spiffe/spire/blob/main/support/k8s/k8s-workload-registrar/README.md)
- [SPIRE OIDC Discovery Provider](https://github.com/spiffe/spire/blob/main/support/oidc-discovery-provider/README.md)

The configuration files included in this release are intended for evaluation
Expand All @@ -10,7 +9,5 @@ purposes only and are **NOT** production ready.

| Path | Description |
|-------------------------------------------------------------|----------------------------------------------------------|
| `bin/k8s-workload-registrar` | SPIRE Kubernetes Workload Registrar executable |
| `bin/oidc-discovery-provider` | SPIRE OIDC Discovery Provider executable |
| `conf/k8s-workload-registrar/k8s-workload-registrar.conf` | Sample SPIRE Kubernetes Workload Registrar configuration |
| `conf/oidc-discovery-provider/oidc-discovery-provider.conf` | Sample SPIRE OIDC Discovery Provider configuration |
4 changes: 0 additions & 4 deletions script/build-artifact.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ cp "${REPODIR}"/LICENSE "${EXTRAS_STAGING}"
mkdir -p "${STAGING}"/bin "${EXTRAS_STAGING}"/bin
cp "${BINDIR}"/spire-server${BINARY_EXTENSION} "${STAGING}"/bin
cp "${BINDIR}"/spire-agent${BINARY_EXTENSION} "${STAGING}"/bin
# Exclude registrar from windows artifact
if [ $OS != "windows" ]; then
cp "${BINDIR}"/k8s-workload-registrar${BINARY_EXTENSION} "${EXTRAS_STAGING}"/bin
fi
cp "${BINDIR}"/oidc-discovery-provider${BINARY_EXTENSION} "${EXTRAS_STAGING}"/bin

mkdir -p "${OUTDIR}"
Expand Down
Loading

0 comments on commit 1c7f065

Please sign in to comment.