Skip to content

Commit

Permalink
Merge pull request openshift#117 from Nordix/v1alpha2
Browse files Browse the repository at this point in the history
Fix broken deployment example and update kustomize
  • Loading branch information
metal3-io-bot authored Oct 10, 2019
2 parents f43e955 + 1f808ce commit 0af28cc
Show file tree
Hide file tree
Showing 24 changed files with 114 additions and 439 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,14 @@ API used with this `cluster-api` provider.

## Run locally

```sh
make deploy-capi
make install
make run
```

## Run in cluster

```sh
make deploy
```
1 change: 0 additions & 1 deletion config/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ resources:
patchesStrategicMerge:
- manager_image_patch.yaml
- manager_auth_proxy_patch.yaml
- manager_credentials_patch.yaml
# - manager_prometheus_metrics_patch.yaml
20 changes: 0 additions & 20 deletions config/default/manager_credentials_patch.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions config/manager/credentials.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,3 @@ resources:

generatorOptions:
disableNameSuffixHash: true

secretGenerator:
- name: manager-bootstrap-credentials
namespace: system
type: Opaque
envs:
- secrets.txt
8 changes: 4 additions & 4 deletions examples/cluster/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: BareMetalCluster
metadata:
name: ${CLUSTER_NAME}
spec:
cloudName: ${CLUSTER_NAME}
cloudsSecret:
name: cloud-config
# spec:
# cloudName: ${CLUSTER_NAME}
# cloudsSecret:
# name: cloud-config
5 changes: 0 additions & 5 deletions examples/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,6 @@ fi

mkdir -p "${OUTPUT_DIR}"

# Generate BAREMETAL Credentials.
export SOME_CREDENTIALS="SOME_CREDENTIALS"
export BAREMETAL_B64ENCODED_CREDENTIAL="$(echo -n "$SOME_CREDENTIALS" | base64 | tr -d '\n')"

# Generate cluster resources.
kustomize build "${SOURCE_DIR}/cluster" | envsubst > "${CLUSTER_GENERATED_FILE}"
echo "Generated ${CLUSTER_GENERATED_FILE}"
Expand Down Expand Up @@ -118,4 +114,3 @@ echo "Generated ${COMPONENTS_BAREMETAL_GENERATED_FILE}"
# Generate a single provider components file.
kustomize build "${SOURCE_DIR}/provider-components" | envsubst > "${PROVIDER_COMPONENTS_GENERATED_FILE}"
echo "Generated ${PROVIDER_COMPONENTS_GENERATED_FILE}"
echo "WARNING: ${PROVIDER_COMPONENTS_GENERATED_FILE} includes BAREMETAL credentials"
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@ replace (
sigs.k8s.io/cluster-api => github.com/keleustes/cluster-api v1.16.1
sigs.k8s.io/cluster-api-bootstrap-provider-kubeadm => github.com/keleustes/cluster-api-bootstrap-provider-kubeadm v1.16.1
sigs.k8s.io/controller-runtime => github.com/keleustes/controller-runtime v1.16.1
sigs.k8s.io/kustomize/v3 => github.com/keleustes/kustomize/v3 v3.16.1
sigs.k8s.io/kustomize/v3 => github.com/keleustes/kustomize/v3 v3.16.4
)
38 changes: 0 additions & 38 deletions hack/checkin_account.py

This file was deleted.

62 changes: 0 additions & 62 deletions hack/checkout_account.py

This file was deleted.

9 changes: 0 additions & 9 deletions hack/e2e-aws-disallowed.txt

This file was deleted.

45 changes: 0 additions & 45 deletions hack/e2e-aws-janitor.sh

This file was deleted.

46 changes: 0 additions & 46 deletions hack/e2e-aws-resources-list.sh

This file was deleted.

4 changes: 2 additions & 2 deletions hack/ensure-kustomize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ set -o nounset
set -o pipefail

GOPATH_BIN="$(go env GOPATH)/bin/"
MINIMUM_KUSTOMIZE_VERSION=v3.1.0
MINIMUM_KUSTOMIZE_VERSION=v3.2.0

# Ensure the kustomize tool exists and is a viable version, or installs it
verify_kustomize_version() {
Expand Down Expand Up @@ -51,4 +51,4 @@ EOF
fi
}

verify_kustomize_version
verify_kustomize_version
18 changes: 18 additions & 0 deletions hack/gofmt.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh

set -eux

IS_CONTAINER=${IS_CONTAINER:-false}

if [ "${IS_CONTAINER}" != "false" ]; then
TOP_DIR="${1:-.}"
go fmt "${TOP_DIR}"/pkg/... "${TOP_DIR}"/cmd/...
else
podman run --rm \
--env IS_CONTAINER=TRUE \
--volume "${PWD}:/workdir:ro,z" \
--entrypoint sh \
--workdir /workdir \
registry.hub.docker.com/library/golang:1.12 \
/workdir/hack/gofmt.sh "${@}"
fi;
18 changes: 18 additions & 0 deletions hack/govet.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh

set -eux

IS_CONTAINER=${IS_CONTAINER:-false}

if [ "${IS_CONTAINER}" != "false" ]; then
TOP_DIR="${1:-.}"
go vet "${TOP_DIR}"/pkg/... "${TOP_DIR}"/cmd/...
else
podman run --rm \
--env IS_CONTAINER=TRUE \
--volume "${PWD}:/go/src/github.com/metal3-io/cluster-api-provider-baremetal:ro,z" \
--entrypoint sh \
--workdir /go/src/github.com/metal3-io/cluster-api-provider-baremetal \
registry.hub.docker.com/library/golang:1.12 \
/go/src/github.com/metal3-io/cluster-api-provider-baremetal/hack/govet.sh "${@}"
fi;
Loading

0 comments on commit 0af28cc

Please sign in to comment.