Skip to content

Commit

Permalink
Remove examples (#253)
Browse files Browse the repository at this point in the history
The examples/ folder causes many false-positives on security scanners
and vulnerability detectors, which are disruptive to customer adoption.
  • Loading branch information
sethvargo authored Nov 29, 2023
1 parent dce0bb0 commit 857ad55
Show file tree
Hide file tree
Showing 71 changed files with 5 additions and 5,594 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,3 @@ build/
test/account.json
.env
.idea

examples/**/vendor/
examples/**/node_modules/
12 changes: 0 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,3 @@ test-acc:
-shuffle=on \
./...
.PHONY: test-acc

update-go-samples:
for p in $(shell find examples -name go.mod -type f); do \
dir=$$(dirname $${p}) ; \
rm -f $${dir}/go.mod $${dir}/go.sum ; \
(cd $${dir} && \
go mod init github.com/GoogleCloudPlatform/berglas/$${dir} && \
go get -u github.com/GoogleCloudPlatform/berglas@main && \
go get -u ./... && \
go mod tidy -go=1.21 -compat=1.21) ; \
done
.PHONY: update-go-samples
20 changes: 4 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,42 +302,35 @@ its child command, if one was provided.
Berglas resolves environment variables to their plaintext values using the
[`berglas://reference syntax][reference-syntax]. This integration works with
any language runtime because berglas serves as the entrypoint to the Docker
container. See [examples/appengineflex](examples/appengineflex) for examples
and invocations.
container.
- **App Engine (Standard)** - When invoked via [App Engine][app-engine],
Berglas resolves environment variables to their plaintext values using the
[`berglas://`reference syntax][reference-syntax]. This integration only works
with the Go language runtime because it requires importing the `auto/`
package. See [examples/appengine](examples/appengine) for examples
and invocations.
package.
- **Cloud Run** - When invoked via [Cloud Run][cloud-run], Berglas resolves
environment variables to their plaintext values using the [`berglas://`
reference syntax][reference-syntax]. This integration works with any language
runtime because berglas serves as the entrypoint to the Docker container. See
[examples/cloudrun](examples/cloudrun) for examples and invocations.
runtime because berglas serves as the entrypoint to the Docker container.
- **Cloud Functions** - When invoked via [Cloud Functions][cloud-functions],
Berglas resolves environment variables to their plaintext values using the
[`berglas://` reference syntax][reference-syntax]. This integration only works
with the Go language runtime because it requires importing the `auto/`
package. See [examples/cloudfunctions](examples/cloudfunctions) for examples
and invocations.
package.
- **Cloud Build** - When invoked via [Cloud Build][cloud-build], Berglas
resolves environment variables to plaintext values using the [`berglas://`
reference syntax][reference-syntax]. This integration only works with volume
mounts, so all Berglas secrets need to specify the `?destination` parameter.
See [examples/cloudbuild](examples/cloudbuild) for examples and invocations.
- **Kubernetes** - Kubernetes pods can consume Berglas secrets by installing a
[MutatingWebhook][k8s-mutating]. This webhook mutates incoming pods with the
[`berglas://` reference syntax][reference-syntax] in environment references to
resolve at runtime. This integration works with any container, but all pods
requesting berglas secrets must set an command in their Kubernetes manifests.
See [examples/kubernetes](examples/kubernetes) for samples and installation
instructions.
- **Anything** - Wrap any process with `berglas exec --` and Berglas will
parse any local environment variables with the [`berglas://` reference
Expand All @@ -354,11 +347,6 @@ library is structured JSON which integrates well with Cloud Logging (it can be
changed to any valid formatter and you can even inject your own logger).
## Examples
Examples are available in the [`examples/` folder](examples).
## Library Usage
Berglas is also a Go library that can be imported in Go projects:
Expand Down
25 changes: 0 additions & 25 deletions examples/appengine/go/.gcloudignore

This file was deleted.

1 change: 0 additions & 1 deletion examples/appengine/go/.gitignore

This file was deleted.

141 changes: 0 additions & 141 deletions examples/appengine/go/README.md

This file was deleted.

18 changes: 0 additions & 18 deletions examples/appengine/go/app.yaml

This file was deleted.

41 changes: 0 additions & 41 deletions examples/appengine/go/go.mod

This file was deleted.

Loading

0 comments on commit 857ad55

Please sign in to comment.