Giter VIP home page Giter VIP logo

xunholy / k8s-gitops Goto Github PK

View Code? Open in Web Editor NEW
440.0 440.0 28.0 21.09 MB

Kubernetes cluster powered by GitOps with FluxCD- Unified source of truth, automated workflows, declarative infrastructure, and cutting-edge DevOps practices.

Home Page: https://xunholy.github.io/k8s-gitops/

License: Apache License 2.0

Shell 20.24% Dockerfile 10.94% HCL 68.82%
flux gitops k8s-at-home kubernetes linux renovate terraform

k8s-gitops's Introduction

Typing SVG

Typing SVG


I'm Michael Fornaro, a tech enthusiast with a passion for exploring the latest technologies and pushing the boundaries of what's possible. When I'm not busy tinkering with code, you can find me spending time with my family or enjoying the great outdoors.

I'm proud to have been involved in multiple CNCF projects and to have founded Raspbernetes and heavily involved in the kubernetes@home organizations here on Github. These projects are a testament to my commitment to innovation and to creating communities that share in that vision.

Feel free to take a look around and explore my projects. I hope you find them as inspiring and exciting as I do. And if you have any questions or want to connect, don't hesitate to reach out!

Cheers!


k8s-gitops's People

Contributors

anthr76 avatar billimek avatar bjw-s avatar carpenike avatar crutonjohn avatar dcplaya avatar dependabot-preview[bot] avatar dependabot[bot] avatar fossabot avatar github-actions[bot] avatar hsy3418 avatar jarvis-plus-bot[bot] avatar maheshrayas avatar oli-hills avatar onedr0p avatar raynix avatar renovate-self-hosted[bot] avatar renovate[bot] avatar rkage avatar rust84 avatar saurabhpandit avatar shirmon avatar snyk-bot avatar xunholy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

k8s-gitops's Issues

CIS Kubernetes Benchmark v1.5.1 #1.2.1

Details

Ensure that the --anonymous-auth argument is set to false

Describe the solution you'd like:
Audit:

ps -ef | grep kube-apiserver

Verify that the --anonymous-auth argument is set to false.

Anything else you would like to add:

Remediation:
Edit the API server pod specification file /etc/kubernetes/manifests/kube- apiserver.yaml on the master node and set the below parameter.

--anonymous-auth=false

Implement SOPS to manage securely storing secrets in source control

Details

Currently, git-crypt is being used within the repository and works nicely, however, there is no visibility into the secret structure of the resource so users who fork the repo don't know what key pair values are required in these secret objects without having to inspect each sealed secret respectively.

SOPs provides encryption similar to git-crypt whilst allowing the structure to be viewable and providing a DIFF in the pull request process.

CIS Kubernetes Benchmark v1.5.1 #1.2.2

Details

Describe the solution you'd like:

Ensure that the --basic-auth-file argument is not set

Anything else you would like to add:

Audit:
Run the following command on the master node:

ps -ef | grep kube-apiserver

Verify that the --basic-auth-file argument does not exist.

Remediation:

Follow the documentation and configure alternate mechanisms for authentication. Then, edit the API server pod specification file /etc/kubernetes/manifests/kube- apiserver.yaml on the master node and remove the --basic-auth-file= parameter.

Configure istio ingress to replace nginx ingress

Details

Implement istio to allow ingress to the cluster and eventually phase out using nginx ingress. Some caveats may be oauth2 and keycloak integration not readily available in istio natively and may require further investigation - might run istio on a subdomain as a proof of concept before migrating completely across.

Automate CNAME records in cloudflare for new Ingress resources

Details

Due to not having a wildcard CNAME currently, all CNAMEs are manually created in the cloudflare console, ideally though whenever either an ingress or equivalent object is created the CNAMEs should be updated to include the new object automatically and likewise once an object is removed it should no longer persist as a CNAME in cloudflare.

EDIT** Wildcard CNAME records were available previously within cloudflares initial offering, however, it has since become an enterprise function which cost is unjustifiable for a homelab.

Automated security-policies updates

Details

A workflow to update the git sub-module should be setup to automatically promote new policy releases into the repository. Currently, this is a manual process to keep it in parity with the upstream repository.

Migrate to fluxv2

Details

Moving to Fluxv2 will require a massive uplift.

Currently, there is still a dependency on upstream providing arm64 images, and a means to deploy using those images as GHCR doesn't support multi-arch images and therefore images are appended with -arch EG: -arm64 also the default installation using gotk sets amd64 node affinity.

fluxcd/flux2#194

CIS Kubernetes Benchmark v1.5.1 #1.1.1

Details

Describe the solution you'd like:

Ensure that the API server pod specification file permissions are set to 644 or more restrictive (Scored)

Anything else you would like to add:

Audit:
Run the below command (based on the file location on your system) on the master node. For example:

stat -c %a /etc/kubernetes/manifests/kube-apiserver.yaml

Verify that the permissions are 644 or more restrictive.

Remediation:
Run the below command (based on the file location on your system) on the master node. For example:

chmod 644 /etc/kubernetes/manifests/kube-apiserver.yaml

Migrate branch master to main

Details

Migrate master branch to the main branch; GHA action workflows and repo.yaml will need references updated.

helm-operator will be templated via CI and commit to PR on upstream release

Details

Describe the solution you'd like:

When the upstream helm charts or maintainers provide a new official release the helm-operator should be able to be templated via CI and create a PR with the proposed upgrade within the repository.

Anything else you would like to add:

It could even be possible that the particular PR is using Flagger to test the upgrade before complete rollout

Additional Information:
N/A

Investigate using Fabrikate to hydrate helm manifests

Details

I would like to have my fully hydrated k8s resource manifests checked directly into source code rather than having helm-operator to the template and apply the manifests in-cluster. It also would make version controlling potential breaking changes and making resource changes more clear to observe during the PR process rather than introducing breaking changes directly in-cluster.

https://github.com/microsoft/fabrikate

Update network policies and global network policies

Details

Network policy currently allows all traffic, these need to be updated to allow isolated network traffic between namespaces and workloads respectively within the internal cluster network traffic.

Where feasible and not overlapping with istio authorization policies, global network policies provided via either Calico or Cilium should be enforced to provide L7 network controls.

CIS Kubernetes Benchmark v1.5.1 # 2

Details

2 etcd

  • 2.1 Ensure that the --cert-file and --key-file arguments are set as appropriate
  • 2.2 Ensure that the --client-cert-auth argument is set to true
  • 2.3 Ensure that the --auto-tls argument is not set to true
  • 2.4 Ensure that the --peer-cert-file and --peer-key-file arguments are set as appropriate
  • 2.5 Ensure that the --peer-client-cert-auth argument is set to true
  • 2.6 Ensure that the --peer-auto-tls argument is not set to true
  • 2.7 Ensure that a unique Certificate Authority is used for etcd

Use TF to create required resources in GCP

Details

The following are resources within GCP that are required dependencies within this project:

  • Velero:
    • GCS
    • GSA
    • Custom Role
  • Thanos:
    • GCS
    • GSA
    • Custom Role
  • SOPS
    • KMS
    • GSA
    • Custom Role

This would also include things such as enabling required APIs and can further expand into other cloud equivalent services.

Deploy helm-operator via fluxcd

Details

What steps did you take and what happened:

Attempted to deploy helm-operator and its required CRD's however Fluxcd did not apply the resources?

What did you expect to happen:

Fluxcd should be able to deploy and manage the helm-operator within the cluster.

Anything else you would like to add:

Note: Miscellaneous information that will assist in solving the issue.

Additional Information:

Note: Anything to give further context to the bug report.

Setup AuthN for services with no native login

Details

Services such as Prometheus don't have native login oauth2 integration, this can be provided using envoy filters similar to the kiali envoy filter to enforce traffic is authenticated prior to hitting the downstream service via the virtual service resource.

Integrate cluster services into the mesh

Details

Currently, istio has no active workloads deployed into the mesh, this issue would require that most services be integrated and tested whilst running in the mesh using mTLS and no direct external internet facing traffic other than via the egress gateway.

Namespaces to add to the mesh:

  • actions-runner-system
  • backups
  • flux-system
  • gatekeeper-system
  • home-system
  • istio-operator - Should not be added to the mesh
  • istio-system - Should not be added to the mesh
  • kube-system - Should not be added to the mesh
  • litmus
  • network
  • observability
  • openebs
  • security

Enable FluxCD to integrate with git-crypt to apply existing sealed secret private key

Details

The sealed secret operator pod starts will generate a new private key if one does not exist within the cluster. Currently, the private key that is used to decrypt all existing secrets is stored in git-crypt and manually applied post-setup of Flux in the cluster using the install/sealed-secret.sh script.

Ideally, Flux being integrated with git-crypt means Flux will have the capability to check out the private key within the cluster and apply it without requiring manual intervention after the operator has already initialized it.

https://github.com/bitnami-labs/sealed-secrets#managing-existing-secrets

Sealed secrets validation

Details

Describe the solution you'd like:

Sealed secrets must be encrypted with the appropriate public key and information to be decrypted in the cluster. These can cause issues when not valid or have been misconfigured, testing should be done to ensure these are not invalidated due to the before mentioned reasons.

To accomplish this there is a kubeseal --validate command that will --dry-run a decryption against the running sealed secret controller to ensure it is able to decrypt appropriately, if the resources is not valid it will prompt the following error output error: unable to decrypt sealed secret

CIS Kubernetes Benchmark v1.5.1 #1.2.1

Details

Ensure that the --anonymous-auth argument is set to false

Describe the solution you'd like:
Audit:

ps -ef | grep kube-apiserver

Verify that the --anonymous-auth argument is set to false.

Anything else you would like to add:

Remediation:
Edit the API server pod specification file /etc/kubernetes/manifests/kube- apiserver.yaml on the master node and set the below parameter.

--anonymous-auth=false

Update submodule repo name

Details

Update the submodule with the correct repository link, the repository was renamed and Github will continue to redirect the link until a new repository with the same name collides with it in which it will no longer work.

This should be updated so there is a consistent behavior.

Remove old dashboards

Details

Revisit the list of currently installed dashboard and remove the ones that are outdated or not in use e.g. Weave Flux

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.