Skip to content

Commit

Permalink
up: upgrade version of golang, operator-sdk and sops (#4)
Browse files Browse the repository at this point in the history
* up: upgrade version of golang, operator-sdk and sops
* pipe: change sops version number in pipeline
* pipe: remove fetching kind config command
* pipe: add .github and .chglog config directories
  • Loading branch information
isindir authored Dec 14, 2019
1 parent 719eff5 commit ef00f5f
Show file tree
Hide file tree
Showing 19 changed files with 839 additions and 290 deletions.
39 changes: 39 additions & 0 deletions .chglog/CHANGELOG.tpl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{{ range .Versions }}
{{ .Tag.Name }}

> {{ datetime "2006-01-02" .Tag.Date }}
{{ range .CommitGroups -}}
### {{ .Title }}

{{ range .Commits -}}
* {{ .Subject }}
{{ end }}
{{ end -}}

{{- if .RevertCommits -}}
### Reverts

{{ range .RevertCommits -}}
* {{ .Revert.Header }}
{{ end }}
{{ end -}}

{{- if .MergeCommits -}}
### Pull Requests

{{ range .MergeCommits -}}
* {{ .Header }}
{{ end }}
{{ end -}}

{{- if .NoteGroups -}}
{{ range .NoteGroups -}}
### {{ .Title }}

{{ range .Notes }}
{{ .Body }}
{{ end }}
{{ end -}}
{{ end -}}
{{ end -}}
39 changes: 39 additions & 0 deletions .chglog/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
style: github
template: CHANGELOG.tpl.md
info:
title: CHANGELOG
repository_url: https://github.com/isindir/sops-secrets-operator
options:
commits:
filters:
Type:
- doc
- docs
- feat
- fix
- perf
- pipe
- refactor
- up
- update
- upgrade
commit_groups:
title_maps:
doc: Documentation Update
docs: Documentation Update
feat: Features
fix: Bug Fixes
perf: Performance Improvements
pipe: Pipeline changes
refactor: Code Refactoring
up: Component Upgrade
update: Component Upgrade
upgrade: Component Upgrade
header:
pattern: "^(\\w*)\\:\\s(.*)$"
pattern_maps:
- Type
- Subject
notes:
keywords:
- BREAKING CHANGE
7 changes: 4 additions & 3 deletions .circleci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM golang:1.12.5-alpine3.9
FROM golang:1.13.4-alpine3.10

ENV GO111MODULE on
ENV GO15VENDOREXPERIMENT 1

RUN apk add --no-cache \
bash \
Expand All @@ -12,10 +13,10 @@ RUN apk add --no-cache \
jq \
make

ARG HELM_VERSION=v2.14.3
ARG HELM_VERSION=v2.16.1
ARG CHART_RELEASER_VERSION=0.1.4
ARG KUBEVAL_VERSION=0.12.0
ARG OPERATOR_SDK_VERSION=0.10.0
ARG OPERATOR_SDK_VERSION=0.13.0

RUN wget -q https://storage.googleapis.com/kubernetes-helm/helm-${HELM_VERSION}-linux-amd64.tar.gz -O - | tar -xzO linux-amd64/helm > /usr/local/bin/helm \
&& chmod +x /usr/local/bin/helm
Expand Down
17 changes: 7 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ jobs:
machine:
image: ubuntu-1604:201903-01
environment:
K8S_VERSION: v1.15.2
KIND_VERSION: v0.4.0
HELM_VERSION: v2.14.3
K8S_VERSION: v1.16.3
KIND_VERSION: v0.6.1
HELM_VERSION: v2.16.1
GOLANG_VERSION: 1.13.4
OPERATOR_SDK_VERSION: 0.10.0
SOPS_VERSION: 3.3.1
OPERATOR_SDK_VERSION: v0.13.0
SOPS_VERSION: v3.5.0

KUBECONFIG: /home/circleci/.kube/config

Expand All @@ -25,6 +25,7 @@ jobs:
GOPATH: /home/circleci/gogo
GOROOT: /usr/local/go
GO111MODULE: "on"
GO15VENDOREXPERIMENT: 1
steps:
- checkout
- restore-cache:
Expand Down Expand Up @@ -71,7 +72,7 @@ jobs:
- run:
name: install operator-sdk
command: |
curl -sSLo operator-sdk https://github.com/operator-framework/operator-sdk/releases/download/v${OPERATOR_SDK_VERSION}/operator-sdk-v${OPERATOR_SDK_VERSION}-x86_64-linux-gnu
curl -sSLo operator-sdk https://github.com/operator-framework/operator-sdk/releases/download/${OPERATOR_SDK_VERSION}/operator-sdk-${OPERATOR_SDK_VERSION}-x86_64-linux-gnu
chmod +x operator-sdk
sudo mv operator-sdk /usr/local/bin/
- run:
Expand All @@ -84,7 +85,6 @@ jobs:
name: start kind
command: |
kind create cluster
export KUBECONFIG="$(kind get kubeconfig-path --name="kind")"
JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}';
until kubectl get nodes -o jsonpath="$JSONPATH" 2>&1 | grep -q "Ready=True"; do
sleep 1;
Expand All @@ -99,7 +99,6 @@ jobs:
- run:
name: setup helm and install tiller
command: |
export KUBECONFIG="$(kind get kubeconfig-path --name="kind")"
# install helm
curl -sSL https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz | tar -xzvf - linux-amd64/helm
chmod +x linux-amd64/helm
Expand Down Expand Up @@ -127,7 +126,6 @@ jobs:
- run:
name: Run Local Tests
command: |
export KUBECONFIG="$(kind get kubeconfig-path --name="kind")"
export GNUPGHOME="$(mktemp -d)"
cat >$GNUPGHOME/foo <<EOF
%echo Generating a basic OpenPGP key
Expand Down Expand Up @@ -190,6 +188,5 @@ jobs:
- run:
name: Run Tests
command: |
export KUBECONFIG="$(kind get kubeconfig-path --name="kind")"
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
make test
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Global owners
* @isindir
2 changes: 2 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#### What this PR does / why we need it:

6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
SHELL := /bin/bash
GO := GO15VENDOREXPERIMENT=1 GO111MODULE=on GOPROXY=https://proxy.golang.org go

.PHONY: repo-tag release mod echo clean build push gen fmt check test/unit test/e2e test/operator test local/run

Expand All @@ -20,7 +21,8 @@ release: build push

mod:
@echo "Go Mod Vendor"
@go mod vendor
$(GO) mod tidy
$(GO) mod vendor
@echo

echo:
Expand Down Expand Up @@ -78,7 +80,7 @@ check:

test/unit:
@echo "Running unit tests"
@go test -count=1 -short ./pkg/controller/...
$(GO) test -count=1 -short ./pkg/controller/...
@echo

test/e2e:
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@

## Requirements

* sops - 3.5.0
* operator-sdk 0.13.0
* golang - 1.13.4

### AWS

* Create KMS key
Expand Down
2 changes: 1 addition & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.access.redhat.com/ubi7/ubi-minimal:latest
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest

ENV OPERATOR=/usr/local/bin/sops-secrets-operator \
USER_UID=1001 \
Expand Down
4 changes: 2 additions & 2 deletions chart/sops-secrets-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
version: 0.1.6
appVersion: 0.0.8
version: 0.1.7
appVersion: 0.0.9
description: sops secrets operator
name: sops-secrets-operator
sources:
Expand Down
2 changes: 1 addition & 1 deletion chart/sops-secrets-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ replicaCount: 1

image:
repository: isindir/sops-secrets-operator
tag: 0.0.8
tag: 0.0.9
pullPolicy: AlwaysPull

imagePullSecrets: []
Expand Down
6 changes: 4 additions & 2 deletions cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (

"github.com/isindir/sops-secrets-operator/pkg/apis"
"github.com/isindir/sops-secrets-operator/pkg/controller"
"github.com/isindir/sops-secrets-operator/version"

"github.com/operator-framework/operator-sdk/pkg/k8sutil"
kubemetrics "github.com/operator-framework/operator-sdk/pkg/kube-metrics"
Expand All @@ -25,9 +26,9 @@ import (
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/util/intstr"
"sigs.k8s.io/controller-runtime/pkg/client/config"
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/manager"
logf "sigs.k8s.io/controller-runtime/pkg/runtime/log"
"sigs.k8s.io/controller-runtime/pkg/runtime/signals"
"sigs.k8s.io/controller-runtime/pkg/manager/signals"
)

// Change below variables to serve metrics on different host or port.
Expand All @@ -39,6 +40,7 @@ var (
var log = logf.Log.WithName("cmd")

func printVersion() {
log.Info(fmt.Sprintf("Operator Version: %s", version.Version))
log.Info(fmt.Sprintf("Go Version: %s", runtime.Version()))
log.Info(fmt.Sprintf("Go OS/Arch: %s/%s", runtime.GOOS, runtime.GOARCH))
log.Info(fmt.Sprintf("Version of operator-sdk: %v", sdkVersion.Version))
Expand Down
80 changes: 37 additions & 43 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,51 +1,45 @@
module github.com/isindir/sops-secrets-operator

go 1.13

require (
github.com/Azure/azure-sdk-for-go v30.0.0+incompatible // indirect
github.com/aws/aws-sdk-go v1.19.41 // indirect
github.com/dimchansky/utfbom v1.1.0 // indirect
github.com/fatih/color v1.7.0 // indirect
github.com/Azure/go-autorest/autorest/azure/auth v0.4.2 // indirect
github.com/go-logr/logr v0.1.0
github.com/go-openapi/spec v0.19.0
github.com/goware/prefixer v0.0.0-20160118172347-395022866408 // indirect
github.com/howeyc/gopass v0.0.0-20170109162249-bf9dde6d0d2c // indirect
github.com/lib/pq v1.1.1 // indirect
github.com/mattn/go-colorable v0.1.2 // indirect
github.com/mozilla-services/yaml v0.0.0-20180922153656-28ffe5d0cafb // indirect
github.com/operator-framework/operator-sdk v0.10.1-0.20190809191117-c1e2eae6580e
github.com/spf13/pflag v1.0.3
go.mozilla.org/gopgagent v0.0.0-20170926210634-4d7ea76ff71a // indirect
go.mozilla.org/sops v0.0.0-20190611200209-e9e1e87723c8
k8s.io/api v0.0.0-20190612125737-db0771252981
k8s.io/apimachinery v0.0.0-20190612125636-6a5db36e93ad
k8s.io/client-go v11.0.0+incompatible
k8s.io/code-generator v0.0.0-20181203235156-f8cba74510f3
k8s.io/gengo v0.0.0-20190327210449-e17681d19d3a
k8s.io/kube-openapi v0.0.0-20190603182131-db7b694dc208
sigs.k8s.io/controller-runtime v0.1.12
sigs.k8s.io/controller-tools v0.1.10
)

// Pinned to kubernetes-1.13.4
replace (
k8s.io/api => k8s.io/api v0.0.0-20190222213804-5cb15d344471
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.0.0-20190228180357-d002e88f6236
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20190221213512-86fb29eff628
k8s.io/client-go => k8s.io/client-go v0.0.0-20190228174230-b40b2a5939e4
github.com/go-openapi/spec v0.19.2
github.com/operator-framework/operator-sdk v0.13.0
github.com/spf13/pflag v1.0.5
go.mozilla.org/sops/v3 v3.5.0
k8s.io/api v0.0.0
k8s.io/apimachinery v0.0.0
k8s.io/client-go v12.0.0+incompatible
k8s.io/code-generator v0.2.4
k8s.io/gengo v0.0.0-20191010091904-7fa3014cb28f
k8s.io/kube-openapi v0.0.0-20190918143330-0270cf2f1c1d
sigs.k8s.io/controller-runtime v0.4.0
)

// Pinned to kubernetes-1.16.2
replace (
github.com/coreos/prometheus-operator => github.com/coreos/prometheus-operator v0.29.0
// Pinned to v2.9.2 (kubernetes-1.13.1) so https://proxy.golang.org can
// resolve it correctly.
github.com/prometheus/prometheus => github.com/prometheus/prometheus v0.0.0-20190424153033-d3245f150225
k8s.io/code-generator => k8s.io/code-generator v0.0.0-20181117043124-c2090bec4d9b
k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20180711000925-0cf8f7e6ed1d
k8s.io/kube-state-metrics => k8s.io/kube-state-metrics v1.6.0
sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.1.12
sigs.k8s.io/controller-tools => sigs.k8s.io/controller-tools v0.1.11-0.20190411181648-9d55346c2bde
github.com/operator-framework/operator-sdk => github.com/operator-framework/operator-sdk v0.13.0
k8s.io/api => k8s.io/api v0.0.0-20191016110408-35e52d86657a
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.0.0-20191016113550-5357c4baaf65
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20191004115801-a2eda9f80ab8
k8s.io/apiserver => k8s.io/apiserver v0.0.0-20191016112112-5190913f932d
k8s.io/cli-runtime => k8s.io/cli-runtime v0.0.0-20191016114015-74ad18325ed5
k8s.io/client-go => k8s.io/client-go v0.0.0-20191016111102-bec269661e48
k8s.io/cloud-provider => k8s.io/cloud-provider v0.0.0-20191016115326-20453efc2458
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.0.0-20191016115129-c07a134afb42
k8s.io/code-generator => k8s.io/code-generator v0.0.0-20191004115455-8e001e5d1894
k8s.io/component-base => k8s.io/component-base v0.0.0-20191016111319-039242c015a9
k8s.io/cri-api => k8s.io/cri-api v0.0.0-20190828162817-608eb1dad4ac
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.0.0-20191016115521-756ffa5af0bd
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.0.0-20191016112429-9587704a8ad4
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.0.0-20191016114939-2b2b218dc1df
k8s.io/kube-proxy => k8s.io/kube-proxy v0.0.0-20191016114407-2e83b6f20229
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.0.0-20191016114748-65049c67a58b
k8s.io/kubectl => k8s.io/kubectl v0.0.0-20191016120415-2ed914427d51
k8s.io/kubelet => k8s.io/kubelet v0.0.0-20191016114556-7841ed97f1b2
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.0.0-20191016115753-cf0698c3a16b
k8s.io/metrics => k8s.io/metrics v0.0.0-20191016113814-3b1a734dba6e
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.0.0-20191016112829-06bb3c9d77c9
)

replace github.com/operator-framework/operator-sdk => github.com/operator-framework/operator-sdk v0.10.0

go 1.13
Loading

0 comments on commit ef00f5f

Please sign in to comment.