Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Merge branch 'master' into snap-simplify-kubeconfig-files
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Holbach committed Sep 10, 2019
2 parents 64e2266 + 5d654cf commit a153f66
Show file tree
Hide file tree
Showing 182 changed files with 534 additions and 523 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Expand Up @@ -58,7 +58,7 @@ jobs:
echo "Not a chart release! Skip chart publish"
fi
build:
working_directory: /home/circleci/go/src/github.com/weaveworks/flux
working_directory: /home/circleci/go/src/github.com/fluxcd/flux
machine:
image: ubuntu-1604:201903-01
environment:
Expand Down
4 changes: 1 addition & 3 deletions Makefile
Expand Up @@ -52,7 +52,7 @@ realclean: clean
rm -rf ./cache

test: test/bin/helm test/bin/kubectl test/bin/kustomize
PATH="${PWD}/bin:${PWD}/test/bin:${PATH}" go test ${TEST_FLAGS} $(shell go list ./... | grep -v "^github.com/weaveworks/flux/vendor" | sort -u)
PATH="${PWD}/bin:${PWD}/test/bin:${PATH}" go test ${TEST_FLAGS} $(shell go list ./... | grep -v "^github.com/fluxcd/flux/vendor" | sort -u)

e2e: test/bin/helm test/bin/kubectl build/.flux.done
PATH="${PWD}/test/bin:${PATH}" CURRENT_OS_ARCH=$(CURRENT_OS_ARCH) test/e2e/run.sh
Expand Down Expand Up @@ -113,8 +113,6 @@ $(GOBIN)/fluxd: $(FLUXD_DEPS)
integration-test: all
test/bin/test-flux



generate-deploy: install/generated_templates.gogen.go
cd deploy && go run ../install/generate.go deploy

Expand Down
2 changes: 1 addition & 1 deletion api/api.go
@@ -1,6 +1,6 @@
package api

import "github.com/weaveworks/flux/api/v11"
import "github.com/fluxcd/flux/api/v11"

// Server defines the minimal interface a Flux must satisfy to adequately serve a
// connecting fluxctl. This interface specifically does not facilitate connecting
Expand Down
6 changes: 3 additions & 3 deletions api/v10/api.go
Expand Up @@ -4,9 +4,9 @@ package v10
import (
"context"

"github.com/weaveworks/flux/api/v6"
"github.com/weaveworks/flux/api/v9"
"github.com/weaveworks/flux/update"
"github.com/fluxcd/flux/api/v6"
"github.com/fluxcd/flux/api/v9"
"github.com/fluxcd/flux/update"
)

type ListImagesOptions struct {
Expand Down
6 changes: 3 additions & 3 deletions api/v11/api.go
Expand Up @@ -4,9 +4,9 @@ package v11
import (
"context"

"github.com/weaveworks/flux/api/v10"
"github.com/weaveworks/flux/api/v6"
"github.com/weaveworks/flux/resource"
"github.com/fluxcd/flux/api/v10"
"github.com/fluxcd/flux/api/v6"
"github.com/fluxcd/flux/resource"
)

type ListServicesOptions struct {
Expand Down
12 changes: 6 additions & 6 deletions api/v6/api.go
Expand Up @@ -3,12 +3,12 @@ package v6
import (
"context"

"github.com/weaveworks/flux/cluster"
"github.com/weaveworks/flux/git"
"github.com/weaveworks/flux/job"
"github.com/weaveworks/flux/resource"
"github.com/weaveworks/flux/ssh"
"github.com/weaveworks/flux/update"
"github.com/fluxcd/flux/cluster"
"github.com/fluxcd/flux/git"
"github.com/fluxcd/flux/job"
"github.com/fluxcd/flux/resource"
"github.com/fluxcd/flux/ssh"
"github.com/fluxcd/flux/update"
)

type ImageStatus struct {
Expand Down
8 changes: 4 additions & 4 deletions api/v6/container.go
Expand Up @@ -2,10 +2,10 @@ package v6

import (
"github.com/pkg/errors"
"github.com/weaveworks/flux/image"
"github.com/weaveworks/flux/policy"
"github.com/weaveworks/flux/registry"
"github.com/weaveworks/flux/update"
"github.com/fluxcd/flux/image"
"github.com/fluxcd/flux/policy"
"github.com/fluxcd/flux/registry"
"github.com/fluxcd/flux/update"
)

// Container describes an individual container including current image info and
Expand Down
6 changes: 3 additions & 3 deletions api/v6/container_test.go
Expand Up @@ -5,9 +5,9 @@ import (

"github.com/stretchr/testify/assert"

"github.com/weaveworks/flux/image"
"github.com/weaveworks/flux/policy"
"github.com/weaveworks/flux/update"
"github.com/fluxcd/flux/image"
"github.com/fluxcd/flux/policy"
"github.com/fluxcd/flux/update"
)

type justSlice []image.Info
Expand Down
2 changes: 1 addition & 1 deletion api/v9/api.go
Expand Up @@ -4,7 +4,7 @@ package v9
import (
"context"

"github.com/weaveworks/flux/api/v6"
"github.com/fluxcd/flux/api/v6"
)

type Server interface {
Expand Down
2 changes: 1 addition & 1 deletion api/v9/change.go
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/json"
"errors"

"github.com/weaveworks/flux/image"
"github.com/fluxcd/flux/image"
)

type ChangeKind string
Expand Down
2 changes: 1 addition & 1 deletion api/v9/change_test.go
Expand Up @@ -5,7 +5,7 @@ import (
"reflect"
"testing"

"github.com/weaveworks/flux/image"
"github.com/fluxcd/flux/image"
)

func TestChangeEncoding(t *testing.T) {
Expand Down
1 change: 1 addition & 0 deletions chart/flux/README.md
Expand Up @@ -245,6 +245,7 @@ The following tables lists the configurable parameters of the Flux chart and the
| `registry.ecr.require` | `false` | Refuse to start if the AWS API is not available
| `registry.acr.enabled` | `false` | Mount `azure.json` via HostPath into the Flux Pod, enabling Flux to use AKS's service principal for ACR authentication
| `registry.acr.hostPath` | `/etc/kubernetes/azure.json` | Alternative location of `azure.json` on the host
| `registry.acr.secretName` | `None` | Secret to mount instead of a hostPath
| `registry.dockercfg.enabled` | `false` | Mount `config.json` via Secret into the Flux Pod, enabling Flux to use a custom docker config file
| `registry.dockercfg.secretName` | `None` | Kubernetes secret with the docker config.json
| `registry.dockercfg.configFileName` | `/dockercfg/config.json` | Alternative path/name of the docker config.json
Expand Down
9 changes: 9 additions & 0 deletions chart/flux/templates/deployment.yaml
Expand Up @@ -60,9 +60,14 @@ spec:
medium: Memory
{{- if .Values.registry.acr.enabled }}
- name: acr-credentials
{{- if (not .Values.registry.acr.secretName) }}
hostPath:
path: "{{ .Values.registry.acr.hostPath }}"
type: ""
{{- else }}
secret:
secretName: {{ .Values.registry.acr.secretName }}
{{- end }}
{{- end }}
{{- if .Values.registry.dockercfg.enabled }}
- name: docker-credentials
Expand Down Expand Up @@ -132,7 +137,11 @@ spec:
mountPath: /var/fluxd/keygen
{{- if .Values.registry.acr.enabled }}
- name: acr-credentials
{{- if not .Values.registry.acr.secretName }}
mountPath: /etc/kubernetes/azure.json
{{- else }}
mountPath: /etc/kubernetes/
{{- end }}
readOnly: true
{{- end }}
{{- if .Values.registry.dockercfg.enabled }}
Expand Down
1 change: 1 addition & 0 deletions chart/flux/values.yaml
Expand Up @@ -218,6 +218,7 @@ registry:
acr:
enabled: false
hostPath: /etc/kubernetes/azure.json
secretName: ""
dockercfg:
enabled: false
secretName: ""
Expand Down
6 changes: 3 additions & 3 deletions cluster/cluster.go
Expand Up @@ -4,9 +4,9 @@ import (
"context"
"errors"

"github.com/weaveworks/flux/policy"
"github.com/weaveworks/flux/resource"
"github.com/weaveworks/flux/ssh"
"github.com/fluxcd/flux/policy"
"github.com/fluxcd/flux/resource"
"github.com/fluxcd/flux/ssh"
)

// Constants for workload ready status. These are defined here so that
Expand Down
2 changes: 1 addition & 1 deletion cluster/kubernetes/errors.go
Expand Up @@ -3,7 +3,7 @@ package kubernetes
import (
"fmt"

fluxerr "github.com/weaveworks/flux/errors"
fluxerr "github.com/fluxcd/flux/errors"
)

func ObjectMissingError(obj string, err error) *fluxerr.Error {
Expand Down
6 changes: 3 additions & 3 deletions cluster/kubernetes/images.go
Expand Up @@ -11,9 +11,9 @@ import (
apierrors "k8s.io/apimachinery/pkg/api/errors"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"

"github.com/weaveworks/flux/image"
"github.com/weaveworks/flux/registry"
"github.com/weaveworks/flux/resource"
"github.com/fluxcd/flux/image"
"github.com/fluxcd/flux/registry"
"github.com/fluxcd/flux/resource"
)

func mergeCredentials(log func(...interface{}) error,
Expand Down
4 changes: 2 additions & 2 deletions cluster/kubernetes/images_test.go
Expand Up @@ -9,8 +9,8 @@ import (
apiv1 "k8s.io/api/core/v1"
"k8s.io/client-go/kubernetes/fake"

"github.com/weaveworks/flux/image"
"github.com/weaveworks/flux/registry"
"github.com/fluxcd/flux/image"
"github.com/fluxcd/flux/registry"
)

func noopLog(...interface{}) error {
Expand Down
10 changes: 5 additions & 5 deletions cluster/kubernetes/kubernetes.go
Expand Up @@ -18,11 +18,11 @@ import (
k8sclientdynamic "k8s.io/client-go/dynamic"
k8sclient "k8s.io/client-go/kubernetes"

"github.com/weaveworks/flux/cluster"
kresource "github.com/weaveworks/flux/cluster/kubernetes/resource"
fhrclient "github.com/weaveworks/flux/integrations/client/clientset/versioned"
"github.com/weaveworks/flux/resource"
"github.com/weaveworks/flux/ssh"
"github.com/fluxcd/flux/cluster"
kresource "github.com/fluxcd/flux/cluster/kubernetes/resource"
fhrclient "github.com/fluxcd/flux/integrations/client/clientset/versioned"
"github.com/fluxcd/flux/resource"
"github.com/fluxcd/flux/ssh"
)

type coreClient k8sclient.Interface
Expand Down
6 changes: 3 additions & 3 deletions cluster/kubernetes/manifests.go
Expand Up @@ -10,9 +10,9 @@ import (
"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1"
"k8s.io/apimachinery/pkg/runtime/schema"

kresource "github.com/weaveworks/flux/cluster/kubernetes/resource"
"github.com/weaveworks/flux/image"
"github.com/weaveworks/flux/resource"
kresource "github.com/fluxcd/flux/cluster/kubernetes/resource"
"github.com/fluxcd/flux/image"
"github.com/fluxcd/flux/resource"
)

// ResourceScopes maps resource definitions (GroupVersionKind) to whether they are namespaced or not
Expand Down
2 changes: 1 addition & 1 deletion cluster/kubernetes/manifests_test.go
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/stretchr/testify/assert"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

"github.com/weaveworks/flux/cluster/kubernetes/testfiles"
"github.com/fluxcd/flux/cluster/kubernetes/testfiles"
)

func TestLocalCRDScope(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cluster/kubernetes/mock.go
@@ -1,6 +1,6 @@
package kubernetes

import kresource "github.com/weaveworks/flux/cluster/kubernetes/resource"
import kresource "github.com/fluxcd/flux/cluster/kubernetes/resource"

type ConstNamespacer string

Expand Down
2 changes: 1 addition & 1 deletion cluster/kubernetes/namespacer.go
Expand Up @@ -8,7 +8,7 @@ import (
"k8s.io/client-go/discovery"
"k8s.io/client-go/tools/clientcmd"

kresource "github.com/weaveworks/flux/cluster/kubernetes/resource"
kresource "github.com/fluxcd/flux/cluster/kubernetes/resource"
)

// The namespace to presume if something doesn't have one, and we
Expand Down
2 changes: 1 addition & 1 deletion cluster/kubernetes/namespacer_test.go
Expand Up @@ -8,7 +8,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
corefake "k8s.io/client-go/kubernetes/fake"

kresource "github.com/weaveworks/flux/cluster/kubernetes/resource"
kresource "github.com/fluxcd/flux/cluster/kubernetes/resource"
)

var getAndList = metav1.Verbs([]string{"get", "list"})
Expand Down
4 changes: 2 additions & 2 deletions cluster/kubernetes/patch.go
Expand Up @@ -15,8 +15,8 @@ import (
"k8s.io/apimachinery/pkg/util/strategicpatch"
k8sscheme "k8s.io/client-go/kubernetes/scheme"

kresource "github.com/weaveworks/flux/cluster/kubernetes/resource"
"github.com/weaveworks/flux/resource"
kresource "github.com/fluxcd/flux/cluster/kubernetes/resource"
"github.com/fluxcd/flux/resource"
)

func createManifestPatch(originalManifests, modifiedManifests []byte, originalSource, modifiedSource string) ([]byte, error) {
Expand Down
2 changes: 1 addition & 1 deletion cluster/kubernetes/patch_test.go
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/stretchr/testify/assert"
"gopkg.in/yaml.v2"

"github.com/weaveworks/flux/cluster/kubernetes/resource"
"github.com/fluxcd/flux/cluster/kubernetes/resource"
)

func TestPatchAndApply(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions cluster/kubernetes/policies.go
Expand Up @@ -3,8 +3,8 @@ package kubernetes
import (
"fmt"

kresource "github.com/weaveworks/flux/cluster/kubernetes/resource"
"github.com/weaveworks/flux/resource"
kresource "github.com/fluxcd/flux/cluster/kubernetes/resource"
"github.com/fluxcd/flux/resource"
)

func (m *manifests) UpdateWorkloadPolicies(def []byte, id resource.ID, update resource.PolicyUpdate) ([]byte, error) {
Expand Down
4 changes: 2 additions & 2 deletions cluster/kubernetes/policies_test.go
Expand Up @@ -9,8 +9,8 @@ import (
"github.com/go-kit/kit/log"
"github.com/stretchr/testify/assert"

"github.com/weaveworks/flux/policy"
"github.com/weaveworks/flux/resource"
"github.com/fluxcd/flux/policy"
"github.com/fluxcd/flux/resource"
)

func TestUpdatePolicies(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions cluster/kubernetes/resource/cronjob.go
@@ -1,8 +1,8 @@
package resource

import (
"github.com/weaveworks/flux/image"
"github.com/weaveworks/flux/resource"
"github.com/fluxcd/flux/image"
"github.com/fluxcd/flux/resource"
)

type CronJob struct {
Expand Down
4 changes: 2 additions & 2 deletions cluster/kubernetes/resource/daemonset.go
@@ -1,8 +1,8 @@
package resource

import (
"github.com/weaveworks/flux/image"
"github.com/weaveworks/flux/resource"
"github.com/fluxcd/flux/image"
"github.com/fluxcd/flux/resource"
)

type DaemonSet struct {
Expand Down
4 changes: 2 additions & 2 deletions cluster/kubernetes/resource/deployment.go
@@ -1,8 +1,8 @@
package resource

import (
"github.com/weaveworks/flux/image"
"github.com/weaveworks/flux/resource"
"github.com/fluxcd/flux/image"
"github.com/fluxcd/flux/resource"
)

type Deployment struct {
Expand Down
4 changes: 2 additions & 2 deletions cluster/kubernetes/resource/helmrelease.go
Expand Up @@ -6,8 +6,8 @@ import (
"sort"
"strings"

"github.com/weaveworks/flux/image"
"github.com/weaveworks/flux/resource"
"github.com/fluxcd/flux/image"
"github.com/fluxcd/flux/resource"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion cluster/kubernetes/resource/helmrelease_test.go
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/stretchr/testify/assert"
"testing"

"github.com/weaveworks/flux/resource"
"github.com/fluxcd/flux/resource"
)

func TestSortedContainers(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions cluster/kubernetes/resource/load_test.go
Expand Up @@ -8,8 +8,8 @@ import (

"github.com/stretchr/testify/assert"

"github.com/weaveworks/flux/cluster/kubernetes/testfiles"
"github.com/weaveworks/flux/resource"
"github.com/fluxcd/flux/cluster/kubernetes/testfiles"
"github.com/fluxcd/flux/resource"
)

// for convenience
Expand Down

0 comments on commit a153f66

Please sign in to comment.