forked from kubernetes/kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add ingress addons and third party resource * address comments
- Loading branch information
Showing
5 changed files
with
89 additions
and
6 deletions.
There are no files selected for viewing
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
29 changes: 23 additions & 6 deletions
29
cluster/caicloud-ansible/roles/kubernetes-addons/files/thirdpartyresource.yaml
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 |
---|---|---|
@@ -1,7 +1,24 @@ | ||
metadata: | ||
name: push.k8s.io | ||
apiVersion: extensions/v1beta1 | ||
kind: ThirdPartyResource | ||
description: "Allow user to commit and push a container to registry" | ||
versions: | ||
- name: v1 | ||
kind: ThirdPartyResourceList | ||
items: | ||
- apiVersion: extensions/v1beta1 | ||
kind: ThirdPartyResource | ||
metadata: | ||
name: push.k8s.io | ||
description: "Allow user to commit and push a container to registry" | ||
versions: | ||
- name: v1 | ||
- apiVersion: extensions/v1beta1 | ||
kind: ThirdPartyResource | ||
metadata: | ||
name: loadbalancerclaim.k8s.io | ||
description: "Allow user to claim a loadbalancer instance" | ||
versions: | ||
- name: v1 | ||
- apiVersion: extensions/v1beta1 | ||
kind: ThirdPartyResource | ||
metadata: | ||
name: loadbalancer.k8s.io | ||
description: "Allow user to CURD a loadbalancer instance" | ||
versions: | ||
- name: v1 |
16 changes: 16 additions & 0 deletions
16
cluster/caicloud-ansible/roles/kubernetes-addons/tasks/ingress.yml
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,16 @@ | ||
--- | ||
# Install ingress-loadbalancer-controller addon. | ||
|
||
- name: Ingress | Mare sure ingress direcotry exists | ||
file: path={{ kube_addons_dir }}/ingress state=directory | ||
|
||
- name: Ingress | Write ingress-lb-controller template from converted saltfiles | ||
template: | ||
args: | ||
src: "ingress/{{ item }}.j2" | ||
dest: "{{ kube_addons_dir }}/ingress/{{ item }}" | ||
mode: 0644 | ||
owner: root | ||
group: root | ||
with_items: | ||
- ingress-lb-rc.yaml |
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
41 changes: 41 additions & 0 deletions
41
cluster/caicloud-ansible/roles/kubernetes-addons/templates/ingress/ingress-lb-rc.yaml.j2
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,41 @@ | ||
apiVersion: v1 | ||
kind: ReplicationController | ||
metadata: | ||
namespace: "kube-system" | ||
name: "ingress-loadbalancer-controller" | ||
labels: | ||
k8s-app: ingress-loadbalancer-controller | ||
kubernetes.io/cluster-service: "true" | ||
kubernetes-admin.caicloud.io/type: application | ||
kubernetes-admin.caicloud.io/application: ingress-loadbalancer-controller | ||
spec: | ||
replicas: 1 | ||
selector: | ||
k8s-app: ingress-loadbalancer-controller | ||
kubernetes.io/cluster-service: "true" | ||
kubernetes-admin.caicloud.io/type: application | ||
kubernetes-admin.caicloud.io/application: ingress-loadbalancer-controller | ||
template: | ||
metadata: | ||
labels: | ||
k8s-app: ingress-loadbalancer-controller | ||
kubernetes.io/cluster-service: "true" | ||
kubernetes-admin.caicloud.io/type: application | ||
kubernetes-admin.caicloud.io/application: ingress-loadbalancer-controller | ||
spec: | ||
containers: | ||
- image: {{ ingress_loadbalancer_controller_image }} | ||
imagePullPolicy: "Always" | ||
name: "loadbalancer-claim-controller" | ||
resources: | ||
limits: | ||
cpu: 100m | ||
memory: 100Mi | ||
requests: | ||
cpu: 100m | ||
memory: 100Mi | ||
env: | ||
- name: INGRESS_KEEPALIVED_IMAGE | ||
value: {{ ingress_keepalivd_image }} | ||
- name: INGRESS_NGINX_IMAGE | ||
value: {{ ingress_nginx_image }} |