Commit cfc6aba1 authored by Marco Lorini's avatar Marco Lorini
Browse files

2020-10-01 ML: add config file for resources

parent 8733a4f0
# federated_deployment.yaml
apiVersion: types.kubefed.io/v1beta1
kind: FederatedDeployment
metadata:
name: fed-helloworld
namespace: fed-namespace
spec:
template:
metadata:
name: helloworld
spec:
replicas: 2
selector:
matchLabels:
app: helloworld
template:
metadata:
labels:
app: helloworld
spec:
containers:
- image: docker.io/csdgarr/hello-world:v1
name: helloworld
imagePullPolicy: IfNotPresent
placement:
clusters:
- name: member-cluster-1
- name: member-cluster-2
overrides:
- clusterName: member-cluster-2
clusterOverrides:
- path: "/spec/replicas"
value: 3
# federated_ingress.yaml
apiVersion: types.kubefed.io/v1beta1
kind: FederatedIngress
metadata:
name: fed-helloworld-ingress
namespace: fed-namespace
spec:
template:
metadata:
name: helloworld-ingress
labels:
app: helloworld
spec:
rules:
- host: helloworld.<domain>
http:
paths:
- path: /
backend:
serviceName: fed-helloworld-service
servicePort: 8080
placement:
clusters:
- name: member-cluster-1
- name: member-cluster-2
# federated_namespace.yaml
apiVersion: types.kubefed.io/v1beta1
kind: FederatedNamespace
metadata:
name: fed-namespace
namespace: fed-namespace
spec:
placement:
clusters:
- name: member-cluster-1
- name: member-cluster-2
# federated_service.yaml
apiVersion: types.kubefed.io/v1beta1
kind: FederatedService
metadata:
name: fed-helloworld-service
namespace: fed-namespace
spec:
template:
metadata:
name: fed-helloworld-service
labels:
app: helloworld
spec:
selector:
app: helloworld
type: ClusterIP
ports:
- name: http
port: 8080
targetPort: 8080
protocol: TCP
placement:
clusters:
- name: member-cluster-1
- name: member-cluster-2
# namespace.yaml file
apiVersion: v1
kind: Namespace
metadata:
name: fed-namespace
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment