test6
This commit is contained in:
44
.github/workflows/ci-0.5.yml
vendored
44
.github/workflows/ci-0.5.yml
vendored
@@ -1,44 +0,0 @@
|
||||
name: CI v0.5
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- 'releases/v0.5'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
fleet_version:
|
||||
- v0.3.9
|
||||
- v0.4.0
|
||||
- v0.5.0
|
||||
|
||||
steps:
|
||||
-
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: "release/v0.5"
|
||||
-
|
||||
uses: actions/cache@v3
|
||||
id: fleet-cli-cache
|
||||
with:
|
||||
path: /home/runner/.local/bin
|
||||
key: ${{ runner.os }}-fleet-cli-${{ matrix.fleet_version }}
|
||||
-
|
||||
name: Download CLI
|
||||
if: steps.fleet-cli-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
mkdir -p /home/runner/.local/bin
|
||||
wget -nv "https://github.com/rancher/fleet/releases/download/${{ matrix.fleet_version }}/fleet-linux-amd64"
|
||||
mv fleet-linux-amd64 /home/runner/.local/bin/fleet
|
||||
chmod +x /home/runner/.local/bin/fleet
|
||||
-
|
||||
name: Test
|
||||
run: |
|
||||
tests/test.sh
|
||||
42
.github/workflows/ci-0.6.yml
vendored
42
.github/workflows/ci-0.6.yml
vendored
@@ -1,42 +0,0 @@
|
||||
name: CI v0.6
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- 'releases/v0.6'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
fleet_version:
|
||||
- "v0.6.0"
|
||||
|
||||
steps:
|
||||
-
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: "release/v0.6"
|
||||
-
|
||||
uses: actions/cache@v3
|
||||
id: fleet-cli-cache
|
||||
with:
|
||||
path: /home/runner/.local/bin
|
||||
key: ${{ runner.os }}-fleet-cli-${{ matrix.fleet_version }}
|
||||
-
|
||||
name: Download CLI
|
||||
if: steps.fleet-cli-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
mkdir -p /home/runner/.local/bin
|
||||
wget -nv "https://github.com/rancher/fleet/releases/download/${{ matrix.fleet_version }}/fleet-linux-amd64"
|
||||
mv fleet-linux-amd64 /home/runner/.local/bin/fleet
|
||||
chmod +x /home/runner/.local/bin/fleet
|
||||
-
|
||||
name: Test
|
||||
run: |
|
||||
tests/test.sh
|
||||
42
.github/workflows/ci.yml
vendored
42
.github/workflows/ci.yml
vendored
@@ -1,42 +0,0 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 5 * * *'
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
fleet_version:
|
||||
- "v0.8.1"
|
||||
- "v0.9.0"
|
||||
|
||||
steps:
|
||||
-
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
-
|
||||
uses: actions/cache@v3
|
||||
id: fleet-cli-cache
|
||||
with:
|
||||
path: /home/runner/.local/bin
|
||||
key: ${{ runner.os }}-fleet-cli-${{ matrix.fleet_version }}
|
||||
-
|
||||
name: Download CLI
|
||||
if: steps.fleet-cli-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
mkdir -p /home/runner/.local/bin
|
||||
wget -nv "https://github.com/rancher/fleet/releases/download/${{ matrix.fleet_version }}/fleet-linux-amd64"
|
||||
mv fleet-linux-amd64 /home/runner/.local/bin/fleet
|
||||
chmod +x /home/runner/.local/bin/fleet
|
||||
-
|
||||
name: Test
|
||||
run: |
|
||||
tests/test.sh
|
||||
@@ -1,17 +0,0 @@
|
||||
# AppCo Example
|
||||
|
||||
This example will deploy the [Istio SUSE Application Collection](https://docs.apps.rancher.io/reference-guides/istio/).
|
||||
The app will be deployed into the `istio-system` namespace. Note that you must have create the `application-collection` secret into the `istio-system` namespace using the [AppCo Username](https://apps.rancher.io/settings/profile) as username and the [AppCo Access token](https://apps.rancher.io/settings/access-tokens) as password.
|
||||
|
||||
```yaml
|
||||
kind: GitRepo
|
||||
apiVersion: fleet.cattle.io/v1alpha1
|
||||
metadata:
|
||||
name: appcotest
|
||||
namespace: fleet-local
|
||||
spec:
|
||||
repo: https://github.com/rancher/fleet-examples
|
||||
branch: master
|
||||
paths:
|
||||
- appco
|
||||
```
|
||||
@@ -1,23 +0,0 @@
|
||||
defaultNamespace: istio-system
|
||||
helm:
|
||||
releaseName: rancher-istio
|
||||
chart: "oci://dp.apps.rancher.io/charts/istio"
|
||||
version: "0.8.1"
|
||||
force: false
|
||||
timeoutSeconds: 0
|
||||
targetNamespace: istio-system
|
||||
values:
|
||||
global:
|
||||
imagePullSecrets: [ "application-collection" ]
|
||||
diff:
|
||||
comparePatches:
|
||||
- apiVersion: admissionregistration.k8s.io/v1
|
||||
kind: ValidatingWebhookConfiguration
|
||||
name: istio-validator-istio-system
|
||||
operations:
|
||||
- {"op": "remove", "path":"/webhooks"}
|
||||
- apiVersion: admissionregistration.k8s.io/v1
|
||||
kind: ValidatingWebhookConfiguration
|
||||
name: istiod-default-validator
|
||||
operations:
|
||||
- {"op": "remove", "path":"/webhooks"}
|
||||
17
fleet.yaml
17
fleet.yaml
@@ -1,17 +0,0 @@
|
||||
namespace: default
|
||||
targetCustomizations:
|
||||
- name: v1
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
app: v1
|
||||
yaml:
|
||||
overlays:
|
||||
- zxp/v1
|
||||
|
||||
- name: v2
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
app: v2
|
||||
yaml:
|
||||
overlays:
|
||||
- zxp/v2
|
||||
@@ -1,16 +0,0 @@
|
||||
# Hardened Example
|
||||
|
||||
This example will deploy the [Kubernetes sample guestbook](https://github.com/kubernetes/examples/tree/master/guestbook/) application, with modifications to securityContext which allow its deployment on a hardened cluster.
|
||||
The app will be deployed into the `default` namespace. Note that you must have added the `default` namespace to the PSA to allow deployments to this namespace.
|
||||
|
||||
```yaml
|
||||
kind: GitRepo
|
||||
apiVersion: fleet.cattle.io/v1alpha1
|
||||
metadata:
|
||||
name: simple
|
||||
namespace: fleet-local
|
||||
spec:
|
||||
repo: https://github.com/rancher/fleet-examples
|
||||
paths:
|
||||
- hardened
|
||||
```
|
||||
@@ -1,4 +0,0 @@
|
||||
namespace: hardened-fleet-deployments
|
||||
|
||||
namespaceLabels:
|
||||
pod-security.kubernetes.io/enforce: baseline
|
||||
@@ -1,33 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: frontend
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: guestbook
|
||||
tier: frontend
|
||||
replicas: 3
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: guestbook
|
||||
tier: frontend
|
||||
spec:
|
||||
containers:
|
||||
- name: php-redis
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
runAsNonRoot: true
|
||||
runAsUser: 1000
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
capabilities:
|
||||
drop: ["ALL"]
|
||||
image: us-docker.pkg.dev/google-samples/containers/gke/gb-frontend:v5
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
ports:
|
||||
- containerPort: 80
|
||||
@@ -1,14 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: frontend
|
||||
labels:
|
||||
app: guestbook
|
||||
tier: frontend
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- port: 80
|
||||
selector:
|
||||
app: guestbook
|
||||
tier: frontend
|
||||
@@ -1,35 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: redis-master
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: redis
|
||||
role: master
|
||||
tier: backend
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: redis
|
||||
role: master
|
||||
tier: backend
|
||||
spec:
|
||||
containers:
|
||||
- name: master
|
||||
image: redis:7-alpine
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
runAsNonRoot: true
|
||||
runAsUser: 1000
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
capabilities:
|
||||
drop: ["ALL"]
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
@@ -1,16 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: redis-master
|
||||
labels:
|
||||
app: redis
|
||||
role: master
|
||||
tier: backend
|
||||
spec:
|
||||
ports:
|
||||
- port: 6379
|
||||
targetPort: 6379
|
||||
selector:
|
||||
app: redis
|
||||
role: master
|
||||
tier: backend
|
||||
@@ -1,35 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: redis-slave
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: redis
|
||||
role: slave
|
||||
tier: backend
|
||||
replicas: 2
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: redis
|
||||
role: slave
|
||||
tier: backend
|
||||
spec:
|
||||
containers:
|
||||
- name: slave
|
||||
image: redis:7-alpine
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
runAsNonRoot: true
|
||||
runAsUser: 1000
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
capabilities:
|
||||
drop: ["ALL"]
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
@@ -1,15 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: redis-slave
|
||||
labels:
|
||||
app: redis
|
||||
role: slave
|
||||
tier: backend
|
||||
spec:
|
||||
ports:
|
||||
- port: 6379
|
||||
selector:
|
||||
app: redis
|
||||
role: slave
|
||||
tier: backend
|
||||
@@ -1,38 +0,0 @@
|
||||
# Multi-Cluster Helm External Example
|
||||
|
||||
This example will deploy the [Kubernetes sample guestbook](https://github.com/kubernetes/examples/tree/master/guestbook/) application as
|
||||
packaged as a Helm chart downloaded from a third party source.
|
||||
The app will be deployed into the `fleet-mc-helm-external-example` namespace.
|
||||
|
||||
The application will be customized as follows per environment:
|
||||
|
||||
* Dev clusters: Only the redis leader is deployed and not the followers.
|
||||
* Test clusters: Scale the front deployment to 3
|
||||
* Prod clusters: Scale the front deployment to 3 and set the service type to LoadBalancer
|
||||
|
||||
```yaml
|
||||
kind: GitRepo
|
||||
apiVersion: fleet.cattle.io/v1alpha1
|
||||
metadata:
|
||||
name: helm-external
|
||||
namespace: fleet-default
|
||||
spec:
|
||||
repo: https://github.com/rancher/fleet-examples
|
||||
paths:
|
||||
- multi-cluster/helm-external
|
||||
targets:
|
||||
- name: dev
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
env: dev
|
||||
|
||||
- name: test
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
env: test
|
||||
|
||||
- name: prod
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
env: prod
|
||||
```
|
||||
@@ -1,28 +0,0 @@
|
||||
namespace: fleet-mc-helm-external-example
|
||||
helm:
|
||||
chart: https://github.com/rancher/fleet-examples/releases/download/example/guestbook-0.0.1.tgz
|
||||
targetCustomizations:
|
||||
- name: dev
|
||||
helm:
|
||||
values:
|
||||
replication: false
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
env: dev
|
||||
|
||||
- name: test
|
||||
helm:
|
||||
values:
|
||||
replicas: 3
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
env: test
|
||||
|
||||
- name: prod
|
||||
helm:
|
||||
values:
|
||||
serviceType: LoadBalancer
|
||||
replicas: 3
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
env: prod
|
||||
@@ -1,38 +0,0 @@
|
||||
# Multi-Cluster Helm Kustomize Example
|
||||
|
||||
This example will deploy the [Kubernetes sample guestbook](https://github.com/kubernetes/examples/tree/master/guestbook/) application as
|
||||
packaged as a Helm chart downloaded from a third party source and will modify the helm chart using Kustomize.
|
||||
The app will be deployed into the `fleet-mc-helm-kustomize-example` namespace.
|
||||
|
||||
The application will be customized as follows per environment:
|
||||
|
||||
* Dev clusters: Only the redis leader is deployed and not the followers.
|
||||
* Test clusters: Scale the front deployment to 3
|
||||
* Prod clusters: Scale the front deployment to 3 and set the service type to LoadBalancer
|
||||
|
||||
```yaml
|
||||
kind: GitRepo
|
||||
apiVersion: fleet.cattle.io/v1alpha1
|
||||
metadata:
|
||||
name: helm-kustomize
|
||||
namespace: fleet-default
|
||||
spec:
|
||||
repo: https://github.com/rancher/fleet-examples
|
||||
paths:
|
||||
- multi-cluster/helm-kustomize
|
||||
targets:
|
||||
- name: dev
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
env: dev
|
||||
|
||||
- name: test
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
env: test
|
||||
|
||||
- name: prod
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
env: prod
|
||||
```
|
||||
@@ -1,24 +0,0 @@
|
||||
namespace: fleet-mc-helm-kustomize-example
|
||||
helm:
|
||||
chart: https://github.com/rancher/fleet-examples/releases/download/example/guestbook-0.0.1.tgz
|
||||
targetCustomizations:
|
||||
- name: dev
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
env: dev
|
||||
kustomize:
|
||||
dir: overlays/dev
|
||||
|
||||
- name: test
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
env: test
|
||||
kustomize:
|
||||
dir: overlays/test
|
||||
|
||||
- name: prod
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
env: prod
|
||||
kustomize:
|
||||
dir: overlays/prod
|
||||
@@ -1,3 +0,0 @@
|
||||
patchesStrategicMerge:
|
||||
- redis-slave-deployment.yaml
|
||||
- redis-slave-service.yaml
|
||||
@@ -1,6 +0,0 @@
|
||||
kind: Deployment
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: redis-slave
|
||||
spec:
|
||||
replicas: 0
|
||||
@@ -1,7 +0,0 @@
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: redis-slave
|
||||
spec:
|
||||
selector:
|
||||
role: master
|
||||
@@ -1,6 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: frontend
|
||||
spec:
|
||||
replicas: 3
|
||||
@@ -1,6 +0,0 @@
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: frontend
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
@@ -1,3 +0,0 @@
|
||||
patchesStrategicMerge:
|
||||
- frontend-deployment.yaml
|
||||
- frontend-service.yaml
|
||||
@@ -1,6 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: frontend
|
||||
spec:
|
||||
replicas: 3
|
||||
@@ -1,2 +0,0 @@
|
||||
patchesStrategicMerge:
|
||||
- frontend-deployment.yaml
|
||||
@@ -1,5 +0,0 @@
|
||||
apiVersion: v2
|
||||
name: guestbook
|
||||
description: Sample application
|
||||
version: 0.0.0
|
||||
appVersion: 0.0.0
|
||||
@@ -1,38 +0,0 @@
|
||||
# Multi-Cluster Helm Example
|
||||
|
||||
This example will deploy the [Kubernetes sample guestbook](https://github.com/kubernetes/examples/tree/master/guestbook/) application as
|
||||
packaged as a Helm chart.
|
||||
The app will be deployed into the `fleet-mc-helm-example` namespace.
|
||||
|
||||
The application will be customized as follows per environment:
|
||||
|
||||
* Dev clusters: Only the redis leader is deployed and not the followers.
|
||||
* Test clusters: Scale the front deployment to 3
|
||||
* Prod clusters: Scale the front deployment to 3 and set the service type to LoadBalancer
|
||||
|
||||
```yaml
|
||||
kind: GitRepo
|
||||
apiVersion: fleet.cattle.io/v1alpha1
|
||||
metadata:
|
||||
name: helm
|
||||
namespace: fleet-default
|
||||
spec:
|
||||
repo: https://github.com/rancher/fleet-examples
|
||||
paths:
|
||||
- multi-cluster/helm
|
||||
targets:
|
||||
- name: dev
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
env: dev
|
||||
|
||||
- name: test
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
env: test
|
||||
|
||||
- name: prod
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
env: prod
|
||||
```
|
||||
@@ -1,26 +0,0 @@
|
||||
namespace: fleet-mc-helm-example
|
||||
targetCustomizations:
|
||||
- name: dev
|
||||
helm:
|
||||
values:
|
||||
replication: false
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
env: dev
|
||||
|
||||
- name: test
|
||||
helm:
|
||||
values:
|
||||
replicas: 3
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
env: test
|
||||
|
||||
- name: prod
|
||||
helm:
|
||||
values:
|
||||
serviceType: LoadBalancer
|
||||
replicas: 3
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
env: prod
|
||||
@@ -1,25 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: frontend
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: guestbook
|
||||
tier: frontend
|
||||
replicas: {{ .Values.replicas }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: guestbook
|
||||
tier: frontend
|
||||
spec:
|
||||
containers:
|
||||
- name: php-redis
|
||||
image: us-docker.pkg.dev/google-samples/containers/gke/gb-frontend:v5
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
ports:
|
||||
- containerPort: 80
|
||||
@@ -1,14 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: frontend
|
||||
labels:
|
||||
app: guestbook
|
||||
tier: frontend
|
||||
spec:
|
||||
type: "{{ .Values.serviceType }}"
|
||||
ports:
|
||||
- port: 80
|
||||
selector:
|
||||
app: guestbook
|
||||
tier: frontend
|
||||
@@ -1,27 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: redis-master
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: redis
|
||||
role: master
|
||||
tier: backend
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: redis
|
||||
role: master
|
||||
tier: backend
|
||||
spec:
|
||||
containers:
|
||||
- name: master
|
||||
image: redis
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
@@ -1,16 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: redis-master
|
||||
labels:
|
||||
app: redis
|
||||
role: master
|
||||
tier: backend
|
||||
spec:
|
||||
ports:
|
||||
- port: 6379
|
||||
targetPort: 6379
|
||||
selector:
|
||||
app: redis
|
||||
role: master
|
||||
tier: backend
|
||||
@@ -1,29 +0,0 @@
|
||||
{{ if .Values.replication }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: redis-slave
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: redis
|
||||
role: slave
|
||||
tier: backend
|
||||
replicas: 2
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: redis
|
||||
role: slave
|
||||
tier: backend
|
||||
spec:
|
||||
containers:
|
||||
- name: slave
|
||||
image: redis
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
{{ end }}
|
||||
@@ -1,19 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: redis-slave
|
||||
labels:
|
||||
app: redis
|
||||
role: slave
|
||||
tier: backend
|
||||
spec:
|
||||
ports:
|
||||
- port: 6379
|
||||
selector:
|
||||
app: redis
|
||||
{{ if .Values.replication }}
|
||||
role: slave
|
||||
{{ else }}
|
||||
role: master
|
||||
{{ end }}
|
||||
tier: backend
|
||||
@@ -1,3 +0,0 @@
|
||||
replication: true
|
||||
replicas: 1
|
||||
serviceType: NodePort
|
||||
@@ -1,37 +0,0 @@
|
||||
# Multi-Cluster Kustomize Example
|
||||
|
||||
This example will deploy the [Kubernetes sample guestbook](https://github.com/kubernetes/examples/tree/master/guestbook/) application
|
||||
using kustomize. The app will be deployed into the `fleet-mc-kustomize-example` namespace.
|
||||
|
||||
The application will be customized as follows per environment:
|
||||
|
||||
* Dev clusters: Only the redis leader is deployed and not the followers.
|
||||
* Test clusters: Scale the front deployment to 3
|
||||
* Prod clusters: Scale the front deployment to 3 and set the service type to LoadBalancer
|
||||
|
||||
```yaml
|
||||
kind: GitRepo
|
||||
apiVersion: fleet.cattle.io/v1alpha1
|
||||
metadata:
|
||||
name: kustomize
|
||||
namespace: fleet-default
|
||||
spec:
|
||||
repo: https://github.com/rancher/fleet-examples
|
||||
paths:
|
||||
- multi-cluster/kustomize
|
||||
targets:
|
||||
- name: dev
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
env: dev
|
||||
|
||||
- name: test
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
env: test
|
||||
|
||||
- name: prod
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
env: prod
|
||||
```
|
||||
@@ -1,25 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: frontend
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: guestbook
|
||||
tier: frontend
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: guestbook
|
||||
tier: frontend
|
||||
spec:
|
||||
containers:
|
||||
- name: php-redis
|
||||
image: us-docker.pkg.dev/google-samples/containers/gke/gb-frontend:v5
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
ports:
|
||||
- containerPort: 80
|
||||
@@ -1,14 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: frontend
|
||||
labels:
|
||||
app: guestbook
|
||||
tier: frontend
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- port: 80
|
||||
selector:
|
||||
app: guestbook
|
||||
tier: frontend
|
||||
@@ -1,7 +0,0 @@
|
||||
resources:
|
||||
- frontend-deployment.yaml
|
||||
- frontend-service.yaml
|
||||
- redis-master-deployment.yaml
|
||||
- redis-master-service.yaml
|
||||
- redis-slave-deployment.yaml
|
||||
- redis-slave-service.yaml
|
||||
@@ -1,27 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: redis-master
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: redis
|
||||
role: master
|
||||
tier: backend
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: redis
|
||||
role: master
|
||||
tier: backend
|
||||
spec:
|
||||
containers:
|
||||
- name: master
|
||||
image: redis
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
@@ -1,16 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: redis-master
|
||||
labels:
|
||||
app: redis
|
||||
role: master
|
||||
tier: backend
|
||||
spec:
|
||||
ports:
|
||||
- port: 6379
|
||||
targetPort: 6379
|
||||
selector:
|
||||
app: redis
|
||||
role: master
|
||||
tier: backend
|
||||
@@ -1,27 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: redis-slave
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: redis
|
||||
role: slave
|
||||
tier: backend
|
||||
replicas: 2
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: redis
|
||||
role: slave
|
||||
tier: backend
|
||||
spec:
|
||||
containers:
|
||||
- name: slave
|
||||
image: redis
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
@@ -1,15 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: redis-slave
|
||||
labels:
|
||||
app: redis
|
||||
role: slave
|
||||
tier: backend
|
||||
spec:
|
||||
ports:
|
||||
- port: 6379
|
||||
selector:
|
||||
app: redis
|
||||
role: slave
|
||||
tier: backend
|
||||
@@ -1,22 +0,0 @@
|
||||
namespace: fleet-mc-kustomize-example
|
||||
targetCustomizations:
|
||||
- name: dev
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
env: dev
|
||||
kustomize:
|
||||
dir: overlays/dev
|
||||
|
||||
- name: test
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
env: test
|
||||
kustomize:
|
||||
dir: overlays/test
|
||||
|
||||
- name: prod
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
env: prod
|
||||
kustomize:
|
||||
dir: overlays/prod
|
||||
@@ -1,5 +0,0 @@
|
||||
resources:
|
||||
- ../../base
|
||||
patchesStrategicMerge:
|
||||
- redis-slave-deployment.yaml
|
||||
- redis-slave-service.yaml
|
||||
@@ -1,6 +0,0 @@
|
||||
kind: Deployment
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: redis-slave
|
||||
spec:
|
||||
replicas: 0
|
||||
@@ -1,7 +0,0 @@
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: redis-slave
|
||||
spec:
|
||||
selector:
|
||||
role: master
|
||||
@@ -1,6 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: frontend
|
||||
spec:
|
||||
replicas: 3
|
||||
@@ -1,6 +0,0 @@
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: frontend
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
@@ -1,5 +0,0 @@
|
||||
resources:
|
||||
- ../../base
|
||||
patchesStrategicMerge:
|
||||
- frontend-deployment.yaml
|
||||
- frontend-service.yaml
|
||||
@@ -1,6 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: frontend
|
||||
spec:
|
||||
replicas: 3
|
||||
@@ -1,4 +0,0 @@
|
||||
resources:
|
||||
- ../../base
|
||||
patchesStrategicMerge:
|
||||
- frontend-deployment.yaml
|
||||
@@ -1,37 +0,0 @@
|
||||
# Multi-Cluster Manifests Example
|
||||
|
||||
This example will deploy the [Kubernetes sample guestbook](https://github.com/kubernetes/examples/tree/master/guestbook/) application.
|
||||
The app will be deployed into the `fleet-mc-manifest-example` namespace.
|
||||
|
||||
The application will be customized as follows per environment:
|
||||
|
||||
* Dev clusters: Only the redis leader is deployed and not the followers.
|
||||
* Test clusters: Scale the front deployment to 3
|
||||
* Prod clusters: Scale the front deployment to 3 and set the service type to LoadBalancer
|
||||
|
||||
```yaml
|
||||
kind: GitRepo
|
||||
apiVersion: fleet.cattle.io/v1alpha1
|
||||
metadata:
|
||||
name: manifests
|
||||
namespace: fleet-default
|
||||
spec:
|
||||
repo: https://github.com/rancher/fleet-examples
|
||||
paths:
|
||||
- multi-cluster/manifests
|
||||
targets:
|
||||
- name: dev
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
env: dev
|
||||
|
||||
- name: test
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
env: test
|
||||
|
||||
- name: prod
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
env: prod
|
||||
```
|
||||
@@ -1,29 +0,0 @@
|
||||
namespace: fleet-mc-manifest-example
|
||||
targetCustomizations:
|
||||
- name: dev
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
env: dev
|
||||
yaml:
|
||||
overlays:
|
||||
# Refers to overlays/noreplication folder
|
||||
- noreplication
|
||||
|
||||
- name: test
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
env: test
|
||||
yaml:
|
||||
overlays:
|
||||
# Refers to overlays/scale3 folder
|
||||
- scale3
|
||||
|
||||
- name: prod
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
env: prod
|
||||
yaml:
|
||||
# Refers to overlays/servicelb, scale3 folders
|
||||
overlays:
|
||||
- servicelb
|
||||
- scale3
|
||||
@@ -1,25 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: frontend
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: guestbook
|
||||
tier: frontend
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: guestbook
|
||||
tier: frontend
|
||||
spec:
|
||||
containers:
|
||||
- name: php-redis
|
||||
image: us-docker.pkg.dev/google-samples/containers/gke/gb-frontend:v5
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
ports:
|
||||
- containerPort: 80
|
||||
@@ -1,14 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: frontend
|
||||
labels:
|
||||
app: guestbook
|
||||
tier: frontend
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- port: 80
|
||||
selector:
|
||||
app: guestbook
|
||||
tier: frontend
|
||||
@@ -1,3 +0,0 @@
|
||||
spec:
|
||||
selector:
|
||||
role: master
|
||||
@@ -1,2 +0,0 @@
|
||||
spec:
|
||||
replicas: 3
|
||||
@@ -1,2 +0,0 @@
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
@@ -1,27 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: redis-master
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: redis
|
||||
role: master
|
||||
tier: backend
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: redis
|
||||
role: master
|
||||
tier: backend
|
||||
spec:
|
||||
containers:
|
||||
- name: master
|
||||
image: redis
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
@@ -1,16 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: redis-master
|
||||
labels:
|
||||
app: redis
|
||||
role: master
|
||||
tier: backend
|
||||
spec:
|
||||
ports:
|
||||
- port: 6379
|
||||
targetPort: 6379
|
||||
selector:
|
||||
app: redis
|
||||
role: master
|
||||
tier: backend
|
||||
@@ -1,27 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: redis-slave
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: redis
|
||||
role: slave
|
||||
tier: backend
|
||||
replicas: 2
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: redis
|
||||
role: slave
|
||||
tier: backend
|
||||
spec:
|
||||
containers:
|
||||
- name: slave
|
||||
image: redis
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
@@ -1,15 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: redis-slave
|
||||
labels:
|
||||
app: redis
|
||||
role: slave
|
||||
tier: backend
|
||||
spec:
|
||||
ports:
|
||||
- port: 6379
|
||||
selector:
|
||||
app: redis
|
||||
role: slave
|
||||
tier: backend
|
||||
@@ -1,5 +0,0 @@
|
||||
apiVersion: v2
|
||||
name: windows-app
|
||||
description: Sample Windows application
|
||||
version: 0.0.0
|
||||
appVersion: 0.0.0
|
||||
@@ -1,48 +0,0 @@
|
||||
# Windows Helm Example
|
||||
|
||||
This example will deploy the [Windows application example](https://kubernetes.io/docs/setup/production-environment/windows/user-guide-windows-containers/) packaged as a Helm chart.
|
||||
It must be deployed in a multi-cluster configuration, and requires Fleet v0.3.4+.
|
||||
For more information, check out the [Fleet docs](https://rancher.com/docs/rancher/v2.x/en/deploy-across-clusters/fleet/).
|
||||
|
||||
## Preparing Your Downstream Cluster(s)
|
||||
|
||||
Clusters (`clusters.fleet.cattle.io`) must have the `windows.version` label in order for the example to be deployed.
|
||||
You can determine the value for the `windows.version` label key based on the release version of your Windows node(s).
|
||||
|
||||
Description | Example
|
||||
--- | ---
|
||||
For Windows Server SAC nodes, the value will be the SAC release number (prepended with "win"). | 2004 SAC would result in `windows.version: win2004`
|
||||
For Windows Server LTSC nodes, the value will be the SAC release number that the LTSC is based on (prepended with "win"). | 2019 LTSC would result in `windows.version: win1809`
|
||||
|
||||
## Creating the GitRepo
|
||||
|
||||
Create the following `GitRepo` in your local cluster to get started.
|
||||
|
||||
```yaml
|
||||
kind: GitRepo
|
||||
apiVersion: fleet.cattle.io/v1alpha1
|
||||
metadata:
|
||||
name: helm
|
||||
namespace: fleet-default
|
||||
spec:
|
||||
repo: https://github.com/rancher/fleet-examples
|
||||
paths:
|
||||
- multi-cluster/windows-helm
|
||||
targets:
|
||||
- name: win2004
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
windows.version: win2004
|
||||
- name: win1909
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
windows.version: win1909
|
||||
- name: win1903
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
windows.version: win1903
|
||||
- name: win1809
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
windows.version: win1809
|
||||
```
|
||||
@@ -1,50 +0,0 @@
|
||||
namespace: fleet-helm-windows-example
|
||||
targetCustomizations:
|
||||
- name: win2022
|
||||
helm:
|
||||
values:
|
||||
image:
|
||||
tag: ltsc2022
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
windows.version: win2022
|
||||
- name: win2019
|
||||
helm:
|
||||
values:
|
||||
image:
|
||||
tag: ltsc2019
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
windows.version: win2019
|
||||
- name: win2004
|
||||
helm:
|
||||
values:
|
||||
image:
|
||||
tag: 2004
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
windows.version: win2004
|
||||
- name: win1909
|
||||
helm:
|
||||
values:
|
||||
image:
|
||||
tag: 1909
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
windows.version: win1909
|
||||
- name: win1903
|
||||
helm:
|
||||
values:
|
||||
image:
|
||||
tag: 1903
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
windows.version: win1903
|
||||
- name: win1809
|
||||
helm:
|
||||
values:
|
||||
image:
|
||||
tag: 1809
|
||||
clusterSelector:
|
||||
matchLabels:
|
||||
windows.version: win1809
|
||||
@@ -1,47 +0,0 @@
|
||||
# Source: https://kubernetes.io/docs/setup/production-environment/windows/user-guide-windows-containers/
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: win-webserver
|
||||
labels:
|
||||
app: win-webserver
|
||||
spec:
|
||||
ports:
|
||||
# the port that this service should serve on
|
||||
- port: 80
|
||||
targetPort: 80
|
||||
selector:
|
||||
app: win-webserver
|
||||
type: NodePort
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: win-webserver
|
||||
name: win-webserver
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: win-webserver
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: win-webserver
|
||||
name: win-webserver
|
||||
spec:
|
||||
containers:
|
||||
- name: windowswebserver
|
||||
image: "mcr.microsoft.com/windows/servercore:{{ .Values.image.tag }}"
|
||||
command:
|
||||
- powershell.exe
|
||||
- -command
|
||||
- "<#code used from https://gist.github.com/19WAS85/5424431#> ; $$listener = New-Object System.Net.HttpListener ; $$listener.Prefixes.Add('http://*:80/') ; $$listener.Start() ; $$callerCounts = @{} ; Write-Host('Listening at http://*:80/') ; while ($$listener.IsListening) { ;$$context = $$listener.GetContext() ;$$requestUrl = $$context.Request.Url ;$$clientIP = $$context.Request.RemoteEndPoint.Address ;$$response = $$context.Response ;Write-Host '' ;Write-Host('> {0}' -f $$requestUrl) ; ;$$count = 1 ;$$k=$$callerCounts.Get_Item($$clientIP) ;if ($$k -ne $$null) { $$count += $$k } ;$$callerCounts.Set_Item($$clientIP, $$count) ;$$ip=(Get-NetAdapter | Get-NetIpAddress); $$header='<html><body><H1>Windows Container Web Server</H1>' ;$$callerCountsString='' ;$$callerCounts.Keys | % { $$callerCountsString+='<p>IP {0} callerCount {1} ' -f $$ip[1].IPAddress,$$callerCounts.Item($$_) } ;$$footer='</body></html>' ;$$content='{0}{1}{2}' -f $$header,$$callerCountsString,$$footer ;Write-Output $$content ;$$buffer = [System.Text.Encoding]::UTF8.GetBytes($$content) ;$$response.ContentLength64 = $$buffer.Length ;$$response.OutputStream.Write($$buffer, 0, $$buffer.Length) ;$$response.Close() ;$$responseStatus = $$response.StatusCode ;Write-Host('< {0}' -f $$responseStatus) } ; "
|
||||
nodeSelector:
|
||||
kubernetes.io/os: windows
|
||||
tolerations:
|
||||
- key: cattle.io/os
|
||||
operator: "Equal"
|
||||
value: "windows"
|
||||
effect: NoSchedule
|
||||
@@ -1,2 +0,0 @@
|
||||
image:
|
||||
tag: ltsc2022
|
||||
@@ -1,16 +0,0 @@
|
||||
# Simple Example
|
||||
|
||||
This example will deploy the [Kubernetes sample guestbook](https://github.com/kubernetes/examples/tree/master/guestbook/) application.
|
||||
The app will be deployed into the `default` namespace.
|
||||
|
||||
```yaml
|
||||
kind: GitRepo
|
||||
apiVersion: fleet.cattle.io/v1alpha1
|
||||
metadata:
|
||||
name: simple
|
||||
namespace: fleet-local
|
||||
spec:
|
||||
repo: https://github.com/rancher/fleet-examples
|
||||
paths:
|
||||
- simple
|
||||
```
|
||||
@@ -1,25 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: frontend
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: guestbook
|
||||
tier: frontend
|
||||
replicas: 3
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: guestbook
|
||||
tier: frontend
|
||||
spec:
|
||||
containers:
|
||||
- name: php-redis
|
||||
image: us-docker.pkg.dev/google-samples/containers/gke/gb-frontend:v5
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
ports:
|
||||
- containerPort: 80
|
||||
@@ -1,14 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: frontend
|
||||
labels:
|
||||
app: guestbook
|
||||
tier: frontend
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- port: 80
|
||||
selector:
|
||||
app: guestbook
|
||||
tier: frontend
|
||||
@@ -1,27 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: redis-master
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: redis
|
||||
role: master
|
||||
tier: backend
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: redis
|
||||
role: master
|
||||
tier: backend
|
||||
spec:
|
||||
containers:
|
||||
- name: master
|
||||
image: redis
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
@@ -1,16 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: redis-master
|
||||
labels:
|
||||
app: redis
|
||||
role: master
|
||||
tier: backend
|
||||
spec:
|
||||
ports:
|
||||
- port: 6379
|
||||
targetPort: 6379
|
||||
selector:
|
||||
app: redis
|
||||
role: master
|
||||
tier: backend
|
||||
@@ -1,27 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: redis-slave
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: redis
|
||||
role: slave
|
||||
tier: backend
|
||||
replicas: 2
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: redis
|
||||
role: slave
|
||||
tier: backend
|
||||
spec:
|
||||
containers:
|
||||
- name: slave
|
||||
image: redis
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
@@ -1,15 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: redis-slave
|
||||
labels:
|
||||
app: redis
|
||||
role: slave
|
||||
tier: backend
|
||||
spec:
|
||||
ports:
|
||||
- port: 6379
|
||||
selector:
|
||||
app: redis
|
||||
role: slave
|
||||
tier: backend
|
||||
@@ -1,17 +0,0 @@
|
||||
# Helm Kustomize Example
|
||||
|
||||
This example will deploy the [Kubernetes sample guestbook](https://github.com/kubernetes/examples/tree/master/guestbook/) application as
|
||||
packaged as a Helm chart downloaded from a third party source and will modify the helm chart using Kustomize.
|
||||
The app will be deployed into the `fleet-helm-kustomize-example` namespace.
|
||||
|
||||
```yaml
|
||||
kind: GitRepo
|
||||
apiVersion: fleet.cattle.io/v1alpha1
|
||||
metadata:
|
||||
name: helm-kustomize
|
||||
namespace: fleet-local
|
||||
spec:
|
||||
repo: https://github.com/rancher/fleet-examples
|
||||
paths:
|
||||
- single-cluster/helm-kustomize
|
||||
```
|
||||
@@ -1,10 +0,0 @@
|
||||
# This file and all contents in it are OPTIONAL.
|
||||
#
|
||||
# Refer to ../helm/fleet.yaml and ../kustomize/fleet.yaml for the full reference
|
||||
# of what can be included here. All Helm and Kustomize options apply
|
||||
|
||||
namespace: fleet-helm-kustomize-example
|
||||
helm:
|
||||
chart: https://github.com/rancher/fleet-examples/releases/download/example/guestbook-0.0.1.tgz
|
||||
kustomize:
|
||||
dir: overlays/dev
|
||||
@@ -1,3 +0,0 @@
|
||||
patchesStrategicMerge:
|
||||
- redis-slave-deployment.yaml
|
||||
- redis-slave-service.yaml
|
||||
@@ -1,6 +0,0 @@
|
||||
kind: Deployment
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: redis-slave
|
||||
spec:
|
||||
replicas: 0
|
||||
@@ -1,7 +0,0 @@
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: redis-slave
|
||||
spec:
|
||||
selector:
|
||||
role: master
|
||||
@@ -1,17 +0,0 @@
|
||||
# Helm Multi-Chart Example
|
||||
|
||||
This example will deploy the [Kubernetes sample guestbook](https://github.com/kubernetes/examples/tree/master/guestbook/) application
|
||||
packaged as a Helm chart into the `fleet-helm-example` namespace.
|
||||
It will also deploy Rancher Monitoring helm charts into the `cattle-monitoring-system` namespace.
|
||||
|
||||
```yaml
|
||||
kind: GitRepo
|
||||
apiVersion: fleet.cattle.io/v1alpha1
|
||||
metadata:
|
||||
name: helm
|
||||
namespace: fleet-local
|
||||
spec:
|
||||
repo: https://github.com/rancher/fleet-examples
|
||||
paths:
|
||||
- single-cluster/helm-multi-chart
|
||||
```
|
||||
@@ -1,5 +0,0 @@
|
||||
apiVersion: v2
|
||||
name: guestbook
|
||||
description: Sample application
|
||||
version: 0.0.0
|
||||
appVersion: 0.0.0
|
||||
@@ -1,32 +0,0 @@
|
||||
# This file and all contents in it are OPTIONAL.
|
||||
|
||||
# The namespace this chart will be installed to,
|
||||
# if not specified the chart will be installed to "default"
|
||||
namespace: fleet-multi-chart-helm-example
|
||||
|
||||
# Custom helm options
|
||||
helm:
|
||||
# The release name to use. If empty a generated release name will be used
|
||||
releaseName: guestbook
|
||||
|
||||
# The directory of the chart in the repo. Also any valid go-getter supported
|
||||
# URL can be used there is specify where to download the chart from.
|
||||
# If repo below is set this value if the chart name in the repo
|
||||
chart: ""
|
||||
|
||||
# An https to a valid Helm repository to download the chart from
|
||||
repo: ""
|
||||
|
||||
# Used if repo is set to look up the version of the chart
|
||||
version: ""
|
||||
|
||||
# Force recreate resource that can not be updated
|
||||
force: false
|
||||
|
||||
# How long for helm to wait for the release to be active. If the value
|
||||
# is less that or equal to zero, we will not wait in Helm
|
||||
timeoutSeconds: 0
|
||||
|
||||
# Custom values that will be passed as values.yaml to the installation
|
||||
values:
|
||||
replicas: 2
|
||||
@@ -1,25 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: frontend
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: guestbook
|
||||
tier: frontend
|
||||
replicas: {{ .Values.replicas }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: guestbook
|
||||
tier: frontend
|
||||
spec:
|
||||
containers:
|
||||
- name: php-redis
|
||||
image: us-docker.pkg.dev/google-samples/containers/gke/gb-frontend:v5
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
ports:
|
||||
- containerPort: 80
|
||||
@@ -1,14 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: frontend
|
||||
labels:
|
||||
app: guestbook
|
||||
tier: frontend
|
||||
spec:
|
||||
type: "{{ .Values.serviceType }}"
|
||||
ports:
|
||||
- port: 80
|
||||
selector:
|
||||
app: guestbook
|
||||
tier: frontend
|
||||
@@ -1,27 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: redis-master
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: redis
|
||||
role: master
|
||||
tier: backend
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: redis
|
||||
role: master
|
||||
tier: backend
|
||||
spec:
|
||||
containers:
|
||||
- name: master
|
||||
image: redis
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
@@ -1,16 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: redis-master
|
||||
labels:
|
||||
app: redis
|
||||
role: master
|
||||
tier: backend
|
||||
spec:
|
||||
ports:
|
||||
- port: 6379
|
||||
targetPort: 6379
|
||||
selector:
|
||||
app: redis
|
||||
role: master
|
||||
tier: backend
|
||||
@@ -1,29 +0,0 @@
|
||||
{{ if .Values.replication }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: redis-slave
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: redis
|
||||
role: slave
|
||||
tier: backend
|
||||
replicas: 2
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: redis
|
||||
role: slave
|
||||
tier: backend
|
||||
spec:
|
||||
containers:
|
||||
- name: slave
|
||||
image: redis
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
{{ end }}
|
||||
@@ -1,19 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: redis-slave
|
||||
labels:
|
||||
app: redis
|
||||
role: slave
|
||||
tier: backend
|
||||
spec:
|
||||
ports:
|
||||
- port: 6379
|
||||
selector:
|
||||
app: redis
|
||||
{{ if .Values.replication }}
|
||||
role: slave
|
||||
{{ else }}
|
||||
role: master
|
||||
{{ end }}
|
||||
tier: backend
|
||||
@@ -1,3 +0,0 @@
|
||||
replication: true
|
||||
replicas: 1
|
||||
serviceType: NodePort
|
||||
@@ -1,6 +0,0 @@
|
||||
defaultNamespace: cattle-monitoring-system
|
||||
helm:
|
||||
releaseName: rancher-monitoring-crd
|
||||
chart: rancher-monitoring-crd
|
||||
repo: https://charts.rancher.io
|
||||
version: 104.1.0+up57.0.3
|
||||
@@ -1,18 +0,0 @@
|
||||
defaultNamespace: cattle-monitoring-system
|
||||
helm:
|
||||
releaseName: rancher-monitoring
|
||||
repo: https://charts.rancher.io
|
||||
chart: rancher-monitoring
|
||||
version: 104.1.0+up57.0.3
|
||||
diff:
|
||||
comparePatches:
|
||||
- apiVersion: admissionregistration.k8s.io/v1
|
||||
kind: MutatingWebhookConfiguration
|
||||
name: rancher-monitoring-admission
|
||||
operations:
|
||||
- {"op":"remove", "path":"/webhooks/0/failurePolicy"}
|
||||
- apiVersion: admissionregistration.k8s.io/v1
|
||||
kind: ValidatingWebhookConfiguration
|
||||
name: rancher-monitoring-admission
|
||||
operations:
|
||||
- {"op":"remove", "path":"/webhooks/0/failurePolicy"}
|
||||
@@ -1,5 +0,0 @@
|
||||
apiVersion: v2
|
||||
name: guestbook
|
||||
description: Sample application
|
||||
version: 0.0.0
|
||||
appVersion: 0.0.0
|
||||
@@ -1,17 +0,0 @@
|
||||
# Helm Example
|
||||
|
||||
This example will deploy the [Kubernetes sample guestbook](https://github.com/kubernetes/examples/tree/master/guestbook/) application as
|
||||
packaged as a Helm chart.
|
||||
The app will be deployed into the `fleet-helm-example` namespace.
|
||||
|
||||
```yaml
|
||||
kind: GitRepo
|
||||
apiVersion: fleet.cattle.io/v1alpha1
|
||||
metadata:
|
||||
name: helm
|
||||
namespace: fleet-local
|
||||
spec:
|
||||
repo: https://github.com/rancher/fleet-examples
|
||||
paths:
|
||||
- single-cluster/helm
|
||||
```
|
||||
@@ -1,32 +0,0 @@
|
||||
# This file and all contents in it are OPTIONAL.
|
||||
|
||||
# The namespace this chart will be installed and restricted to,
|
||||
# if not specified the chart will be installed to "default"
|
||||
namespace: fleet-helm-example
|
||||
|
||||
# Custom helm options
|
||||
helm:
|
||||
# The release name to use. If empty a generated release name will be used
|
||||
releaseName: guestbook
|
||||
|
||||
# The directory of the chart in the repo. Also any valid go-getter supported
|
||||
# URL can be used there is specify where to download the chart from.
|
||||
# If repo below is set this value if the chart name in the repo
|
||||
chart: ""
|
||||
|
||||
# An https to a valid Helm repository to download the chart from
|
||||
repo: ""
|
||||
|
||||
# Used if repo is set to look up the version of the chart
|
||||
version: ""
|
||||
|
||||
# Force recreate resource that can not be updated
|
||||
force: false
|
||||
|
||||
# How long for helm to wait for the release to be active. If the value
|
||||
# is less that or equal to zero, we will not wait in Helm
|
||||
timeoutSeconds: 0
|
||||
|
||||
# Custom values that will be passed as values.yaml to the installation
|
||||
values:
|
||||
replicas: 2
|
||||
@@ -1,25 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: frontend
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: guestbook
|
||||
tier: frontend
|
||||
replicas: {{ .Values.replicas }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: guestbook
|
||||
tier: frontend
|
||||
spec:
|
||||
containers:
|
||||
- name: php-redis
|
||||
image: us-docker.pkg.dev/google-samples/containers/gke/gb-frontend:v5
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
ports:
|
||||
- containerPort: 80
|
||||
@@ -1,14 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: frontend
|
||||
labels:
|
||||
app: guestbook
|
||||
tier: frontend
|
||||
spec:
|
||||
type: "{{ .Values.serviceType }}"
|
||||
ports:
|
||||
- port: 80
|
||||
selector:
|
||||
app: guestbook
|
||||
tier: frontend
|
||||
@@ -1,27 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: redis-master
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: redis
|
||||
role: master
|
||||
tier: backend
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: redis
|
||||
role: master
|
||||
tier: backend
|
||||
spec:
|
||||
containers:
|
||||
- name: master
|
||||
image: redis
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user