Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
uses: actions/checkout@v1

- name: Setup Go
uses: actions/setup-go@v1
uses: actions/setup-go@v2
with:
go-version: "1.14"
go-version: 1.16

- uses: actions/cache@v1
with:
Expand Down
12 changes: 3 additions & 9 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,14 @@ before:
hooks:
- go mod download
builds:
- main: cmd/manager/main.go
- main: main.go
binary: sops-operator
env:
- CGO_ENABLED=0
goarch:
- arm
- amd64
goos:
- linux
- darwin
- windows
ldflags:
- >-
-X github.com/craftypath/sops-operator/pkg/version.Version={{ .Tag }}
Expand All @@ -23,16 +20,13 @@ checksum:
snapshot:
name_template: "{{ .Tag }}-next"
archives:
- format_overrides:
- goos: windows
format: zip
files:
- files:
- LICENSE
- README.md
dockers:
- goos: linux
goarch: amd64
binaries:
ids:
- sops-operator
skip_push: false
dockerfile: build/Dockerfile
Expand Down
36 changes: 36 additions & 0 deletions api/v1alpha1/groupversion_info.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
Copyright The SOPS Operator Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

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.
*/

// Package v1alpha1 contains API Schema definitions for the v1alpha1 API group
//+kubebuilder:object:generate=true
//+groupName=craftypath.github.io
package v1alpha1

import (
"k8s.io/apimachinery/pkg/runtime/schema"
"sigs.k8s.io/controller-runtime/pkg/scheme"
)

var (
// GroupVersion is group version used to register these objects
GroupVersion = schema.GroupVersion{Group: "craftypath.github.io", Version: "v1alpha1"}

// SchemeBuilder is used to add go types to the GroupVersionKind scheme
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

// AddToScheme adds the types in this group-version to the given scheme.
AddToScheme = SchemeBuilder.AddToScheme
)
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
// Copyright The SOPS Operator Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// 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.
/*
Copyright The SOPS Operator Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

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.
*/

package v1alpha1

import (
v1 "k8s.io/api/core/v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// SopsSecretObjectMeta defines metadata for generated Secrets.
type SopsSecretObjectMeta struct {
// Annotations allows adding annotations to generated Secrets.
Expand All @@ -42,7 +47,7 @@ type SopsSecretSpec struct {

// Type specifies the type of the secret.
// +optional
Type v1.SecretType `json:"type,omitempty"`
Type corev1.SecretType `json:"type,omitempty"`
}

// SopsSecretStatus defines the observed state of SopsSecret.
Expand All @@ -52,23 +57,21 @@ type SopsSecretStatus struct {
Status string `json:"status,omitempty"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
//+kubebuilder:object:root=true
//+kubebuilder:subresource:status

// SopsSecret is the Schema for the sopssecrets API.
// +kubebuilder:subresource:status
// +kubebuilder:resource:path=sopssecrets,scope=Namespaced
// SopsSecret is the Schema for the sopssecrets API
type SopsSecret struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec SopsSecretSpec `json:"spec"`
// +optional
Spec SopsSecretSpec `json:"spec,omitempty"`
Status SopsSecretStatus `json:"status,omitempty"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
//+kubebuilder:object:root=true

// SopsSecretList contains a list of SopsSecret.
// SopsSecretList contains a list of SopsSecret
type SopsSecretList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion check_license_headers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ regex_find() {
check_header() {
local file="$1"

grep -q '// Copyright The SOPS Operator Authors' "$file"
grep -q 'Copyright The SOPS Operator Authors.' "$file"
grep -q 'https://www.apache.org/licenses/LICENSE-2.0' "$file"
}

Expand Down
Loading