1
0
Fork 0
mirror of https://github.com/external-secrets/external-secrets.git synced 2024-12-14 11:57:59 +00:00

Merge pull request #1023 from Simspace/improve-docs

Update docs from v1alpha to v1beta1, fix typos
This commit is contained in:
paul-the-alien[bot] 2022-04-19 19:49:16 +00:00 committed by GitHub
commit 93d47712b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 978 additions and 267 deletions

View file

@ -192,11 +192,11 @@ helm.build: helm.generate ## Build helm chart
helm.generate:
# Split the generated bundle yaml file to inject control flags
@for i in $(BUNDLE_DIR)/*.yaml; do \
yq -Ns '"$(HELM_DIR)/templates/crds/" + .spec.names.singular' "$$i"; \
yq e -Ns '"$(HELM_DIR)/templates/crds/" + .spec.names.singular' "$$i"; \
done
# Add helm if statement for controlling the install of CRDs
@for i in $(HELM_DIR)/templates/crds/*.yml; do \
export CRDS_FLAG_NAME="create$$(yq '.spec.names.kind' $$i)"; \
export CRDS_FLAG_NAME="create$$(yq e '.spec.names.kind' $$i)"; \
cp "$$i" "$$i.bkp"; \
if [[ "$$CRDS_FLAG_NAME" == *"Cluster"* ]]; then \
echo "{{- if and (.Values.installCRDs) (.Values.crds.$$CRDS_FLAG_NAME) }}" > "$$i"; \

View file

@ -8,6 +8,8 @@ git clone https://github.com/external-secrets/external-secrets.git
cd external-secrets
```
_Note: many of the `make` commands use [yq](https://github.com/mikefarah/yq), version 4.2X.X or higher._
If you want to run controller tests you also need to install kubebuilder's `envtest`.
The recommended way to do so is to install [setup-envtest](https://pkg.go.dev/sigs.k8s.io/controller-runtime/tools/setup-envtest)
@ -110,18 +112,18 @@ documentation. See `/docs` for the source code and `/hack/api-docs` for the buil
When writing documentation it is advised to run the mkdocs server with livereload:
```shell
make serve-docs
make docs.serve
```
Run the following command to run a complete build. The rendered assets are available under `/site`.
```shell
make docs
make serve-docs
make docs.serve
```
Open `http://localhost:8000` in your browser.
Since mike uses a branch to create/update documentation, any docs operation will create a diff on your local `gh-pages` branch.
When finished writing/reviewing the docs, clean up your local docs branch changes with `git branch -D gh-pages`
When finished writing/reviewing the docs, clean up your local docs branch changes with `git branch -D gh-pages`

View file

@ -61,7 +61,7 @@ There's another suite of e2e tests that integrate with managed Kuberentes offeri
They create real infrastructure at a cloud provider and deploy the controller
into that environment.
This is necessary to test the authentication integration
([GCP Worklaod Identity](https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity),
([GCP Workload Identity](https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity),
[EKS IRSA](https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html)...).
These tests are time intensive (~20-45min) and must be triggered manually by

File diff suppressed because it is too large Load diff

View file

@ -19,7 +19,7 @@ import (
"encoding/base64"
"errors"
"fmt"
"io/ioutil"
"io"
"os"
"strings"
@ -223,7 +223,7 @@ func readK8SServiceAccountJWT() (string, error) {
}
defer data.Close()
contentBytes, err := ioutil.ReadAll(data)
contentBytes, err := io.ReadAll(data)
if err != nil {
return "", err
}

View file

@ -49,5 +49,5 @@ fi
gendoc::build
gendoc::exec \
-api-dir github.com/external-secrets/external-secrets/apis/externalsecrets/v1alpha1 \
-api-dir github.com/external-secrets/external-secrets/apis/externalsecrets/v1beta1 \
-out-file "$1"

View file

@ -340,7 +340,7 @@ func TestAuth(t *testing.T) {
}
func getTokenFromAuthorizer(t *testing.T, authorizer autorest.Authorizer) string {
rq, _ := http.NewRequest("POST", "http://example.com", nil)
rq, _ := http.NewRequest("POST", "http://example.com", http.NoBody)
_, err := authorizer.WithAuthorization()(
autorest.PreparerFunc(func(r *http.Request) (*http.Request, error) {
return rq, nil