Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: re-enable external secrets #25

Merged
merged 3 commits into from
Mar 15, 2024
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
2 changes: 1 addition & 1 deletion .codegen/preserved-assets/externaldns_types.go.bak
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2023.
Copyright 2024.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ package mutate

import (
"fmt"

"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"sigs.k8s.io/controller-runtime/pkg/client"
"strings"

"github.com/nukleros/operator-builder-tools/pkg/controller/workload"
"github.com/nukleros/operator-builder-tools/pkg/resources"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"sigs.k8s.io/controller-runtime/pkg/client"

gatewayv1alpha1 "github.com/nukleros/support-services-operator/apis/gateway/v1alpha1"
orchestrationv1alpha1 "github.com/nukleros/support-services-operator/apis/orchestration/v1alpha1"
Expand Down Expand Up @@ -51,7 +51,8 @@ func MutateGatewayNamespaceGatewayProxy(
// create a gateway object for each port requested
for _, portSpec := range parent.Spec.Ports {

if portSpec.Protocol != "HTTP" {
// only create a gateway object for http ports
if strings.ToLower(portSpec.Protocol) != "http" {
continue
}

Expand Down
2 changes: 1 addition & 1 deletion .codegen/secrets/external-secrets/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
labels:
app.kubernetes.io/name: external-secrets-webhook
app.kubernetes.io/instance: external-secrets
app.kubernetes.io/version: v0.5.9 # +operator-builder:field:name=version,default="v0.5.9",type=string
app.kubernetes.io/version: v0.9.11 # +operator-builder:field:name=version,default="v0.9.11",type=string
external-secrets.io/component: webhook
platform.nukleros.io/group: secrets
platform.nukleros.io/project: external-secrets
6,519 changes: 4,899 additions & 1,620 deletions .codegen/secrets/external-secrets/crds.yaml

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions .codegen/secrets/external-secrets/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
labels:
app.kubernetes.io/name: external-secrets-cert-controller
app.kubernetes.io/instance: external-secrets
app.kubernetes.io/version: v0.5.9 # +operator-builder:field:name=version,default="v0.5.9",type=string
app.kubernetes.io/version: v0.9.11 # +operator-builder:field:name=version,default="v0.9.11",type=string
platform.nukleros.io/group: secrets
platform.nukleros.io/project: external-secrets
spec:
Expand All @@ -31,7 +31,7 @@ spec:
- name: cert-controller
# +operator-builder:field:name=image,default=ghcr.io/external-secrets/external-secrets,type=string,replace="externalSecretsImage",description=`
# Image repo and name to use for external-secrets.`
# +operator-builder:field:name=version,default="v0.5.9",type=string,replace="externalSecretsVersion",description=`
# +operator-builder:field:name=version,default="v0.9.11",type=string,replace="externalSecretsVersion",description=`
# Version of external-secrets to use.`
image: externalSecretsImage:externalSecretsVersion
imagePullPolicy: IfNotPresent
Expand Down Expand Up @@ -90,7 +90,7 @@ metadata:
labels:
app.kubernetes.io/name: external-secrets
app.kubernetes.io/instance: external-secrets
app.kubernetes.io/version: v0.5.9 # +operator-builder:field:name=version,default="v0.5.9",type=string
app.kubernetes.io/version: v0.9.11 # +operator-builder:field:name=version,default="v0.9.11",type=string
platform.nukleros.io/group: secrets
platform.nukleros.io/project: external-secrets
spec:
Expand All @@ -114,7 +114,7 @@ spec:
- name: external-secrets
# +operator-builder:field:name=image,default=ghcr.io/external-secrets/external-secrets,type=string,replace="externalSecretsImage",description=`
# Image repo and name to use for external-secrets.`
# +operator-builder:field:name=version,default="v0.5.9",type=string,replace="externalSecretsVersion",description=`
# +operator-builder:field:name=version,default="v0.9.11",type=string,replace="externalSecretsVersion",description=`
# Version of external-secrets to use.`
image: externalSecretsImage:externalSecretsVersion
imagePullPolicy: IfNotPresent
Expand Down Expand Up @@ -162,7 +162,7 @@ metadata:
labels:
app.kubernetes.io/name: external-secrets-webhook
app.kubernetes.io/instance: external-secrets
app.kubernetes.io/version: v0.5.9 # +operator-builder:field:name=version,default="v0.5.9",type=string
app.kubernetes.io/version: v0.9.11 # +operator-builder:field:name=version,default="v0.9.11",type=string
platform.nukleros.io/group: secrets
platform.nukleros.io/project: external-secrets
spec:
Expand All @@ -187,7 +187,7 @@ spec:
- name: webhook
# +operator-builder:field:name=image,default=ghcr.io/external-secrets/external-secrets,type=string,replace="externalSecretsImage",description=`
# Image repo and name to use for external-secrets.`
# +operator-builder:field:name=version,default="v0.5.9",type=string,replace="externalSecretsVersion",description=`
# +operator-builder:field:name=version,default="v0.9.11",type=string,replace="externalSecretsVersion",description=`
# Version of external-secrets to use.`
image: externalSecretsImage:externalSecretsVersion
imagePullPolicy: IfNotPresent
Expand Down
82 changes: 71 additions & 11 deletions .codegen/secrets/external-secrets/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
labels:
app.kubernetes.io/name: external-secrets-cert-controller
app.kubernetes.io/instance: external-secrets
app.kubernetes.io/version: v0.5.9 # +operator-builder:field:name=version,default="v0.5.9",type=string
app.kubernetes.io/version: v0.9.11 # +operator-builder:field:name=version,default="v0.9.11",type=string
platform.nukleros.io/group: secrets
platform.nukleros.io/project: external-secrets
---
Expand All @@ -16,10 +16,14 @@ kind: ServiceAccount
metadata:
name: external-secrets
namespace: nukleros-secrets-system # +operator-builder:field:name=namespace,default="nukleros-secrets-system",type=string
annotations:
# +operator-builder:field:name=iamRoleArn,type=string,description=`
# On AWS, the IAM Role ARN that gives external-secrets access to SecretsManager`
eks.amazonaws.com/role-arn: iam_role_arn
labels:
app.kubernetes.io/name: external-secrets
app.kubernetes.io/instance: external-secrets
app.kubernetes.io/version: v0.5.9 # +operator-builder:field:name=version,default="v0.5.9",type=string
app.kubernetes.io/version: v0.9.11 # +operator-builder:field:name=version,default="v0.9.11",type=string
platform.nukleros.io/group: secrets
platform.nukleros.io/project: external-secrets
---
Expand All @@ -31,7 +35,7 @@ metadata:
labels:
app.kubernetes.io/name: external-secrets-webhook
app.kubernetes.io/instance: external-secrets
app.kubernetes.io/version: v0.5.9 # +operator-builder:field:name=version,default="v0.5.9",type=string
app.kubernetes.io/version: v0.9.11 # +operator-builder:field:name=version,default="v0.9.11",type=string
platform.nukleros.io/group: secrets
platform.nukleros.io/project: external-secrets
---
Expand All @@ -42,7 +46,7 @@ metadata:
labels:
app.kubernetes.io/name: external-secrets-cert-controller
app.kubernetes.io/instance: external-secrets
app.kubernetes.io/version: v0.5.9 # +operator-builder:field:name=version,default="v0.5.9",type=string
app.kubernetes.io/version: v0.9.11 # +operator-builder:field:name=version,default="v0.9.11",type=string
platform.nukleros.io/group: secrets
platform.nukleros.io/project: external-secrets
rules:
Expand Down Expand Up @@ -91,6 +95,15 @@ rules:
- watch
- update
- patch
- apiGroups:
- "coordination.k8s.io"
resources:
- "leases"
verbs:
- "get"
- "create"
- "update"
- "patch"
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand All @@ -99,7 +112,7 @@ metadata:
labels:
app.kubernetes.io/name: external-secrets
app.kubernetes.io/instance: external-secrets
app.kubernetes.io/version: v0.5.9 # +operator-builder:field:name=version,default="v0.5.9",type=string
app.kubernetes.io/version: v0.9.11 # +operator-builder:field:name=version,default="v0.9.11",type=string
platform.nukleros.io/group: secrets
platform.nukleros.io/project: external-secrets
rules:
Expand All @@ -110,6 +123,7 @@ rules:
- clustersecretstores
- externalsecrets
- clusterexternalsecrets
- pushsecrets
verbs:
- get
- list
Expand All @@ -129,9 +143,25 @@ rules:
- clusterexternalsecrets
- clusterexternalsecrets/status
- clusterexternalsecrets/finalizers
- pushsecrets
- pushsecrets/status
- pushsecrets/finalizers
verbs:
- update
- patch
- apiGroups:
- generators.external-secrets.io
resources:
- acraccesstokens
- ecrauthorizationtokens
- fakes
- gcraccesstokens
- passwords
- vaultdynamicsecrets
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
Expand Down Expand Up @@ -181,6 +211,7 @@ rules:
verbs:
- create
- update
- delete
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand All @@ -189,7 +220,7 @@ metadata:
labels:
app.kubernetes.io/name: external-secrets
app.kubernetes.io/instance: external-secrets
app.kubernetes.io/version: v0.5.9 # +operator-builder:field:name=version,default="v0.5.9",type=string
app.kubernetes.io/version: v0.9.11 # +operator-builder:field:name=version,default="v0.9.11",type=string
rbac.authorization.k8s.io/aggregate-to-view: "true"
rbac.authorization.k8s.io/aggregate-to-edit: "true"
rbac.authorization.k8s.io/aggregate-to-admin: "true"
Expand All @@ -202,6 +233,20 @@ rules:
- externalsecrets
- secretstores
- clustersecretstores
- pushsecrets
verbs:
- get
- watch
- list
- apiGroups:
- generators.external-secrets.io
resources:
- acraccesstokens
- ecrauthorizationtokens
- fakes
- gcraccesstokens
- passwords
- vaultdynamicsecrets
verbs:
- get
- watch
Expand All @@ -214,7 +259,7 @@ metadata:
labels:
app.kubernetes.io/name: external-secrets
app.kubernetes.io/instance: external-secrets
app.kubernetes.io/version: v0.5.9 # +operator-builder:field:name=version,default="v0.5.9",type=string
app.kubernetes.io/version: v0.9.11 # +operator-builder:field:name=version,default="v0.9.11",type=string
rbac.authorization.k8s.io/aggregate-to-edit: "true"
rbac.authorization.k8s.io/aggregate-to-admin: "true"
platform.nukleros.io/group: secrets
Expand All @@ -232,6 +277,21 @@ rules:
- deletecollection
- patch
- update
- apiGroups:
- generators.external-secrets.io
resources:
- acraccesstokens
- ecrauthorizationtokens
- fakes
- gcraccesstokens
- passwords
- vaultdynamicsecrets
verbs:
- create
- delete
- deletecollection
- patch
- update
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
Expand All @@ -240,7 +300,7 @@ metadata:
labels:
app.kubernetes.io/name: external-secrets-cert-controller
app.kubernetes.io/instance: external-secrets
app.kubernetes.io/version: v0.5.9 # +operator-builder:field:name=version,default="v0.5.9",type=string
app.kubernetes.io/version: v0.9.11 # +operator-builder:field:name=version,default="v0.9.11",type=string
platform.nukleros.io/group: secrets
platform.nukleros.io/project: external-secrets
roleRef:
Expand All @@ -259,7 +319,7 @@ metadata:
labels:
app.kubernetes.io/name: external-secrets
app.kubernetes.io/instance: external-secrets
app.kubernetes.io/version: v0.5.9 # +operator-builder:field:name=version,default="v0.5.9",type=string
app.kubernetes.io/version: v0.9.11 # +operator-builder:field:name=version,default="v0.9.11",type=string
platform.nukleros.io/group: secrets
platform.nukleros.io/project: external-secrets
roleRef:
Expand All @@ -279,7 +339,7 @@ metadata:
labels:
app.kubernetes.io/name: external-secrets
app.kubernetes.io/instance: external-secrets
app.kubernetes.io/version: v0.5.9 # +operator-builder:field:name=version,default="v0.5.9",type=string
app.kubernetes.io/version: v0.9.11 # +operator-builder:field:name=version,default="v0.9.11",type=string
platform.nukleros.io/group: secrets
platform.nukleros.io/project: external-secrets
rules:
Expand Down Expand Up @@ -317,7 +377,7 @@ metadata:
labels:
app.kubernetes.io/name: external-secrets
app.kubernetes.io/instance: external-secrets
app.kubernetes.io/version: v0.5.9 # +operator-builder:field:name=version,default="v0.5.9",type=string
app.kubernetes.io/version: v0.9.11 # +operator-builder:field:name=version,default="v0.9.11",type=string
platform.nukleros.io/group: secrets
platform.nukleros.io/project: external-secrets
roleRef:
Expand Down
2 changes: 1 addition & 1 deletion .codegen/secrets/external-secrets/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
labels:
app.kubernetes.io/name: external-secrets-webhook
app.kubernetes.io/instance: external-secrets
app.kubernetes.io/version: v0.5.9 # +operator-builder:field:name=version,default="v0.5.9",type=string
app.kubernetes.io/version: v0.9.11 # +operator-builder:field:name=version,default="v0.9.11",type=string
external-secrets.io/component: webhook
platform.nukleros.io/group: secrets
platform.nukleros.io/project: external-secrets
Expand Down
2 changes: 1 addition & 1 deletion .codegen/workload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
componentFiles:
- certificates/cert-manager/workload.yaml
- gateway/external-dns/workload.yaml
# - secrets/external-secrets/workload.yaml
- secrets/external-secrets/workload.yaml
# - secrets/reloader/workload.yaml
- gateway/gloo-edge/workload.yaml
resources:
Expand Down
8 changes: 8 additions & 0 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ resources:
kind: ExternalDNS
path: github.com/nukleros/support-services-operator/apis/gateway/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
controller: true
domain: support-services.nukleros.io
group: secrets
kind: ExternalSecrets
path: github.com/nukleros/support-services-operator/apis/secrets/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
controller: true
Expand Down
2 changes: 1 addition & 1 deletion apis/certificates/certmanager.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2023.
Copyright 2024.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion apis/certificates/certmanager_latest.go

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

2 changes: 1 addition & 1 deletion apis/certificates/v1alpha1/certmanager/constants/names.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2023.
Copyright 2024.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion apis/certificates/v1alpha1/certmanager/crds.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2023.
Copyright 2024.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion apis/certificates/v1alpha1/certmanager/deployment.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2023.
Copyright 2024.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion apis/certificates/v1alpha1/certmanager/issuer.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2023.
Copyright 2024.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2023.
Copyright 2024.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2023.
Copyright 2024.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2023.
Copyright 2024.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Loading
Loading