-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deployed a3d2e04 with MkDocs version: 1.6.1
- Loading branch information
Unknown
committed
Feb 6, 2025
0 parents
commit 4857442
Showing
204 changed files
with
244,121 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# Anytime a Namespace with label postgres: required | ||
# is created in a cluster with label type: app, deploys a postgres cluster. | ||
# Source cluster is the management cluster. | ||
# Destination cluster is the cluster with label type:services | ||
apiVersion: lib.projectsveltos.io/v1beta1 | ||
kind: EventSource | ||
metadata: | ||
name: detect-cluster-requiring-postgres | ||
spec: | ||
collectResources: true | ||
resourceSelectors: | ||
- group: "" | ||
version: "v1" | ||
kind: "Namespace" | ||
labelFilters: | ||
- key: postgres | ||
operation: Equal | ||
value: required | ||
--- | ||
apiVersion: lib.projectsveltos.io/v1beta1 | ||
kind: EventTrigger | ||
metadata: | ||
name: deploy-postgres-cluster | ||
spec: | ||
sourceClusterSelector: | ||
matchLabels: | ||
type: app | ||
destinationClusterSelector: | ||
matchLabels: | ||
type: services | ||
eventSourceName: detect-cluster-requiring-postgres | ||
oneForEvent: true | ||
policyRefs: | ||
- name: postgres-cluster | ||
namespace: default | ||
kind: ConfigMap | ||
--- | ||
apiVersion: v1 | ||
data: | ||
cluster.yaml: | | ||
apiVersion: postgresql.cnpg.io/v1 | ||
kind: Cluster | ||
metadata: | ||
name: {{ .Resource.metadata.name }} | ||
namespace: {{ .Cluster.metadata.namespace }} | ||
labels: | ||
cluster-namespace: {{ .Cluster.metadata.namespace }} | ||
cluster-name: {{ .Cluster.metadata.name }} | ||
resource-name: {{ .Resource.metadata.name }} | ||
spec: | ||
instances: 3 | ||
bootstrap: | ||
initdb: | ||
database: todo | ||
storage: | ||
size: 1Gi | ||
managed: | ||
services: | ||
disabledDefaultServices: ["ro", "r"] | ||
additional: | ||
- selectorType: rw | ||
serviceTemplate: | ||
metadata: | ||
name: {{ .Resource.metadata.name }} | ||
spec: | ||
type: LoadBalancer | ||
kind: ConfigMap | ||
metadata: | ||
annotations: | ||
projectsveltos.io/instantiate: ok | ||
name: postgres-cluster | ||
namespace: default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Anytime a SveltosCluster with label postgres: required | ||
# is created, deploys a postgres cluster. | ||
# Source cluster is the management cluster. | ||
# Destination cluster is the cluster with label type:services | ||
apiVersion: lib.projectsveltos.io/v1beta1 | ||
kind: EventSource | ||
metadata: | ||
name: detect-cluster-requiring-postgres | ||
spec: | ||
collectResources: true | ||
resourceSelectors: | ||
- group: "lib.projectsveltos.io" | ||
version: "v1beta1" | ||
kind: "SveltosCluster" | ||
labelFilters: | ||
- key: postgres | ||
operation: Equal | ||
value: required | ||
--- | ||
apiVersion: lib.projectsveltos.io/v1beta1 | ||
kind: EventTrigger | ||
metadata: | ||
name: deploy-postgres-cluster | ||
spec: | ||
sourceClusterSelector: | ||
matchLabels: | ||
type: mgmt | ||
destinationClusterSelector: | ||
matchLabels: | ||
type: services | ||
eventSourceName: detect-cluster-requiring-postgres | ||
oneForEvent: true | ||
policyRefs: | ||
- name: postgres-cluster | ||
namespace: default | ||
kind: ConfigMap | ||
--- | ||
apiVersion: v1 | ||
data: | ||
cluster.yaml: | | ||
apiVersion: postgresql.cnpg.io/v1 | ||
kind: Cluster | ||
metadata: | ||
name: cluster-{{ .Resource.metadata.name }} | ||
namespace: {{ .Resource.metadata.namespace }} | ||
labels: | ||
cluster: {{ .Resource.metadata.namespace }}-{{ .Resource.metadata.name }} | ||
spec: | ||
instances: 3 | ||
bootstrap: | ||
initdb: | ||
database: todo | ||
storage: | ||
size: 1Gi | ||
managed: | ||
services: | ||
disabledDefaultServices: ["ro", "r"] | ||
additional: | ||
- selectorType: rw | ||
serviceTemplate: | ||
metadata: | ||
name: cluster-rw-lb | ||
spec: | ||
type: LoadBalancer | ||
kind: ConfigMap | ||
metadata: | ||
annotations: | ||
projectsveltos.io/instantiate: ok | ||
name: postgres-cluster | ||
namespace: default |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
apiVersion: config.projectsveltos.io/v1beta1 | ||
kind: ClusterProfile | ||
metadata: | ||
name: deploy-cnpg | ||
spec: | ||
clusterSelector: | ||
matchLabels: | ||
type: services | ||
syncMode: Continuous | ||
helmCharts: | ||
- repositoryURL: https://cloudnative-pg.github.io/charts | ||
repositoryName: cloudnative-pg | ||
chartName: cloudnative-pg/cloudnative-pg | ||
chartVersion: 0.22.1 | ||
releaseName: cnpg | ||
releaseNamespace: cnpg-system | ||
helmChartAction: Install |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
## Fetch postgres credentials from the cluster where services are deployed. | ||
## Create a Secret in the management cluster that contains the credentials | ||
## Secret is named pg-credentials and it is created in the same namespace of the managed cluster | ||
apiVersion: lib.projectsveltos.io/v1beta1 | ||
kind: EventSource | ||
metadata: | ||
name: detect-credentials-secret | ||
spec: | ||
collectResources: true | ||
resourceSelectors: | ||
- group: "" | ||
version: "v1" | ||
kind: "Secret" | ||
labelFilters: | ||
- key: cnpg.io/reload | ||
operation: Equal | ||
value: "true" | ||
--- | ||
apiVersion: lib.projectsveltos.io/v1beta1 | ||
kind: EventTrigger | ||
metadata: | ||
name: credentials-secret | ||
spec: | ||
sourceClusterSelector: | ||
matchLabels: | ||
type: services | ||
destinationClusterSelector: | ||
matchLabels: | ||
type: mgmt | ||
eventSourceName: detect-credentials-secret | ||
oneForEvent: true | ||
policyRefs: | ||
- name: credentials | ||
namespace: default | ||
kind: ConfigMap | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: credentials | ||
namespace: default | ||
annotations: | ||
projectsveltos.io/instantiate: ok | ||
data: | ||
credentials: | | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ .Resource.metadata.name }}-credentials | ||
namespace: {{ .Resource.metadata.namespace }} | ||
data: | ||
"password": "{{ get .Resource.data `password` }}" | ||
"user": "{{ get .Resource.data `username` }}" | ||
"namespace": "{{ get .Resource.metadata.labels `cnpg.io/cluster` |b64enc }}" | ||
--- | ||
## Fetch postgres loadbalancer external-ip:port from the cluster where services are deployed. | ||
## Create a ConfigMap in the management cluster that contains those info | ||
## ConfigMap is named pg-loadbalancer-data and it is created in the same namespace of the managed cluster | ||
apiVersion: lib.projectsveltos.io/v1beta1 | ||
kind: EventSource | ||
metadata: | ||
name: detect-loadbalancer | ||
spec: | ||
collectResources: true | ||
resourceSelectors: | ||
- group: "" | ||
version: "v1" | ||
kind: "Service" | ||
labelFilters: | ||
- key: cnpg.io/isManaged | ||
operation: Equal | ||
value: "true" | ||
--- | ||
apiVersion: lib.projectsveltos.io/v1beta1 | ||
kind: EventTrigger | ||
metadata: | ||
name: cnpg-loadbalancer-data | ||
spec: | ||
sourceClusterSelector: | ||
matchLabels: | ||
type: services | ||
destinationClusterSelector: | ||
matchLabels: | ||
type: mgmt | ||
eventSourceName: detect-loadbalancer | ||
oneForEvent: true | ||
policyRefs: | ||
- name: loadbalancer-data | ||
namespace: default | ||
kind: ConfigMap | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: loadbalancer-data | ||
namespace: default | ||
annotations: | ||
projectsveltos.io/instantiate: ok | ||
data: | ||
credentials: | | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ .Resource.metadata.name }}-lb-data | ||
namespace: {{ .Resource.metadata.namespace }} | ||
data: | ||
external-ip: {{ (index .Resource.status.loadBalancer.ingress 0).ip }} | ||
port: "{{ (index .Resource.spec.ports 0).targetPort }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
## Fetch postgres credentials from the cluster where services are deployed. | ||
## Create a Secret in the management cluster that contains the credentials | ||
## Secret is named pg-credentials and it is created in the same namespace of the managed cluster | ||
apiVersion: lib.projectsveltos.io/v1beta1 | ||
kind: EventSource | ||
metadata: | ||
name: detect-credentials-secret | ||
spec: | ||
collectResources: true | ||
resourceSelectors: | ||
- group: "" | ||
version: "v1" | ||
kind: "Secret" | ||
labelFilters: | ||
- key: cnpg.io/reload | ||
operation: Equal | ||
value: "true" | ||
--- | ||
apiVersion: lib.projectsveltos.io/v1beta1 | ||
kind: EventTrigger | ||
metadata: | ||
name: credentials-secret | ||
spec: | ||
sourceClusterSelector: | ||
matchLabels: | ||
type: services | ||
destinationClusterSelector: | ||
matchLabels: | ||
type: mgmt | ||
eventSourceName: detect-credentials-secret | ||
oneForEvent: true | ||
policyRefs: | ||
- name: credentials | ||
namespace: default | ||
kind: ConfigMap | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: credentials | ||
namespace: default | ||
annotations: | ||
projectsveltos.io/instantiate: ok | ||
data: | ||
credentials: | | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: pg-credentials | ||
namespace: {{ .Resource.metadata.namespace }} | ||
data: | ||
"password": "{{ get .Resource.data `password` }}" | ||
"user": "{{ get .Resource.data `username` }}" | ||
--- | ||
## Fetch postgres loadbalancer external-ip:port from the cluster where services are deployed. | ||
## Create a ConfigMap in the management cluster that contains those info | ||
## ConfigMap is named pg-loadbalancer-data and it is created in the same namespace of the managed cluster | ||
apiVersion: lib.projectsveltos.io/v1beta1 | ||
kind: EventSource | ||
metadata: | ||
name: detect-loadbalancer | ||
spec: | ||
collectResources: true | ||
resourceSelectors: | ||
- group: "" | ||
version: "v1" | ||
kind: "Service" | ||
labelFilters: | ||
- key: cnpg.io/isManaged | ||
operation: Equal | ||
value: "true" | ||
--- | ||
apiVersion: lib.projectsveltos.io/v1beta1 | ||
kind: EventTrigger | ||
metadata: | ||
name: cnpg-loadbalancer-data | ||
spec: | ||
sourceClusterSelector: | ||
matchLabels: | ||
type: services | ||
destinationClusterSelector: | ||
matchLabels: | ||
type: mgmt | ||
eventSourceName: detect-loadbalancer | ||
oneForEvent: true | ||
policyRefs: | ||
- name: loadbalancer-data | ||
namespace: default | ||
kind: ConfigMap | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: loadbalancer-data | ||
namespace: default | ||
annotations: | ||
projectsveltos.io/instantiate: ok | ||
data: | ||
credentials: | | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: pg-loadbalancer-data | ||
namespace: {{ .Resource.metadata.namespace }} | ||
data: | ||
external-ip: {{ (index .Resource.status.loadBalancer.ingress 0).ip }} | ||
port: "{{ (index .Resource.spec.ports 0).targetPort }}" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.