Add imagepuller 0.1.5 catalog item

This commit is contained in:
Sebastiaan van Steenis 2018-02-23 22:59:59 +01:00
parent 9c197d8320
commit d7b6cbd485
4 changed files with 117 additions and 0 deletions

View File

@ -0,0 +1,25 @@
version: '2'
services:
imagepuller:
image: superseb/imagepuller:0.1.5
{{- if eq .Values.PRIVILEGED "true"}}
privileged: true
{{- end}}
environment:
CHECK_CPU_USAGE: ${CHECK_CPU_USAGE}
CPU_USAGE_MAX: ${CPU_USAGE_MAX}
CPU_USAGE_SLEEP: ${CPU_USAGE_SLEEP}
RANCHER_VERSION: ${RANCHER_VERSION}
RANDOM_SLEEP: ${RANDOM_SLEEP}
stdin_open: true
volumes:
- /var/run/docker.sock:/var/run/docker.sock
{{- if eq .Values.MOUNT_DOCKER_CONFIG "true"}}
- ${DOCKER_CONFIG_LOCATION}:/root/.docker/config.json
{{- end}}
tty: true
labels:
io.rancher.container.agent.role: environment
io.rancher.container.start_once: 'true'
io.rancher.container.create_agent: 'true'
io.rancher.scheduler.global: 'true'

View File

@ -0,0 +1,58 @@
version: '2'
catalog:
name: imagepuller
version: 0.1.5
description: A script to pull images for a specific Rancher version to speed up upgrades
minimum_rancher_version: v1.6.0
questions:
- variable: CHECK_CPU_USAGE
label: CHECK_CPU_USAGE
description: Enable CPU usage check
type: boolean
default: true
required: true
- variable: CPU_USAGE_MAX
label: CPU_USAGE_MAX
description: Maximum CPU usage in % to halt pulling images
type: int
default: 75
required: true
- variable: CPU_USAGE_SLEEP
label: CPU_USAGE_SLEEP
description: Amount of seconds to sleep when cpu usage is too high
type: int
default: 120
required: true
- variable: MOUNT_DOCKER_CONFIG
label: MOUNT_DOCKER_CONFIG
description: Mount docker config as volume (for registries with authentication)
type: boolean
default: false
required: true
- variable: DOCKER_CONFIG_LOCATION
label: DOCKER_CONFIG_LOCATION
description: Docker config location on the host (for registries with authentication)
type: string
default: "/root/.docker/config.json"
required: true
- variable: PRIVILEGED
label: PRIVILEGED
description: Run as privileged (e.g. when SELinux is enabled)
type: boolean
default: false
required: true
- variable: RANDOM_SLEEP
label: RANDOM_SLEEP
description: Sleep a "random" amount of seconds between image pulls
type: boolean
default: false
required: true
- variable: RANCHER_VERSION
label: RANCHER_VERSION
description: Reference version to identify what images to pull
type: string
default: v1.6.14
required: true
services:
imagepuller:
start_on_create: true

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg viewBox="0 0 640 480" xmlns="http://www.w3.org/2000/svg">
<defs>
<linearGradient id="d" x1=".49992" x2=".49992" y1=".29294" y2=".48514">
<stop stop-color="#919191" offset="0"/>
<stop stop-color="#919191" offset=".0056"/>
<stop stop-color="#bf0d00" offset="1"/>
</linearGradient>
<radialGradient id="c" cx="39.756" cy="24.221" r="120.09" gradientTransform="matrix(-3.2183 0 0 -3.7099 528.11 462.82)" gradientUnits="userSpaceOnUse">
<stop stop-color="#e88080" offset="0"/>
<stop stop-color="#de4848" offset=".6181"/>
<stop stop-color="#d82a2a" offset="1"/>
</radialGradient>
</defs>
<g transform="rotate(89.067 290.58 230.38)">
<path d="m294.18 450.89c112.45 0 198.11-95.137 206.99-223.43 5.0848-73.49-2.9544-149.56-34.967-214.24-8.4029-5.4128-32.662 0-42.198 0-8.8888 0-31.381-5.1679-36.572 6.6964-8.6217 19.677 0.40872 52.028 3.5208 72.143 5.0849 32.907 8.6314 64.46 6.2918 97.949-3.3953 48.552-18.968 91.019-63.567 102.07-38.014 9.4009-94.215 9.3342-123.11-25.828-32.212-39.177-29.045-108.23-19.857-156.75 4.821-25.476 17.884-60.509 11.937-86.812-3.5498-15.712-30.162-9.7756-40.193-9.9092-14.154-0.20404-41.915-8.1989-49.13 7.4161-17.591 38.019-27.996 78.75-31.6 121.62-6.6844 79.518 1.0588 161.26 47.312 224.34 40.721 55.534 102.63 84.738 165.15 84.738" fill="url(#c)"/>
<path d="m498.78 146.64c-2.964-33.564-8.2902-67.176-18.611-98.847-1.4514-4.4445-10.353-34.573-14.424-34.573h-17.585c-24.697 0-64.204-13.133-63.303 26.908 0.63077 28.099 7.1671 55.897 10.736 83.603 3.1282 24.252 0.048279 22.909 19.998 22.909h83.189m-313.47 0c2.8289-36.814 15.535-71.791 17.99-108.58 1.6992-25.469-9.4875-24.827-27.111-25.086-19.538-0.27826-39.073-0.55649-58.621-0.84958-6.1051-0.077911-18.785 46.912-20.684 53.545-7.4921 26.222-12.197 53.486-14.411 80.973h102.84" fill="#e5e5e5"/>
<path d="m504.83 201.55c0-37.938-1.4257-76.057-9.5293-113-5.7221-26.103-13.713-78.843-41.786-78.843-16.574 0-41.026-5.5204-56.902 0-28.742 0.43405-8.7956 80.149-6.414 95.916 7.4439 49.19 15.058 132.42-24.935 168.09-29.602 26.4-83.833 23.688-117.98 13.374-45.381-13.704-57.462-63.065-59.338-111.85-1.5512-40.56 9.1528-78.005 15.689-117.4 2.0243-12.202 6.1244-31.115-0.71767-42.397-5.0913-8.3733-18.212-5.8542-25.74-5.9618-12.094-0.18552-56.558-9.0077-63.902 4.003-17.63 31.171-27.284 73.39-32.154 109.78-9.4553 70.548-6.797 147.66 24.739 210.79 47.769 95.638 150.28 138.08 241.77 113.45 99.532-26.789 157.21-131.85 157.21-245.94m-5.558 0c0 129.36-76.366 237.89-191.32 245.39-111.66 7.2714-210.16-80.861-223.76-210.44-7.8912-75.178 2.8771-154.37 34.616-220.86 15.329 0.20035 30.651 0.44891 45.983 0.66409 18.528 0.27081 37.998-6.0694 35.613 23.016-5.7768 70.381-34.461 139.76-4.4284 208.93 19.706 45.387 64.272 52.143 104.02 51.349 35.424-0.71231 71.954-9.5382 88.251-49.921 23.851-59.103 8.8148-126.14 1.2712-187.06-2.3719-19.165-7.4985-45.906 14.547-45.906h54.875c16.294 0 27.568 57.029 31.082 73.238 7.9105 36.465 9.2397 74.165 9.2397 111.59" fill="url(#d)"/>
<path d="m120.86 317.55c0 10.499 30.168 38.19 36.659 44.597 34.519 34.068 77.792 53.938 123.28 55.842 48.094 1.9997 95.418-14.28 135.96-43.762 13.929-10.124 27.033-21.718 39.295-34.391 1.6574-1.7103 12.59-16.32 15.045-15.504 1.9696 0.65668-40.335 52.996-43.46 55.916-39.276 36.84-88.126 58.954-139.02 58.954-47.608 0-92.831-21.15-127.46-58.646-11.241-12.169-40.302-42.594-40.302-63.006" fill="#ffa3a3"/>
<path d="m187.96 243.85c0.63078 8.44 21.546 27.654 27.301 32.959 26.364 24.3 58.827 32.562 92.072 29.486 31.864-2.9531 84.56-21.391 95.834-62.735-11.56 42.386-45.7 72.804-82.652 81.333-48.525 11.185-127.29-11.13-132.55-81.043" fill="#b20d0d"/>
<g fill="#fff">
<path d="m405.87 36.096c7.1735-17.095 53.382 27.472 51.705 36.142 0.20273-1.0499-14.424-9.9166-16.497-9.6495-4.763 0.61954 20.291 54.495 23.564 53.716-11.734 2.8084-37.612-20.041-43.971-30.718-5.5161-9.2563-19.837-37.426-14.801-49.49"/>
<path d="m137.55 132.6c-4.5764-6.5703-10.231-13.107-16.951-16.669-14.077-7.4643-11.846 9.7571-20.336 12.495 5.4164-1.7474 15.763-100.47 38.497-73.601 13.584 16.049 42.546 101.66-1.2101 77.775"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -0,0 +1,8 @@
name: Imagepuller
description: |
A script to pull images for a specific Rancher version to speed up upgrades
version: 0.1.5
category: Automation
maintainer: "Sebastiaan van Steenis <seb@rancher.com>"
license: Apache 2.0
projectURL: https://github.com/superseb/imagepuller