Skip to content

Commit

Permalink
rebased from upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
ibrokethecloud committed Nov 21, 2020
2 parents acec42b + 277de81 commit d5ece73
Show file tree
Hide file tree
Showing 833 changed files with 240,237 additions and 9,926 deletions.
104 changes: 59 additions & 45 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
kind: pipeline
type: docker
name: amd64

platform:
Expand All @@ -8,52 +9,60 @@ platform:

steps:
- name: build
image: rancher/dapper:v0.4.1
image: rancher/dapper:v0.5.0
commands:
- dapper ci
volumes:
- name: docker
path: /var/run/docker.sock

- name: e2e test
image: rancher/dapper:v0.5.0
commands:
- dapper e2e
volumes:
- name: docker
path: /var/run/docker.sock

- name: github_binary_release
image: plugins/github-release
settings:
api_key:
from_secret: github_token
prerelease: true
checksum:
- sha256
checksum_file: CHECKSUMsum-amd64.txt
checksum_flatten: true
files:
- "dist/artifacts/*"
- dist/artifacts/*
prerelease: true
when:
event:
- tag
instance:
- drone-publish.rancher.io
- drone-publish.k3s.io
ref:
- refs/head/master
- refs/tags/*
event:
- tag

- name: docker-publish
image: plugins/docker
settings:
dockerfile: package/Dockerfile
password:
from_secret: docker_password
repo: "rancher/helm-controller"
tag: "${DRONE_TAG}-amd64"
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: rancher/helm-controller
tag: "${DRONE_TAG}-${DRONE_STAGE_ARCH}"
when:
event:
- tag
instance:
- drone-publish.rancher.io
- drone-publish.k3s.io
ref:
- refs/head/master
- refs/tags/*
event:
- tag

volumes:
- name: docker
Expand All @@ -62,6 +71,7 @@ volumes:

---
kind: pipeline
type: docker
name: arm64

platform:
Expand All @@ -70,7 +80,7 @@ platform:

steps:
- name: build
image: rancher/dapper:v0.4.1
image: rancher/dapper:v0.5.0
commands:
- dapper ci
volumes:
Expand All @@ -82,40 +92,40 @@ steps:
settings:
api_key:
from_secret: github_token
prerelease: true
checksum:
- sha256
checksum_file: CHECKSUMsum-arm64.txt
checksum_flatten: true
files:
- "dist/artifacts/*"
- dist/artifacts/*
prerelease: true
when:
event:
- tag
instance:
- drone-publish.rancher.io
- drone-publish.k3s.io
ref:
- refs/head/master
- refs/tags/*
event:
- tag

- name: docker-publish
image: plugins/docker
settings:
dockerfile: package/Dockerfile
password:
from_secret: docker_password
repo: "rancher/helm-controller"
tag: "${DRONE_TAG}-arm64"
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: rancher/helm-controller
tag: "${DRONE_TAG}-${DRONE_STAGE_ARCH}"
when:
event:
- tag
instance:
- drone-publish.rancher.io
- drone-publish.k3s.io
ref:
- refs/head/master
- refs/tags/*
event:
- tag

volumes:
- name: docker
Expand All @@ -124,6 +134,7 @@ volumes:

---
kind: pipeline
type: docker
name: arm

platform:
Expand All @@ -132,7 +143,7 @@ platform:

steps:
- name: build
image: rancher/dapper:v0.4.1
image: rancher/dapper:v0.5.0
commands:
- dapper ci
volumes:
Expand All @@ -144,40 +155,40 @@ steps:
settings:
api_key:
from_secret: github_token
prerelease: true
checksum:
- sha256
checksum_file: CHECKSUMsum-arm.txt
checksum_flatten: true
files:
- "dist/artifacts/*"
- dist/artifacts/*
prerelease: true
when:
event:
- tag
instance:
- drone-publish.rancher.io
- drone-publish.k3s.io
ref:
- refs/head/master
- refs/tags/*
event:
- tag

- name: docker-publish
image: plugins/docker
settings:
dockerfile: package/Dockerfile
password:
from_secret: docker_password
repo: "rancher/helm-controller"
tag: "${DRONE_TAG}-arm"
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: rancher/helm-controller
tag: "${DRONE_TAG}-${DRONE_STAGE_ARCH}"
when:
event:
- tag
instance:
- drone-publish.rancher.io
- drone-publish.k3s.io
ref:
- refs/head/master
- refs/tags/*
event:
- tag

volumes:
- name: docker
Expand All @@ -186,6 +197,7 @@ volumes:

---
kind: pipeline
type: docker
name: manifest

platform:
Expand All @@ -201,21 +213,23 @@ steps:
password:
from_secret: docker_password
platforms:
- linux/amd64
- linux/arm64
- linux/arm
- linux/amd64
- linux/arm64
- linux/arm
target: "rancher/helm-controller:${DRONE_TAG}"
template: "rancher/helm-controller:${DRONE_TAG}-ARCH"
when:
event:
- tag
instance:
- drone-publish.rancher.io
- drone-publish.k3s.io
ref:
- refs/head/master
- refs/tags/*
event:
- tag

depends_on:
- amd64
- arm64
- arm

...
19 changes: 19 additions & 0 deletions .golangci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"linters": {
"disable-all": true,
"enable": [
"govet",
"golint",
"goimports",
"misspell",
"ineffassign",
"gofmt"
]
},
"run": {
"skip-files": [
"/zz_generated_"
],
"deadline": "5m"
}
}
12 changes: 9 additions & 3 deletions Dockerfile.dapper
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
FROM golang:1.12.1-alpine3.9
FROM golang:1.13.15-alpine3.12

ARG DAPPER_HOST_ARCH
ENV ARCH $DAPPER_HOST_ARCH

RUN apk -U add bash git gcc musl-dev docker vim less file curl wget ca-certificates
RUN go get -d golang.org/x/lint/golint && \
Expand All @@ -14,11 +17,14 @@ RUN if [ "${ARCH}" == "amd64" ]; then \
curl -sL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.15.0; \
fi

RUN curl -L https://github.com/rancher/rke/releases/download/v1.1.4/rke_linux-$ARCH \
--output /usr/local/bin/rke && chmod +x /usr/local/bin/rke

ENV GO111MODULE off
ENV DAPPER_ENV REPO TAG DRONE_TAG
ENV DAPPER_SOURCE /go/src/github.com/rancher/helm-controller/
ENV DAPPER_SOURCE /go/src/github.com/k3s-io/helm-controller/
ENV DAPPER_OUTPUT ./bin ./dist
ENV DAPPER_DOCKER_SOCKET true
ENV TRASH_CACHE ${DAPPER_SOURCE}/.trash-cache
ENV HOME ${DAPPER_SOURCE}
WORKDIR ${DAPPER_SOURCE}

Expand Down
26 changes: 0 additions & 26 deletions Dockerfile.dapper479579668

This file was deleted.

10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
helm-controller
========
A simple way to manage helm charts with a Custom Resource Definitions in k8s.

_NOTE: this repository has been recently (2020-10-06) moved out of the github.com/rancher org to github.com/k3s-io
supporting the [acceptance of K3s as a CNCF sandbox project](https://github.com/cncf/toc/pull/447)_.

---

A simple way to manage helm charts (v2 and v3) with a Custom Resource Definitions in k8s.

## Manifests and Deploying
The `./manifests` folder contains useful YAML manifests to use for deploying and developing the Helm Controller. This simply YAML deployment creates a HelmChart CRD + a Deployment using the `rancher/helm-controller` container. The YAML might need some modifications for your environment so read below for Namespaced vs Cluster deployments and how to use them properly.
Expand Down Expand Up @@ -47,4 +53,4 @@ Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
16 changes: 9 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
module github.com/rancher/helm-controller
module github.com/k3s-io/helm-controller

go 1.12
go 1.13

require (
github.com/rancher/wrangler v0.4.0
github.com/rancher/wrangler-api v0.4.0
github.com/onsi/ginkgo v1.11.0
github.com/onsi/gomega v1.7.0
github.com/rancher/wrangler v0.6.1
github.com/rancher/wrangler-api v0.6.0
github.com/sirupsen/logrus v1.4.2
github.com/stretchr/testify v1.4.0
github.com/urfave/cli v1.22.2
k8s.io/api v0.17.0
k8s.io/apimachinery v0.17.0
k8s.io/client-go v0.17.0
k8s.io/api v0.18.0
k8s.io/apimachinery v0.18.0
k8s.io/client-go v0.18.0
k8s.io/klog v1.0.0
)
Loading

0 comments on commit d5ece73

Please sign in to comment.