first commit

This commit is contained in:
2025-11-07 13:07:23 +01:00
commit 291cc4c48c
6 changed files with 61 additions and 0 deletions

16
.editorconfig Normal file
View File

@@ -0,0 +1,16 @@
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
quote_type = single
[{Makefile,**.mk}]
indent_style = tab

4
.prettierrc Normal file
View File

@@ -0,0 +1,4 @@
{
"singleQuote": true,
"trailingComma": "all"
}

10
.vscode/extensions.json vendored Normal file
View File

@@ -0,0 +1,10 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"EditorConfig.EditorConfig",
// Code formatter using prettier
"esbenp.prettier-vscode",
"nefrob.vscode-just-syntax"
]
}

5
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,5 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.formatOnPaste": false
}

1
README.md Normal file
View File

@@ -0,0 +1 @@
# devops-scripts

25
bin/convert-to-sealed Executable file
View File

@@ -0,0 +1,25 @@
#!/bin/bash
# Determine the Sealed Secrets namespace
if kubectl get ns sealed-secrets &>/dev/null; then
NAMESPACE="sealed-secrets"
elif kubectl get ns kube-tools-system &>/dev/null; then
NAMESPACE="kube-tools-system"
else
echo "No valid Sealed Secrets namespace found (sealed-secrets or kube-tools-system)."
exit 1
fi
# Seal the secret
if [[ -f "secret.yml" ]]; then
cat secret.yml | kubeseal --controller-namespace "$NAMESPACE" --controller-name sealed-secrets --format yaml > SealedSecret.yml
echo "SealedSecret.yml has been created in namespace $NAMESPACE."
elif [[ -f "secret.yaml" ]]; then
cat secret.yaml | kubeseal --controller-namespace "$NAMESPACE" --controller-name sealed-secrets --format yaml > SealedSecret.yaml
echo "SealedSecret.yaml has been created in namespace $NAMESPACE."
else
echo "Neither secret.yml nor secret.yaml found."
exit 1
fi