From 2e1b3db0ef0e1ae7d83e175d0c2618c04ae13ae3 Mon Sep 17 00:00:00 2001 From: Liam Date: Sun, 22 Sep 2024 04:35:03 +0100 Subject: [PATCH] add kube-sphere --- .../cert-manager/cert-manager.yaml | 0 .../cert-manager/issuer.yaml | 0 .../cert-manager/kustomization.yaml | 0 .../cert-manager/namespace.yaml | 0 infrastructure/kube-sphere/config.yaml | 206 ++++++++++++ infrastructure/kube-sphere/installer.yaml | 312 ++++++++++++++++++ infrastructure/kube-sphere/kustomization.yaml | 7 + infrastructure/kustomization.yaml | 5 + .../metallb/ipaddresspool.yaml | 0 .../metallb/kustomization.yaml | 0 .../metallb/l2advertisement.yaml | 0 .../metallb/metallb.yaml | 0 .../monitoring/ingress.yml | 2 +- .../monitoring/kube-prometheus-stack.yaml | 0 .../monitoring/kustomization.yaml | 1 + .../monitoring/namespace.yaml | 0 .../traefik/certificates/fascinated-cc.yaml | 0 .../certificates/local-fascinated-cc.yaml | 0 .../traefik/certificates/mcutils-xyz.yaml | 0 .../aetheria-grafana.fascinated.cc.yml | 0 .../aetheria-influx.fascinated.cc.yml | 0 .../analytics.fascinated.cc.yml | 0 .../external-services/api.mcutils.xyz.yml | 0 .../azure-metrics.fascinated.cc.yml | 0 .../azure-phpma.fascinated.cc.yml | 0 .../bitmagnet.local.fascinated.cc.yml | 0 .../external-services/cdn.fascinated.cc.yml | 0 .../external-services/cloud.fascinated.cc.yml | 0 .../external-services/docs.fascinated.cc.yml | 0 .../external-services/fascinated.cc.yml | 0 .../external-services/git.fascinated.cc.yml | 0 .../glitchtip.fascinated.cc.yml | 0 .../external-services/grafana.mcutils.xyz.yml | 0 .../external-services/img.fascinated.cc.yml | 0 .../external-services/influx.mcutils.xyz.yml | 0 .../mastodon.fascinated.cc.yml | 0 .../mc-tracker.fascinated.cc.yml | 0 .../traefik/external-services/mcutils.xyz.yml | 0 .../node-hl-01.fascinated.cc.yml | 0 .../obsidian-sync.fascinated.cc.yml | 0 .../overseerr.fascinated.cc.yml | 0 .../owntracks-web.fascinated.cc.yml | 0 .../owntracks.fascinated.cc.yml | 0 .../external-services/panel.fascinated.cc.yml | 0 .../paste-grafana.local.fascinated.cc.yml | 0 .../external-services/plex.fascinated.cc.yml | 0 .../proxmox.local.fascinated.cc.yml | 0 .../external-services/repo.fascinated.cc.yml | 0 .../restic.fascinated.cc.yml | 0 .../external-services/s.fascinated.cc.yml | 0 .../sonarr-anime.local.fascinated.cc.yml | 0 .../sonarr.local.fascinated.cc.yml | 0 .../ssr-staging.fascinated.cc.yml | 0 .../status.fascinated.cc.yml | 0 .../subscriptions.fascinated.cc.yml | 0 .../tautulli.fascinated.cc.yml | 0 .../tdarr.local.fascinated.cc.yml | 0 .../teleport.fascinated.cc.yml | 0 .../torrent.local.fascinated.cc.yml | 0 .../translate.fascinated.cc.yml | 0 .../external-services/tube.fascinated.cc.yml | 0 .../vaultwarden.fascinated.cc.yml | 0 .../vencloud.fascinated.cc.yml | 0 .../wakatime.fascinated.cc.yml | 0 .../wazuh.local.fascinated.cc.yml | 0 .../external-services/wiki.fascinated.cc.yml | 0 .../traefik/kustomization.yaml | 0 .../traefik/middlewares/default-headers.yaml | 0 .../traefik/namespace.yaml | 0 .../traefik/traefik.yaml | 0 70 files changed, 532 insertions(+), 1 deletion(-) rename {apps/production => infrastructure}/cert-manager/cert-manager.yaml (100%) rename {apps/production => infrastructure}/cert-manager/issuer.yaml (100%) rename {apps/production => infrastructure}/cert-manager/kustomization.yaml (100%) rename {apps/production => infrastructure}/cert-manager/namespace.yaml (100%) create mode 100644 infrastructure/kube-sphere/config.yaml create mode 100644 infrastructure/kube-sphere/installer.yaml create mode 100644 infrastructure/kube-sphere/kustomization.yaml rename {apps/production => infrastructure}/metallb/ipaddresspool.yaml (100%) rename {apps/production => infrastructure}/metallb/kustomization.yaml (100%) rename {apps/production => infrastructure}/metallb/l2advertisement.yaml (100%) rename {apps/production => infrastructure}/metallb/metallb.yaml (100%) rename apps/production/traefik/external-services/kubernetes-grafana.local.fascinated.cc.yml => infrastructure/monitoring/ingress.yml (94%) rename {apps/production => infrastructure}/monitoring/kube-prometheus-stack.yaml (100%) rename {apps/production => infrastructure}/monitoring/kustomization.yaml (90%) rename {apps/production => infrastructure}/monitoring/namespace.yaml (100%) rename {apps/production => infrastructure}/traefik/certificates/fascinated-cc.yaml (100%) rename {apps/production => infrastructure}/traefik/certificates/local-fascinated-cc.yaml (100%) rename {apps/production => infrastructure}/traefik/certificates/mcutils-xyz.yaml (100%) rename {apps/production => infrastructure}/traefik/external-services/aetheria-grafana.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/aetheria-influx.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/analytics.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/api.mcutils.xyz.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/azure-metrics.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/azure-phpma.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/bitmagnet.local.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/cdn.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/cloud.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/docs.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/git.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/glitchtip.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/grafana.mcutils.xyz.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/img.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/influx.mcutils.xyz.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/mastodon.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/mc-tracker.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/mcutils.xyz.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/node-hl-01.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/obsidian-sync.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/overseerr.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/owntracks-web.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/owntracks.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/panel.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/paste-grafana.local.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/plex.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/proxmox.local.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/repo.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/restic.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/s.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/sonarr-anime.local.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/sonarr.local.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/ssr-staging.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/status.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/subscriptions.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/tautulli.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/tdarr.local.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/teleport.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/torrent.local.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/translate.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/tube.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/vaultwarden.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/vencloud.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/wakatime.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/wazuh.local.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/external-services/wiki.fascinated.cc.yml (100%) rename {apps/production => infrastructure}/traefik/kustomization.yaml (100%) rename {apps/production => infrastructure}/traefik/middlewares/default-headers.yaml (100%) rename {apps/production => infrastructure}/traefik/namespace.yaml (100%) rename {apps/production => infrastructure}/traefik/traefik.yaml (100%) diff --git a/apps/production/cert-manager/cert-manager.yaml b/infrastructure/cert-manager/cert-manager.yaml similarity index 100% rename from apps/production/cert-manager/cert-manager.yaml rename to infrastructure/cert-manager/cert-manager.yaml diff --git a/apps/production/cert-manager/issuer.yaml b/infrastructure/cert-manager/issuer.yaml similarity index 100% rename from apps/production/cert-manager/issuer.yaml rename to infrastructure/cert-manager/issuer.yaml diff --git a/apps/production/cert-manager/kustomization.yaml b/infrastructure/cert-manager/kustomization.yaml similarity index 100% rename from apps/production/cert-manager/kustomization.yaml rename to infrastructure/cert-manager/kustomization.yaml diff --git a/apps/production/cert-manager/namespace.yaml b/infrastructure/cert-manager/namespace.yaml similarity index 100% rename from apps/production/cert-manager/namespace.yaml rename to infrastructure/cert-manager/namespace.yaml diff --git a/infrastructure/kube-sphere/config.yaml b/infrastructure/kube-sphere/config.yaml new file mode 100644 index 0000000..27a22fc --- /dev/null +++ b/infrastructure/kube-sphere/config.yaml @@ -0,0 +1,206 @@ +--- +apiVersion: installer.kubesphere.io/v1alpha1 +kind: ClusterConfiguration +metadata: + name: ks-installer + namespace: kubesphere-system + labels: + version: v3.4.0 +spec: + persistence: + storageClass: "" # If there is no default StorageClass in your cluster, you need to specify an existing StorageClass here. + authentication: + # adminPassword: "" # Custom password of the admin user. If the parameter exists but the value is empty, a random password is generated. If the parameter does not exist, P@88w0rd is used. + jwtSecret: "" # Keep the jwtSecret consistent with the Host Cluster. Retrieve the jwtSecret by executing "kubectl -n kubesphere-system get cm kubesphere-config -o yaml | grep -v "apiVersion" | grep jwtSecret" on the Host Cluster. + local_registry: "" # Add your private registry address if it is needed. + # dev_tag: "" # Add your kubesphere image tag you want to install, by default it's same as ks-installer release version. + etcd: + monitoring: false # Enable or disable etcd monitoring dashboard installation. You have to create a Secret for etcd before you enable it. + endpointIps: localhost # etcd cluster EndpointIps. It can be a bunch of IPs here. + port: 2379 # etcd port. + tlsEnable: true + common: + core: + console: + enableMultiLogin: true # Enable or disable simultaneous logins. It allows different users to log in with the same account at the same time. + port: 30880 + type: NodePort + + # apiserver: # Enlarge the apiserver and controller manager's resource requests and limits for the large cluster + # resources: {} + # controllerManager: + # resources: {} + redis: + enabled: false + enableHA: false + volumeSize: 2Gi # Redis PVC size. + openldap: + enabled: false + volumeSize: 2Gi # openldap PVC size. + minio: + volumeSize: 20Gi # Minio PVC size. + monitoring: + # type: external # Whether to specify the external prometheus stack, and need to modify the endpoint at the next line. + endpoint: http://prometheus-operated.kubesphere-monitoring-system.svc:9090 # Prometheus endpoint to get metrics data. + GPUMonitoring: # Enable or disable the GPU-related metrics. If you enable this switch but have no GPU resources, Kubesphere will set it to zero. + enabled: false + gpu: # Install GPUKinds. The default GPU kind is nvidia.com/gpu. Other GPU kinds can be added here according to your needs. + kinds: + - resourceName: "nvidia.com/gpu" + resourceType: "GPU" + default: true + es: # Storage backend for logging, events and auditing. + # master: + # volumeSize: 4Gi # The volume size of Elasticsearch master nodes. + # replicas: 1 # The total number of master nodes. Even numbers are not allowed. + # resources: {} + # data: + # volumeSize: 20Gi # The volume size of Elasticsearch data nodes. + # replicas: 1 # The total number of data nodes. + # resources: {} + enabled: false + logMaxAge: 7 # Log retention time in built-in Elasticsearch. It is 7 days by default. + elkPrefix: logstash # The string making up index names. The index name will be formatted as ks--log. + basicAuth: + enabled: false + username: "" + password: "" + externalElasticsearchHost: "" + externalElasticsearchPort: "" + opensearch: # Storage backend for logging, events and auditing. + # master: + # volumeSize: 4Gi # The volume size of Opensearch master nodes. + # replicas: 1 # The total number of master nodes. Even numbers are not allowed. + # resources: {} + # data: + # volumeSize: 20Gi # The volume size of Opensearch data nodes. + # replicas: 1 # The total number of data nodes. + # resources: {} + enabled: true + logMaxAge: 7 # Log retention time in built-in Opensearch. It is 7 days by default. + opensearchPrefix: whizard # The string making up index names. The index name will be formatted as ks--logging. + basicAuth: + enabled: true + username: "admin" + password: "admin" + externalOpensearchHost: "" + externalOpensearchPort: "" + dashboard: + enabled: false + alerting: # (CPU: 0.1 Core, Memory: 100 MiB) It enables users to customize alerting policies to send messages to receivers in time with different time intervals and alerting levels to choose from. + enabled: false # Enable or disable the KubeSphere Alerting System. + # thanosruler: + # replicas: 1 + # resources: {} + auditing: # Provide a security-relevant chronological set of records,recording the sequence of activities happening on the platform, initiated by different tenants. + enabled: false # Enable or disable the KubeSphere Auditing Log System. + # operator: + # resources: {} + # webhook: + # resources: {} + devops: # (CPU: 0.47 Core, Memory: 8.6 G) Provide an out-of-the-box CI/CD system based on Jenkins, and automated workflow tools including Source-to-Image & Binary-to-Image. + enabled: false # Enable or disable the KubeSphere DevOps System. + jenkinsCpuReq: 0.5 + jenkinsCpuLim: 1 + jenkinsMemoryReq: 4Gi + jenkinsMemoryLim: 4Gi # Recommend keep same as requests.memory. + jenkinsVolumeSize: 16Gi + events: # Provide a graphical web console for Kubernetes Events exporting, filtering and alerting in multi-tenant Kubernetes clusters. + enabled: false # Enable or disable the KubeSphere Events System. + # operator: + # resources: {} + # exporter: + # resources: {} + ruler: + enabled: true + replicas: 2 + # resources: {} + logging: # (CPU: 57 m, Memory: 2.76 G) Flexible logging functions are provided for log query, collection and management in a unified console. Additional log collectors can be added, such as Elasticsearch, Kafka and Fluentd. + enabled: false # Enable or disable the KubeSphere Logging System. + logsidecar: + enabled: true + replicas: 2 + # resources: {} + metrics_server: # (CPU: 56 m, Memory: 44.35 MiB) It enables HPA (Horizontal Pod Autoscaler). + enabled: false # Enable or disable metrics-server. + monitoring: + storageClass: "" # If there is an independent StorageClass you need for Prometheus, you can specify it here. The default StorageClass is used by default. + node_exporter: + port: 9100 + # resources: {} + # kube_rbac_proxy: + # resources: {} + # kube_state_metrics: + # resources: {} + # prometheus: + # replicas: 1 # Prometheus replicas are responsible for monitoring different segments of data source and providing high availability. + # volumeSize: 20Gi # Prometheus PVC size. + # resources: {} + # operator: + # resources: {} + # alertmanager: + # replicas: 1 # AlertManager Replicas. + # resources: {} + # notification_manager: + # resources: {} + # operator: + # resources: {} + # proxy: + # resources: {} + gpu: # GPU monitoring-related plug-in installation. + nvidia_dcgm_exporter: # Ensure that gpu resources on your hosts can be used normally, otherwise this plug-in will not work properly. + enabled: false # Check whether the labels on the GPU hosts contain "nvidia.com/gpu.present=true" to ensure that the DCGM pod is scheduled to these nodes. + # resources: {} + multicluster: + clusterRole: none # host | member | none # You can install a solo cluster, or specify it as the Host or Member Cluster. + network: + networkpolicy: # Network policies allow network isolation within the same cluster, which means firewalls can be set up between certain instances (Pods). + # Make sure that the CNI network plugin used by the cluster supports NetworkPolicy. There are a number of CNI network plugins that support NetworkPolicy, including Calico, Cilium, Kube-router, Romana and Weave Net. + enabled: false # Enable or disable network policies. + ippool: # Use Pod IP Pools to manage the Pod network address space. Pods to be created can be assigned IP addresses from a Pod IP Pool. + type: none # Specify "calico" for this field if Calico is used as your CNI plugin. "none" means that Pod IP Pools are disabled. + topology: # Use Service Topology to view Service-to-Service communication based on Weave Scope. + type: none # Specify "weave-scope" for this field to enable Service Topology. "none" means that Service Topology is disabled. + openpitrix: # An App Store that is accessible to all platform tenants. You can use it to manage apps across their entire lifecycle. + store: + enabled: false # Enable or disable the KubeSphere App Store. + servicemesh: # (0.3 Core, 300 MiB) Provide fine-grained traffic management, observability and tracing, and visualized traffic topology. + enabled: false # Base component (pilot). Enable or disable KubeSphere Service Mesh (Istio-based). + istio: # Customizing the istio installation configuration, refer to https://istio.io/latest/docs/setup/additional-setup/customize-installation/ + components: + ingressGateways: + - name: istio-ingressgateway + enabled: false + cni: + enabled: false + edgeruntime: # Add edge nodes to your cluster and deploy workloads on edge nodes. + enabled: false + kubeedge: # kubeedge configurations + enabled: false + cloudCore: + cloudHub: + advertiseAddress: # At least a public IP address or an IP address which can be accessed by edge nodes must be provided. + - "" # Note that once KubeEdge is enabled, CloudCore will malfunction if the address is not provided. + service: + cloudhubNodePort: "30000" + cloudhubQuicNodePort: "30001" + cloudhubHttpsNodePort: "30002" + cloudstreamNodePort: "30003" + tunnelNodePort: "30004" + # resources: {} + # hostNetWork: false + iptables-manager: + enabled: true + mode: "external" + # resources: {} + # edgeService: + # resources: {} + gatekeeper: # Provide admission policy and rule management, A validating (mutating TBA) webhook that enforces CRD-based policies executed by Open Policy Agent. + enabled: false # Enable or disable Gatekeeper. + # controller_manager: + # resources: {} + # audit: + # resources: {} + terminal: + # image: 'alpine:3.15' # There must be an nsenter program in the image + timeout: 600 # Container timeout, if set to 0, no timeout will be used. The unit is seconds diff --git a/infrastructure/kube-sphere/installer.yaml b/infrastructure/kube-sphere/installer.yaml new file mode 100644 index 0000000..38f483e --- /dev/null +++ b/infrastructure/kube-sphere/installer.yaml @@ -0,0 +1,312 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: clusterconfigurations.installer.kubesphere.io +spec: + group: installer.kubesphere.io + versions: + - name: v1alpha1 + served: true + storage: true + schema: + openAPIV3Schema: + type: object + properties: + spec: + type: object + x-kubernetes-preserve-unknown-fields: true + status: + type: object + x-kubernetes-preserve-unknown-fields: true + scope: Namespaced + names: + plural: clusterconfigurations + singular: clusterconfiguration + kind: ClusterConfiguration + shortNames: + - cc + +--- +apiVersion: v1 +kind: Namespace +metadata: + name: kubesphere-system + +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: ks-installer + namespace: kubesphere-system + +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: ks-installer +rules: + - apiGroups: + - "" + resources: + - "*" + verbs: + - "*" + - apiGroups: + - apps + resources: + - "*" + verbs: + - "*" + - apiGroups: + - extensions + resources: + - "*" + verbs: + - "*" + - apiGroups: + - batch + resources: + - "*" + verbs: + - "*" + - apiGroups: + - rbac.authorization.k8s.io + resources: + - "*" + verbs: + - "*" + - apiGroups: + - apiregistration.k8s.io + resources: + - "*" + verbs: + - "*" + - apiGroups: + - apiextensions.k8s.io + resources: + - "*" + verbs: + - "*" + - apiGroups: + - tenant.kubesphere.io + resources: + - "*" + verbs: + - "*" + - apiGroups: + - certificates.k8s.io + resources: + - "*" + verbs: + - "*" + - apiGroups: + - devops.kubesphere.io + resources: + - "*" + verbs: + - "*" + - apiGroups: + - monitoring.coreos.com + resources: + - "*" + verbs: + - "*" + - apiGroups: + - logging.kubesphere.io + resources: + - "*" + verbs: + - "*" + - apiGroups: + - jaegertracing.io + resources: + - "*" + verbs: + - "*" + - apiGroups: + - storage.k8s.io + resources: + - "*" + verbs: + - "*" + - apiGroups: + - admissionregistration.k8s.io + resources: + - "*" + verbs: + - "*" + - apiGroups: + - policy + resources: + - "*" + verbs: + - "*" + - apiGroups: + - autoscaling + resources: + - "*" + verbs: + - "*" + - apiGroups: + - networking.istio.io + resources: + - "*" + verbs: + - "*" + - apiGroups: + - config.istio.io + resources: + - "*" + verbs: + - "*" + - apiGroups: + - iam.kubesphere.io + resources: + - "*" + verbs: + - "*" + - apiGroups: + - notification.kubesphere.io + resources: + - "*" + verbs: + - "*" + - apiGroups: + - auditing.kubesphere.io + resources: + - "*" + verbs: + - "*" + - apiGroups: + - events.kubesphere.io + resources: + - "*" + verbs: + - "*" + - apiGroups: + - core.kubefed.io + resources: + - "*" + verbs: + - "*" + - apiGroups: + - installer.kubesphere.io + resources: + - "*" + verbs: + - "*" + - apiGroups: + - storage.kubesphere.io + resources: + - "*" + verbs: + - "*" + - apiGroups: + - security.istio.io + resources: + - "*" + verbs: + - "*" + - apiGroups: + - monitoring.kiali.io + resources: + - "*" + verbs: + - "*" + - apiGroups: + - kiali.io + resources: + - "*" + verbs: + - "*" + - apiGroups: + - networking.k8s.io + resources: + - "*" + verbs: + - "*" + - apiGroups: + - edgeruntime.kubesphere.io + resources: + - "*" + verbs: + - "*" + - apiGroups: + - types.kubefed.io + resources: + - "*" + verbs: + - "*" + - apiGroups: + - monitoring.kubesphere.io + resources: + - "*" + verbs: + - "*" + - apiGroups: + - application.kubesphere.io + resources: + - "*" + verbs: + - "*" + - apiGroups: + - alerting.kubesphere.io + resources: + - "*" + verbs: + - "*" + +--- +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: ks-installer +subjects: + - kind: ServiceAccount + name: ks-installer + namespace: kubesphere-system +roleRef: + kind: ClusterRole + name: ks-installer + apiGroup: rbac.authorization.k8s.io + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: ks-installer + namespace: kubesphere-system + labels: + app: ks-installer +spec: + replicas: 1 + selector: + matchLabels: + app: ks-installer + template: + metadata: + labels: + app: ks-installer + spec: + serviceAccountName: ks-installer + containers: + - name: installer + image: kubesphere/ks-installer:v3.4.0 + imagePullPolicy: "Always" + resources: + limits: + cpu: "1" + memory: 1Gi + requests: + cpu: 20m + memory: 100Mi + volumeMounts: + - mountPath: /etc/localtime + name: host-time + readOnly: true + volumes: + - hostPath: + path: /etc/localtime + type: "" + name: host-time diff --git a/infrastructure/kube-sphere/kustomization.yaml b/infrastructure/kube-sphere/kustomization.yaml new file mode 100644 index 0000000..13383a8 --- /dev/null +++ b/infrastructure/kube-sphere/kustomization.yaml @@ -0,0 +1,7 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: kubesphere-system +resources: + - config.yaml + - installer.yaml diff --git a/infrastructure/kustomization.yaml b/infrastructure/kustomization.yaml index fd41c47..7f3a600 100644 --- a/infrastructure/kustomization.yaml +++ b/infrastructure/kustomization.yaml @@ -2,6 +2,11 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: + - cert-manager - crds + - metallb - nfs + - traefik + - kube-sphere + - monitoring - alerting/flux diff --git a/apps/production/metallb/ipaddresspool.yaml b/infrastructure/metallb/ipaddresspool.yaml similarity index 100% rename from apps/production/metallb/ipaddresspool.yaml rename to infrastructure/metallb/ipaddresspool.yaml diff --git a/apps/production/metallb/kustomization.yaml b/infrastructure/metallb/kustomization.yaml similarity index 100% rename from apps/production/metallb/kustomization.yaml rename to infrastructure/metallb/kustomization.yaml diff --git a/apps/production/metallb/l2advertisement.yaml b/infrastructure/metallb/l2advertisement.yaml similarity index 100% rename from apps/production/metallb/l2advertisement.yaml rename to infrastructure/metallb/l2advertisement.yaml diff --git a/apps/production/metallb/metallb.yaml b/infrastructure/metallb/metallb.yaml similarity index 100% rename from apps/production/metallb/metallb.yaml rename to infrastructure/metallb/metallb.yaml diff --git a/apps/production/traefik/external-services/kubernetes-grafana.local.fascinated.cc.yml b/infrastructure/monitoring/ingress.yml similarity index 94% rename from apps/production/traefik/external-services/kubernetes-grafana.local.fascinated.cc.yml rename to infrastructure/monitoring/ingress.yml index 81fb07d..e051274 100644 --- a/apps/production/traefik/external-services/kubernetes-grafana.local.fascinated.cc.yml +++ b/infrastructure/monitoring/ingress.yml @@ -18,4 +18,4 @@ spec: - name: kube-prometheus-stack-grafana port: 80 tls: - secretName: mcutils-xyz + secretName: fascinated-cc diff --git a/apps/production/monitoring/kube-prometheus-stack.yaml b/infrastructure/monitoring/kube-prometheus-stack.yaml similarity index 100% rename from apps/production/monitoring/kube-prometheus-stack.yaml rename to infrastructure/monitoring/kube-prometheus-stack.yaml diff --git a/apps/production/monitoring/kustomization.yaml b/infrastructure/monitoring/kustomization.yaml similarity index 90% rename from apps/production/monitoring/kustomization.yaml rename to infrastructure/monitoring/kustomization.yaml index 5c2af1f..33c6bf9 100644 --- a/apps/production/monitoring/kustomization.yaml +++ b/infrastructure/monitoring/kustomization.yaml @@ -5,3 +5,4 @@ namespace: monitoring resources: - namespace.yaml - kube-prometheus-stack.yaml + - ingress.yml diff --git a/apps/production/monitoring/namespace.yaml b/infrastructure/monitoring/namespace.yaml similarity index 100% rename from apps/production/monitoring/namespace.yaml rename to infrastructure/monitoring/namespace.yaml diff --git a/apps/production/traefik/certificates/fascinated-cc.yaml b/infrastructure/traefik/certificates/fascinated-cc.yaml similarity index 100% rename from apps/production/traefik/certificates/fascinated-cc.yaml rename to infrastructure/traefik/certificates/fascinated-cc.yaml diff --git a/apps/production/traefik/certificates/local-fascinated-cc.yaml b/infrastructure/traefik/certificates/local-fascinated-cc.yaml similarity index 100% rename from apps/production/traefik/certificates/local-fascinated-cc.yaml rename to infrastructure/traefik/certificates/local-fascinated-cc.yaml diff --git a/apps/production/traefik/certificates/mcutils-xyz.yaml b/infrastructure/traefik/certificates/mcutils-xyz.yaml similarity index 100% rename from apps/production/traefik/certificates/mcutils-xyz.yaml rename to infrastructure/traefik/certificates/mcutils-xyz.yaml diff --git a/apps/production/traefik/external-services/aetheria-grafana.fascinated.cc.yml b/infrastructure/traefik/external-services/aetheria-grafana.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/aetheria-grafana.fascinated.cc.yml rename to infrastructure/traefik/external-services/aetheria-grafana.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/aetheria-influx.fascinated.cc.yml b/infrastructure/traefik/external-services/aetheria-influx.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/aetheria-influx.fascinated.cc.yml rename to infrastructure/traefik/external-services/aetheria-influx.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/analytics.fascinated.cc.yml b/infrastructure/traefik/external-services/analytics.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/analytics.fascinated.cc.yml rename to infrastructure/traefik/external-services/analytics.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/api.mcutils.xyz.yml b/infrastructure/traefik/external-services/api.mcutils.xyz.yml similarity index 100% rename from apps/production/traefik/external-services/api.mcutils.xyz.yml rename to infrastructure/traefik/external-services/api.mcutils.xyz.yml diff --git a/apps/production/traefik/external-services/azure-metrics.fascinated.cc.yml b/infrastructure/traefik/external-services/azure-metrics.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/azure-metrics.fascinated.cc.yml rename to infrastructure/traefik/external-services/azure-metrics.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/azure-phpma.fascinated.cc.yml b/infrastructure/traefik/external-services/azure-phpma.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/azure-phpma.fascinated.cc.yml rename to infrastructure/traefik/external-services/azure-phpma.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/bitmagnet.local.fascinated.cc.yml b/infrastructure/traefik/external-services/bitmagnet.local.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/bitmagnet.local.fascinated.cc.yml rename to infrastructure/traefik/external-services/bitmagnet.local.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/cdn.fascinated.cc.yml b/infrastructure/traefik/external-services/cdn.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/cdn.fascinated.cc.yml rename to infrastructure/traefik/external-services/cdn.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/cloud.fascinated.cc.yml b/infrastructure/traefik/external-services/cloud.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/cloud.fascinated.cc.yml rename to infrastructure/traefik/external-services/cloud.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/docs.fascinated.cc.yml b/infrastructure/traefik/external-services/docs.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/docs.fascinated.cc.yml rename to infrastructure/traefik/external-services/docs.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/fascinated.cc.yml b/infrastructure/traefik/external-services/fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/fascinated.cc.yml rename to infrastructure/traefik/external-services/fascinated.cc.yml diff --git a/apps/production/traefik/external-services/git.fascinated.cc.yml b/infrastructure/traefik/external-services/git.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/git.fascinated.cc.yml rename to infrastructure/traefik/external-services/git.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/glitchtip.fascinated.cc.yml b/infrastructure/traefik/external-services/glitchtip.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/glitchtip.fascinated.cc.yml rename to infrastructure/traefik/external-services/glitchtip.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/grafana.mcutils.xyz.yml b/infrastructure/traefik/external-services/grafana.mcutils.xyz.yml similarity index 100% rename from apps/production/traefik/external-services/grafana.mcutils.xyz.yml rename to infrastructure/traefik/external-services/grafana.mcutils.xyz.yml diff --git a/apps/production/traefik/external-services/img.fascinated.cc.yml b/infrastructure/traefik/external-services/img.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/img.fascinated.cc.yml rename to infrastructure/traefik/external-services/img.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/influx.mcutils.xyz.yml b/infrastructure/traefik/external-services/influx.mcutils.xyz.yml similarity index 100% rename from apps/production/traefik/external-services/influx.mcutils.xyz.yml rename to infrastructure/traefik/external-services/influx.mcutils.xyz.yml diff --git a/apps/production/traefik/external-services/mastodon.fascinated.cc.yml b/infrastructure/traefik/external-services/mastodon.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/mastodon.fascinated.cc.yml rename to infrastructure/traefik/external-services/mastodon.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/mc-tracker.fascinated.cc.yml b/infrastructure/traefik/external-services/mc-tracker.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/mc-tracker.fascinated.cc.yml rename to infrastructure/traefik/external-services/mc-tracker.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/mcutils.xyz.yml b/infrastructure/traefik/external-services/mcutils.xyz.yml similarity index 100% rename from apps/production/traefik/external-services/mcutils.xyz.yml rename to infrastructure/traefik/external-services/mcutils.xyz.yml diff --git a/apps/production/traefik/external-services/node-hl-01.fascinated.cc.yml b/infrastructure/traefik/external-services/node-hl-01.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/node-hl-01.fascinated.cc.yml rename to infrastructure/traefik/external-services/node-hl-01.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/obsidian-sync.fascinated.cc.yml b/infrastructure/traefik/external-services/obsidian-sync.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/obsidian-sync.fascinated.cc.yml rename to infrastructure/traefik/external-services/obsidian-sync.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/overseerr.fascinated.cc.yml b/infrastructure/traefik/external-services/overseerr.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/overseerr.fascinated.cc.yml rename to infrastructure/traefik/external-services/overseerr.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/owntracks-web.fascinated.cc.yml b/infrastructure/traefik/external-services/owntracks-web.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/owntracks-web.fascinated.cc.yml rename to infrastructure/traefik/external-services/owntracks-web.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/owntracks.fascinated.cc.yml b/infrastructure/traefik/external-services/owntracks.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/owntracks.fascinated.cc.yml rename to infrastructure/traefik/external-services/owntracks.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/panel.fascinated.cc.yml b/infrastructure/traefik/external-services/panel.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/panel.fascinated.cc.yml rename to infrastructure/traefik/external-services/panel.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/paste-grafana.local.fascinated.cc.yml b/infrastructure/traefik/external-services/paste-grafana.local.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/paste-grafana.local.fascinated.cc.yml rename to infrastructure/traefik/external-services/paste-grafana.local.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/plex.fascinated.cc.yml b/infrastructure/traefik/external-services/plex.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/plex.fascinated.cc.yml rename to infrastructure/traefik/external-services/plex.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/proxmox.local.fascinated.cc.yml b/infrastructure/traefik/external-services/proxmox.local.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/proxmox.local.fascinated.cc.yml rename to infrastructure/traefik/external-services/proxmox.local.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/repo.fascinated.cc.yml b/infrastructure/traefik/external-services/repo.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/repo.fascinated.cc.yml rename to infrastructure/traefik/external-services/repo.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/restic.fascinated.cc.yml b/infrastructure/traefik/external-services/restic.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/restic.fascinated.cc.yml rename to infrastructure/traefik/external-services/restic.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/s.fascinated.cc.yml b/infrastructure/traefik/external-services/s.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/s.fascinated.cc.yml rename to infrastructure/traefik/external-services/s.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/sonarr-anime.local.fascinated.cc.yml b/infrastructure/traefik/external-services/sonarr-anime.local.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/sonarr-anime.local.fascinated.cc.yml rename to infrastructure/traefik/external-services/sonarr-anime.local.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/sonarr.local.fascinated.cc.yml b/infrastructure/traefik/external-services/sonarr.local.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/sonarr.local.fascinated.cc.yml rename to infrastructure/traefik/external-services/sonarr.local.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/ssr-staging.fascinated.cc.yml b/infrastructure/traefik/external-services/ssr-staging.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/ssr-staging.fascinated.cc.yml rename to infrastructure/traefik/external-services/ssr-staging.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/status.fascinated.cc.yml b/infrastructure/traefik/external-services/status.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/status.fascinated.cc.yml rename to infrastructure/traefik/external-services/status.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/subscriptions.fascinated.cc.yml b/infrastructure/traefik/external-services/subscriptions.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/subscriptions.fascinated.cc.yml rename to infrastructure/traefik/external-services/subscriptions.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/tautulli.fascinated.cc.yml b/infrastructure/traefik/external-services/tautulli.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/tautulli.fascinated.cc.yml rename to infrastructure/traefik/external-services/tautulli.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/tdarr.local.fascinated.cc.yml b/infrastructure/traefik/external-services/tdarr.local.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/tdarr.local.fascinated.cc.yml rename to infrastructure/traefik/external-services/tdarr.local.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/teleport.fascinated.cc.yml b/infrastructure/traefik/external-services/teleport.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/teleport.fascinated.cc.yml rename to infrastructure/traefik/external-services/teleport.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/torrent.local.fascinated.cc.yml b/infrastructure/traefik/external-services/torrent.local.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/torrent.local.fascinated.cc.yml rename to infrastructure/traefik/external-services/torrent.local.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/translate.fascinated.cc.yml b/infrastructure/traefik/external-services/translate.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/translate.fascinated.cc.yml rename to infrastructure/traefik/external-services/translate.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/tube.fascinated.cc.yml b/infrastructure/traefik/external-services/tube.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/tube.fascinated.cc.yml rename to infrastructure/traefik/external-services/tube.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/vaultwarden.fascinated.cc.yml b/infrastructure/traefik/external-services/vaultwarden.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/vaultwarden.fascinated.cc.yml rename to infrastructure/traefik/external-services/vaultwarden.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/vencloud.fascinated.cc.yml b/infrastructure/traefik/external-services/vencloud.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/vencloud.fascinated.cc.yml rename to infrastructure/traefik/external-services/vencloud.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/wakatime.fascinated.cc.yml b/infrastructure/traefik/external-services/wakatime.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/wakatime.fascinated.cc.yml rename to infrastructure/traefik/external-services/wakatime.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/wazuh.local.fascinated.cc.yml b/infrastructure/traefik/external-services/wazuh.local.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/wazuh.local.fascinated.cc.yml rename to infrastructure/traefik/external-services/wazuh.local.fascinated.cc.yml diff --git a/apps/production/traefik/external-services/wiki.fascinated.cc.yml b/infrastructure/traefik/external-services/wiki.fascinated.cc.yml similarity index 100% rename from apps/production/traefik/external-services/wiki.fascinated.cc.yml rename to infrastructure/traefik/external-services/wiki.fascinated.cc.yml diff --git a/apps/production/traefik/kustomization.yaml b/infrastructure/traefik/kustomization.yaml similarity index 100% rename from apps/production/traefik/kustomization.yaml rename to infrastructure/traefik/kustomization.yaml diff --git a/apps/production/traefik/middlewares/default-headers.yaml b/infrastructure/traefik/middlewares/default-headers.yaml similarity index 100% rename from apps/production/traefik/middlewares/default-headers.yaml rename to infrastructure/traefik/middlewares/default-headers.yaml diff --git a/apps/production/traefik/namespace.yaml b/infrastructure/traefik/namespace.yaml similarity index 100% rename from apps/production/traefik/namespace.yaml rename to infrastructure/traefik/namespace.yaml diff --git a/apps/production/traefik/traefik.yaml b/infrastructure/traefik/traefik.yaml similarity index 100% rename from apps/production/traefik/traefik.yaml rename to infrastructure/traefik/traefik.yaml