diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..d207b18 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.go text eol=lf diff --git a/.gitignore b/.gitignore index 425265a..038b887 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,4 @@ .DS_Store .direnv temp -charts \ No newline at end of file +charts diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..0de71e0 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,20 @@ +--- +default: + image: nixos/nix:latest + retry: 2 + before_script: + - nix-channel --update + +stages: + - test + - build + - release + - deploy + +lint.yaml: + script: yamllint -f auto . + stage: test + +lint.markdown: + script: mdl . + stage: test diff --git a/.helmignore b/.helmignore index d49be25..3a3f246 100644 --- a/.helmignore +++ b/.helmignore @@ -25,4 +25,4 @@ .vscode/ # Nix -.direnv \ No newline at end of file +.direnv diff --git a/.mdlrc b/.mdlrc new file mode 100644 index 0000000..ca01edd --- /dev/null +++ b/.mdlrc @@ -0,0 +1 @@ +rules "MD003", "MD006", "MD011", "MD018", "MD019", "MD020", "MD021", "MD025", "MD027", "MD028" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..cbbc5a5 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,12 @@ +--- +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.3.0 + hooks: + - id: check-yaml + exclude: ^templates/ + - id: mixed-line-ending + - id: trailing-whitespace + - id: fix-byte-order-marker + - id: end-of-file-fixer + - id: check-merge-conflict diff --git a/.yamllint.yaml b/.yamllint.yaml new file mode 100644 index 0000000..5f1903e --- /dev/null +++ b/.yamllint.yaml @@ -0,0 +1,40 @@ +--- +extends: default +yaml-files: + - "*.yaml" + - "*.yml" + - ".yaml*" +ignore: | + ./charts + .direnv +locale: en_US.UTF-8 +rules: + braces: enable + brackets: enable + colons: enable + commas: enable + comments: + require-starting-space: true + level: warning + comments-indentation: + level: warning + document-start: + level: warning + document-end: disable + empty-lines: disable + empty-values: enable + hyphens: enable + indentation: + spaces: 2 + indent-sequences: consistent + level: warning + line-length: + max: 150 + allow-non-breakable-words: true + allow-non-breakable-inline-mappings: true + key-duplicates: enable + key-ordering: disable + new-line-at-end-of-file: enable + new-lines: enable + trailing-spaces: enable + truthy: enable diff --git a/shell.nix b/shell.nix index 750dde5..bfd6d69 100644 --- a/shell.nix +++ b/shell.nix @@ -4,75 +4,51 @@ with pkgs; mkShell { name = "fcoscore-chart"; nativeBuildInputs = with pkgs; [ - # tooling - libcap - typos - grpcurl - httpie - jq - - pre-commit - python310Packages.pip - - bazel_5 + chart-testing + delve + dgoss + dotenv-linter + editorconfig-checker git git-lfs gitlint gnumake - go go-outline go-tools gocode gocode-gomod - delve - godef golangci-lint gopkgs gopls - ansible-lint - dotenv-linter - editorconfig-checker - + goss + grype hadolint - mdl - mdsh - pre-commit - shellcheck - shfmt - yaml-language-server - yamllint - - rnix-lsp - nix-build-uncached - nix-linter - nixpkgs-fmt - - docker k9s kube3d + kubebuilder + kubeconform kubectl kubectx kubernetes-helm - kustomize - kubebuilder kubeval kubeval-schema - kubeconform - chart-testing + kustomize + mdl + mdsh + nix-build-uncached + nix-linter + nixpkgs-fmt + pre-commit + rnix-lsp + shfmt skaffold - dgoss - goss - grype trivy - yamale - chart-testing - ansible - glab vscodium-fhs - - # vscodium.fhsWithPackages (pkgs: with pkgs; [] ) + yamale + yaml-language-server + yamllint ]; postInstall = '' diff --git a/templates/NOTES.txt b/templates/NOTES.txt index 32d5e19..97fe5a5 100644 --- a/templates/NOTES.txt +++ b/templates/NOTES.txt @@ -1,11 +1,11 @@ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> - ________ ________ ________ ________ ___ _________ ___ ___ ________ ________ -|\ _____\\ __ \|\ __ \ |\ ____\|\ \|\___ ___\ |\ \ / /| |\ __ \|\ ____\ -\ \ \__/\ \ \|\ \ \ \|\ /_ \ \ \___|\ \ \|___ \ \_| \ \ \/ / / \ \ \|\ \ \ \___|_ - \ \ __\\ \ __ \ \ __ \ \ \ \ \ \ \ \ \ \ \ \ / / \ \ \\\ \ \_____ \ - \ \ \_| \ \ \ \ \ \ \|\ \ \ \ \____\ \ \ \ \ \ \/ / / \ \ \\\ \|____|\ \ - \ \__\ \ \__\ \__\ \_______\ \ \_______\ \__\ \ \__\__/ / / \ \_______\____\_\ \ + ________ ________ ________ ________ ___ _________ ___ ___ ________ ________ +|\ _____\\ __ \|\ __ \ |\ ____\|\ \|\___ ___\ |\ \ / /| |\ __ \|\ ____\ +\ \ \__/\ \ \|\ \ \ \|\ /_ \ \ \___|\ \ \|___ \ \_| \ \ \/ / / \ \ \|\ \ \ \___|_ + \ \ __\\ \ __ \ \ __ \ \ \ \ \ \ \ \ \ \ \ \ / / \ \ \\\ \ \_____ \ + \ \ \_| \ \ \ \ \ \ \|\ \ \ \ \____\ \ \ \ \ \ \/ / / \ \ \\\ \|____|\ \ + \ \__\ \ \__\ \__\ \_______\ \ \_______\ \__\ \ \__\__/ / / \ \_______\____\_\ \ \|__| \|__|\|__|\|_______| \|_______|\|__| \|__|\___/ / \|_______|\_________\ \|___|/ \|_________| diff --git a/templates/_helpers.tpl b/templates/_helpers.tpl index 796d938..06c7af8 100644 --- a/templates/_helpers.tpl +++ b/templates/_helpers.tpl @@ -243,4 +243,3 @@ Return true if FabCityOS SMTP uses password authentication {{- true -}} {{- end -}} {{- end -}} - diff --git a/templates/secrets-database.yaml b/templates/secrets-database.yaml index dd8dfff..8195464 100644 --- a/templates/secrets-database.yaml +++ b/templates/secrets-database.yaml @@ -1,5 +1,4 @@ {{- if and (not .Values.postgresql.enabled) (not .Values.externalDatabase.existingSecret) }} ---- apiVersion: v1 kind: Secret metadata: diff --git a/values.yaml b/values.yaml index d33a5c4..4c0bd21 100644 --- a/values.yaml +++ b/values.yaml @@ -469,4 +469,3 @@ externalDatabase: existingSecret: "" existingSecretPasswordKey: "" existingSecretPostgresPasswordKey: "" - \ No newline at end of file