Skip to content

Commit

Permalink
Apply helm3 changes (#325)
Browse files Browse the repository at this point in the history
* Apply helm3 changes

* Use helmclient v1.0.0

* Add changelog
  • Loading branch information
rossf7 authored May 18, 2020
1 parent 7505005 commit f10794f
Show file tree
Hide file tree
Showing 51 changed files with 1,584 additions and 1,107 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project's packages adheres to [Semantic Versioning](http://semver.org/s

## Unreleased

### Changed

- Updated to use Helm 3 and add releasemigration resource for migrating releases
from Helm 2 to Helm 3.

## [v1.0.3] 2020-05-18

### Changed
Expand Down
File renamed without changes.
55 changes: 17 additions & 38 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ module github.com/giantswarm/app-operator
go 1.13

require (
github.com/Masterminds/semver/v3 v3.0.3
github.com/giantswarm/apiextensions v0.2.2
github.com/giantswarm/appcatalog v0.2.3
github.com/giantswarm/backoff v0.2.0
github.com/giantswarm/e2e-harness v0.2.0
github.com/giantswarm/e2esetup v0.2.0
github.com/giantswarm/e2etemplates v0.2.0
github.com/giantswarm/errors v0.2.3
github.com/giantswarm/e2esetup v0.2.1-0.20200401192455-acfdbff0dabe
github.com/giantswarm/errors v0.2.0
github.com/giantswarm/exporterkit v0.2.0
github.com/giantswarm/helmclient v0.2.2
github.com/giantswarm/helmclient v1.0.0
github.com/giantswarm/k8sclient v0.2.0
github.com/giantswarm/kubeconfig v0.2.0
github.com/giantswarm/microendpoint v0.2.0
Expand All @@ -20,44 +19,24 @@ require (
github.com/giantswarm/micrologger v0.3.1
github.com/giantswarm/operatorkit v0.2.1
github.com/giantswarm/versionbundle v0.2.0
github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9 // indirect
github.com/google/go-cmp v0.4.0
github.com/google/gofuzz v1.1.0 // indirect
github.com/googleapis/gnostic v0.4.0 // indirect
github.com/hashicorp/golang-lru v0.5.3 // indirect
github.com/imdario/mergo v0.3.8 // indirect
github.com/kr/pretty v0.2.0 // indirect
github.com/prometheus/client_golang v1.5.1
github.com/spf13/afero v1.2.2
github.com/spf13/viper v1.7.0
golang.org/x/crypto v0.0.0-20200210222208-86ce3cb69678 // indirect
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b // indirect
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5 // indirect
gopkg.in/yaml.v2 v2.2.8
k8s.io/api v0.16.6
k8s.io/apimachinery v0.16.6
k8s.io/client-go v0.16.6
k8s.io/helm v2.16.4+incompatible
k8s.io/api v0.17.3
k8s.io/apimachinery v0.17.3
k8s.io/client-go v0.17.3
k8s.io/utils v0.0.0-20191114200735-6ca3b61696b6 // indirect
sigs.k8s.io/yaml v1.2.0
)

// Workaround for https://github.com/sirupsen/logrus/issues/570
// Additional reading: https://github.com/golang/go/issues/28489
// Solution: https://github.com/moby/moby/issues/39302
replace github.com/docker/docker => github.com/docker/engine v1.4.2-0.20191113042239-ea84732a7725

replace (
k8s.io/api => k8s.io/api v0.0.0-20191114100352-16d7abae0d2a
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.0.0-20191114105449-027877536833
k8s.io/apimachinery => k8s.io/apimachinery v0.16.5-beta.1
k8s.io/apiserver => k8s.io/apiserver v0.0.0-20191114103151-9ca1dc586682
k8s.io/cli-runtime => k8s.io/cli-runtime v0.0.0-20191114110141-0a35778df828
k8s.io/client-go => k8s.io/client-go v0.0.0-20191114101535-6c5935290e33
k8s.io/cloud-provider => k8s.io/cloud-provider v0.0.0-20191114112024-4bbba8331835
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.0.0-20191114111741-81bb9acf592d
k8s.io/code-generator => k8s.io/code-generator v0.16.5-beta.1
k8s.io/component-base => k8s.io/component-base v0.0.0-20191114102325-35a9586014f7
k8s.io/cri-api => k8s.io/cri-api v0.16.5-beta.1
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.0.0-20191114112310-0da609c4ca2d
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.0.0-20191114103820-f023614fb9ea
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.0.0-20191114111510-6d1ed697a64b
k8s.io/kube-proxy => k8s.io/kube-proxy v0.0.0-20191114110717-50a77e50d7d9
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.0.0-20191114111229-2e90afcb56c7
k8s.io/kubectl => k8s.io/kubectl v0.0.0-20191114113550-6123e1c827f7
k8s.io/kubelet => k8s.io/kubelet v0.0.0-20191114110954-d67a8e7e2200
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.0.0-20191114112655-db9be3e678bb
k8s.io/metrics => k8s.io/metrics v0.0.0-20191114105837-a4a2842dc51b
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.0.0-20191114104439-68caf20693ac
)
670 changes: 301 additions & 369 deletions go.sum

Large diffs are not rendered by default.

75 changes: 52 additions & 23 deletions helm/app-operator/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ metadata:
{{- include "labels.common" . | nindent 4 }}
rules:
- apiGroups:
- apiextensions.k8s.io
- apiextensions.k8s.io
resources:
- customresourcedefinitions
- customresourcedefinitions
verbs:
- "*"
- "*"
- apiGroups:
- apiextensions.k8s.io
- apiextensions.k8s.io
resources:
- customresourcedefinitions/status
- customresourcedefinitions/status
verbs:
- "*"
- "*"
- apiGroups:
- application.giantswarm.io
resources:
Expand Down Expand Up @@ -52,42 +52,71 @@ rules:
- patch
- update
- apiGroups:
- "rbac.authorization.k8s.io"
- batch
resources:
- clusterrolebindings
- jobs
verbs:
- "create"
- create
- delete
- get
- apiGroups:
- "rbac.authorization.k8s.io"
- networking.k8s.io
resources:
- clusterroles
- networkpolicies
verbs:
- "bind"
- create
- get
- apiGroups:
- ""
- policy
resources:
- services
- serviceaccounts
- podsecuritypolicies
verbs:
- "create"
- create
- get
- use
- apiGroups:
- extensions
- rbac.authorization.k8s.io
resources:
- deployments
- clusterrolebindings
verbs:
- 'create'
- create
- get
- apiGroups:
- ""
- rbac.authorization.k8s.io
resources:
- configmaps
- secrets
- clusterroles
verbs:
- "*"
- bind
- create
- get
- apiGroups:
- ""
resources:
- services
- serviceaccounts
verbs:
- get
- create
- apiGroups:
- apps
resources:
- deployments
verbs:
- get
- create
- apiGroups:
- ""
resources:
- configmaps
- secrets
verbs:
- "*"
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- list
- apiGroups:
- ""
Expand Down
9 changes: 0 additions & 9 deletions integration/key/catalog.go

This file was deleted.

27 changes: 27 additions & 0 deletions integration/key/key.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// +build k8srequired

package key

func AppOperatorVersion() string {
return "1.0.0"
}

func ControlPlaneTestCatalogStorageURL() string {
return "https://giantswarm.github.io/control-plane-test-catalog"
}

func DefaultCatalogName() string {
return "default"
}

func DefaultCatalogStorageURL() string {
return "https://giantswarm.github.com/default-catalog"
}

func Namespace() string {
return "giantswarm"
}

func TestAppReleaseName() string {
return "test-app"
}
19 changes: 0 additions & 19 deletions integration/key/release_name.go

This file was deleted.

7 changes: 0 additions & 7 deletions integration/key/resource_name.go

This file was deleted.

43 changes: 43 additions & 0 deletions integration/release/error.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// +build k8srequired

package release

import (
"github.com/giantswarm/microerror"
)

var invalidConfigError = &microerror.Error{
Kind: "invalidConfigError",
}

// IsInvalidConfig asserts invalidConfigError.
func IsInvalidConfig(err error) bool {
return microerror.Cause(err) == invalidConfigError
}

var releaseStatusNotMatchingError = &microerror.Error{
Kind: "releaseStatusNotMatchingError",
}

// IsReleaseStatusNotMatching asserts releaseStatusNotMatchingError
func IsReleaseStatusNotMatching(err error) bool {
return microerror.Cause(err) == releaseStatusNotMatchingError
}

var releaseVersionNotMatchingError = &microerror.Error{
Kind: "releaseVersionNotMatchingError",
}

// IsReleaseVersionNotMatching asserts releaseVersionNotMatchingError
func IsReleaseVersionNotMatching(err error) bool {
return microerror.Cause(err) == releaseVersionNotMatchingError
}

var waitError = &microerror.Error{
Kind: "waitError",
}

// IsWait asserts waitError.
func IsWait(err error) bool {
return microerror.Cause(err) == waitError
}
Loading

0 comments on commit f10794f

Please sign in to comment.