Skip to content

Commit

Permalink
feat(sealed-secret-crds): new chart (#734)
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
  • Loading branch information
nlamirault committed May 10, 2024
1 parent 4f04ea4 commit e574fdc
Show file tree
Hide file tree
Showing 6 changed files with 274 additions and 0 deletions.
42 changes: 42 additions & 0 deletions charts/sealed-secrets-crds/Chart.yaml
@@ -0,0 +1,42 @@
---
apiVersion: v2
description: Sealed Secrets CRDs
name: sealed-secret-crds
version: 1.0.0
appVersion: 0.26.2
home: https://sealed-secrets.netlify.app/
icon: https://bitnami.com/assets/stacks/sealed-secrets/img/sealed-secrets-stack-220x234.png
sources:
- https://github.com/portefaix/portefaix-hub
- https://github.com/bitnami-labs/sealed-secrets
keywords:
- secrets
- sealed-secrets
- crds

dependencies:
- name: crds
version: "0.0.0"

maintainers:
- name: nlamirault
email: nicolas.lamirault@gmail.com
url: https://github.com/nlamirault

# https://artifacthub.io/docs/topics/repositories/
annotations:
artifacthub.io/license: Apache-2.0
artifacthub.io/links: |
- name: Sealed Secrets
url: https://sealed-secrets.netlify.app/
- name: Portefaix Hub
url: https://github.com/portefaix/portefaix-hub
artifacthub.io/maintainers: |
- name: nlamirault
email: nicolas.lamirault@gmail.com
artifacthub.io/signKey: |
fingerprint: C39918B3EBDE35C23B8D0B8E5F99269A6FCA437C
url: https://keybase.io/nlamirault/pgp_keys.asc
artifacthub.io/changes: |
- kind: added
description: Init chart
33 changes: 33 additions & 0 deletions charts/sealed-secrets-crds/README.md
@@ -0,0 +1,33 @@
# sealed-secret-crds

![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![AppVersion: 0.26.2](https://img.shields.io/badge/AppVersion-0.26.2-informational?style=flat-square)

Sealed Secrets CRDs

**Homepage:** <https://sealed-secrets.netlify.app/>

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| nlamirault | <nicolas.lamirault@gmail.com> | <https://github.com/nlamirault> |

## Source Code

* <https://github.com/portefaix/portefaix-hub>
* <https://github.com/bitnami-labs/sealed-secrets>

## Requirements

| Repository | Name | Version |
|------------|------|---------|
| | crds | 0.0.0 |

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| crds.annotations | object | `{}` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.3](https://github.com/norwoodj/helm-docs/releases/v1.11.3)
4 changes: 4 additions & 0 deletions charts/sealed-secrets-crds/charts/crds/Chart.yaml
@@ -0,0 +1,4 @@
---
apiVersion: v2
name: crds
version: 0.0.0
@@ -0,0 +1,157 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
{{- with .Values.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
controller-gen.kubebuilder.io/version: v0.12.0
name: sealedsecrets.bitnami.com
spec:
group: bitnami.com
names:
kind: SealedSecret
listKind: SealedSecretList
plural: sealedsecrets
singular: sealedsecret
scope: Namespaced
versions:
- additionalPrinterColumns:
- jsonPath: .status.conditions[0].message
name: Status
type: string
- jsonPath: .status.conditions[0].status
name: Synced
type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1alpha1
schema:
openAPIV3Schema:
description: SealedSecret is the K8s representation of a "sealed Secret" -
a regular k8s Secret that has been sealed (encrypted) using the controller's
key.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: SealedSecretSpec is the specification of a SealedSecret
properties:
data:
description: Data is deprecated and will be removed eventually. Use
per-value EncryptedData instead.
format: byte
type: string
encryptedData:
additionalProperties:
type: string
type: object
x-kubernetes-preserve-unknown-fields: true
template:
description: Template defines the structure of the Secret that will
be created from this sealed secret.
properties:
data:
additionalProperties:
type: string
description: Keys that should be templated using decrypted data
nullable: true
type: object
metadata:
description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata'
nullable: true
properties:
annotations:
additionalProperties:
type: string
type: object
finalizers:
items:
type: string
type: array
labels:
additionalProperties:
type: string
type: object
name:
type: string
namespace:
type: string
type: object
x-kubernetes-preserve-unknown-fields: true
type:
description: Used to facilitate programmatic handling of secret
data.
type: string
immutable:
description: 'Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified).
If not set to true, the field can be modified at any time. Defaulted to nil.'
type: boolean
type: object
required:
- encryptedData
type: object
status:
description: SealedSecretStatus is the most recently observed status of
the SealedSecret.
properties:
conditions:
description: Represents the latest available observations of a sealed
secret's current state.
items:
description: SealedSecretCondition describes the state of a sealed
secret at a certain point.
properties:
lastTransitionTime:
description: Last time the condition transitioned from one status
to another.
format: date-time
type: string
lastUpdateTime:
description: The last time this condition was updated.
format: date-time
type: string
message:
description: A human readable message indicating details about
the transition.
type: string
reason:
description: The reason for the condition's last transition.
type: string
status:
description: 'Status of the condition for a sealed secret. Valid
values for "Synced": "True", "False", or "Unknown".'
type: string
type:
description: 'Type of condition for a sealed secret. Valid value:
"Synced"'
type: string
required:
- status
- type
type: object
type: array
observedGeneration:
description: ObservedGeneration reflects the generation most recently
observed by the sealed-secrets controller.
format: int64
type: integer
type: object
required:
- spec
type: object
served: true
storage: true
subresources:
status: {}
33 changes: 33 additions & 0 deletions charts/sealed-secrets-crds/hack/update_crds.sh
@@ -0,0 +1,33 @@
#!/bin/bash

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

FILES=(
"bitnami.com_sealedsecrets.yaml"
)

VERSION=$(grep appVersion ${SCRIPT_DIR}/../Chart.yaml | awk -F" " '{ print $2 }')
echo "Gateway API: ${VERSION}"

if [[ "$OSTYPE" == "linux-gnu"* ]]; then
SED="sed"
elif [[ "$OSTYPE" == "darwin"* ]]; then
SED="gsed"
fi

for file in "${FILES[@]}"; do
echo "CRD: ${file}"
# URL="https://raw.githubusercontent.com/bitnami-labs/sealed-secrets/helm-v${VERSION}/helm/sealed-secrets/crds/${file}"
URL="https://raw.githubusercontent.com/bitnami-labs/sealed-secrets/v${VERSION}/helm/sealed-secrets/crds/${file}"
if ! curl --silent --retry-all-errors --fail --location "${URL}" > "${SCRIPT_DIR}/../charts/crds/templates/${file}"; then
echo -e "Failed to download ${URL}"
exit 1
fi

# Update or insert annotations block
if yq -e '.metadata.annotations' "${SCRIPT_DIR}/../charts/crds/templates/${file}" >/dev/null; then
${SED} -i '/^ annotations:$/a {{- with .Values.annotations }}\n{{- toYaml . | nindent 4 }}\n{{- end }}' "${SCRIPT_DIR}/../charts/crds/templates/${file}"
else
${SED} -i '/^metadata:$/a {{- with .Values.annotations }}\n annotations:\n{{- toYaml . | nindent 4 }}\n{{- end }}' "${SCRIPT_DIR}/../charts/crds/templates/${file}"
fi
done
5 changes: 5 additions & 0 deletions charts/sealed-secrets-crds/values.yaml
@@ -0,0 +1,5 @@
---
## Annotations for CRDs
##
crds:
annotations: {}

0 comments on commit e574fdc

Please sign in to comment.