├── .gitignore ├── CODEOWNERS ├── templates └── 1.0.0 │ ├── Chart.yaml │ ├── templates │ ├── _annotations.tpl │ ├── _labels.tpl │ ├── configmaps.yaml │ ├── secrets.yaml │ ├── volumes.yaml │ ├── jobs.yaml │ ├── services.yaml │ ├── daemonsets.yaml │ ├── deployments.yaml │ ├── cronjobs.yaml │ ├── _volumes.tpl │ ├── statefulsets.yaml │ ├── _helpers.tpl │ ├── _scheduler.tpl │ └── _pod.tpl │ └── values.yaml ├── OWNERS ├── images ├── filemanager │ └── 1.4.4 │ │ ├── README.md │ │ ├── Docker.json │ │ └── Dockerfile ├── galera │ └── 5.7.20 │ │ ├── mysql │ │ ├── galera.cnf │ │ ├── conf.d │ │ │ └── mysqld.cnf │ │ └── my.cnf │ │ ├── galera.repo │ │ ├── Dockerfile │ │ └── entrypoint.sh ├── hystrix-dashboard │ └── 1.2.3 │ │ └── Dockerfile ├── eureka │ └── 2.0.0 │ │ └── Dockerfile ├── zuul │ └── 2.0.0 │ │ └── Dockerfile ├── zipkin │ └── 2.11.8 │ │ └── Dockerfile ├── config-server │ └── 2.0.0 │ │ └── Dockerfile ├── turbine │ └── 2.0.0 │ │ └── Dockerfile └── jenkins │ └── 2.101 │ ├── basic-secrity.groovy │ └── Dockerfile ├── stable ├── release │ ├── memcached │ │ └── 1.5.4 │ │ │ ├── Chart.yaml │ │ │ ├── description.yaml │ │ │ └── values.yaml │ ├── rabbitmq │ │ └── 3.7.2 │ │ │ ├── Chart.yaml │ │ │ ├── description.yaml │ │ │ └── values.yaml │ ├── mysql │ │ └── 5.7.20 │ │ │ ├── Chart.yaml │ │ │ ├── description.yaml │ │ │ └── values.yaml │ ├── filemanager │ │ └── 1.4.4 │ │ │ ├── Chart.yaml │ │ │ ├── description.yaml │ │ │ └── values.yaml │ ├── hystrix-dashboard │ │ └── 1.2.3 │ │ │ ├── Chart.yaml │ │ │ ├── description.yaml │ │ │ └── values.yaml │ ├── elasticsearch │ │ └── 6.5.4 │ │ │ ├── Chart.yaml │ │ │ ├── description.yaml │ │ │ └── values.yaml │ ├── nginx │ │ └── 1.13.8 │ │ │ ├── Chart.yaml │ │ │ ├── values.yaml │ │ │ └── description.yaml │ ├── influxdb │ │ └── 1.4.2 │ │ │ ├── Chart.yaml │ │ │ ├── description.yaml │ │ │ └── values.yaml │ ├── galera │ │ └── 5.7.20 │ │ │ ├── Chart.yaml │ │ │ ├── description.yaml │ │ │ └── values.yaml │ ├── kibana │ │ └── 6.5.4 │ │ │ ├── Chart.yaml │ │ │ ├── description.yaml │ │ │ └── values.yaml │ ├── mariadb │ │ └── 10.2.12 │ │ │ ├── Chart.yaml │ │ │ ├── description.yaml │ │ │ └── values.yaml │ ├── redmine │ │ └── 3.4.4 │ │ │ ├── Chart.yaml │ │ │ ├── description.yaml │ │ │ └── values.yaml │ ├── mongo │ │ └── 3.6.1 │ │ │ ├── Chart.yaml │ │ │ ├── description.yaml │ │ │ └── values.yaml │ ├── wordpress │ │ └── 4.9.1 │ │ │ ├── Chart.yaml │ │ │ ├── description.yaml │ │ │ └── values.yaml │ ├── jenkins │ │ └── 2.101.0 │ │ │ ├── Chart.yaml │ │ │ ├── description.yaml │ │ │ └── values.yaml │ ├── eureka │ │ ├── 1.9.2 │ │ │ ├── Chart.yaml │ │ │ ├── description.yaml │ │ │ └── values.yaml │ │ └── 2.0.0 │ │ │ ├── Chart.yaml │ │ │ ├── description.yaml │ │ │ └── values.yaml │ ├── turbine │ │ └── 2.0.0 │ │ │ ├── Chart.yaml │ │ │ ├── description.yaml │ │ │ └── values.yaml │ ├── gitlab-ce │ │ └── 10.3.3 │ │ │ ├── Chart.yaml │ │ │ ├── description.yaml │ │ │ └── values.yaml │ ├── config-server │ │ └── 2.0.0 │ │ │ ├── Chart.yaml │ │ │ ├── description.yaml │ │ │ └── values.yaml │ ├── zipkin │ │ ├── 2.9.3 │ │ │ ├── Chart.yaml │ │ │ ├── description.yaml │ │ │ └── values.yaml │ │ └── 2.11.8 │ │ │ ├── Chart.yaml │ │ │ ├── description.yaml │ │ │ └── values.yaml │ ├── zuul │ │ └── 2.0.0 │ │ │ ├── Chart.yaml │ │ │ ├── description.yaml │ │ │ └── values.yaml │ └── redis │ │ └── 4.0.6 │ │ ├── Chart.yaml │ │ ├── description.yaml │ │ └── values.yaml └── application │ ├── WordPress │ └── 0.0.1 │ │ └── config.json │ └── BookInfo │ └── 0.0.1 │ └── config.json ├── .github ├── ISSUE_TEMPLATE.md └── PULL_REQUEST_TEMPLATE.md ├── Makefile └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | bin/ 2 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @zoumo @li-ang @whalecold 2 | -------------------------------------------------------------------------------- /templates/1.0.0/Chart.yaml: -------------------------------------------------------------------------------- 1 | name: template 2 | version: 1.0.0 3 | description: A basic template for application 4 | -------------------------------------------------------------------------------- /OWNERS: -------------------------------------------------------------------------------- 1 | reviewers: 2 | - whalecold 3 | - hezhizhen 4 | - qianlei90 5 | approvers: 6 | - whalecold 7 | - hezhizhen 8 | - qianlei90 9 | -------------------------------------------------------------------------------- /images/filemanager/1.4.4/README.md: -------------------------------------------------------------------------------- 1 | filemanager is [v1.4.4](https://github.com/filebrowser/filebrowser/tree/v1.4.4), but the Dockerfile was re-written. 2 | -------------------------------------------------------------------------------- /stable/release/memcached/1.5.4/Chart.yaml: -------------------------------------------------------------------------------- 1 | name: memcached 2 | version: 1.5.4 3 | description: | 4 | Free & open source, high-performance, distributed memory object caching. -------------------------------------------------------------------------------- /stable/release/rabbitmq/3.7.2/Chart.yaml: -------------------------------------------------------------------------------- 1 | name: rabbitmq 2 | version: 3.7.2 3 | description: | 4 | RabbitMQ is the most widely deployed open source message broker. 5 | -------------------------------------------------------------------------------- /stable/release/mysql/5.7.20/Chart.yaml: -------------------------------------------------------------------------------- 1 | name: mysql 2 | version: 5.7.20 3 | description: | 4 | Fast, reliable, scalable, and easy to use open-source relational database. 5 | -------------------------------------------------------------------------------- /stable/release/filemanager/1.4.4/Chart.yaml: -------------------------------------------------------------------------------- 1 | name: filemanager 2 | version: 1.4.4 3 | description: | 4 | Web File Manager which can be used as a middleware or standalone app. 5 | -------------------------------------------------------------------------------- /stable/release/hystrix-dashboard/1.2.3/Chart.yaml: -------------------------------------------------------------------------------- 1 | name: hystrix-dashboard 2 | version: 1.2.3 3 | description: | 4 | The Hystrix Dashboard allows you to monitor Hystrix metrics in real time. 5 | -------------------------------------------------------------------------------- /stable/release/elasticsearch/6.5.4/Chart.yaml: -------------------------------------------------------------------------------- 1 | name: elasticsearch 2 | version: 6.5.4 3 | description: | 4 | Flexible and powerful open source, distributed real-time search and analytics engine. 5 | -------------------------------------------------------------------------------- /stable/release/nginx/1.13.8/Chart.yaml: -------------------------------------------------------------------------------- 1 | name: nginx 2 | version: 1.13.8 3 | description: | 4 | Nginx [engine x] is an HTTP and reverse proxy server, a mail proxy server, and a generic TCP/UDP proxy server. -------------------------------------------------------------------------------- /stable/release/influxdb/1.4.2/Chart.yaml: -------------------------------------------------------------------------------- 1 | name: influxdb 2 | version: 1.4.2 3 | description: | 4 | InfluxData provides a Modern Time Series Platform, designed from the ground up to handle metrics and events. 5 | -------------------------------------------------------------------------------- /stable/release/galera/5.7.20/Chart.yaml: -------------------------------------------------------------------------------- 1 | name: galera 2 | version: 5.7.20 3 | description: | 4 | Galera Cluster for MySQL is a synchronous replication solution that can improve availability and performance of MySQL service. 5 | -------------------------------------------------------------------------------- /stable/release/kibana/6.5.4/Chart.yaml: -------------------------------------------------------------------------------- 1 | name: kibana 2 | version: 6.5.4 3 | description: | 4 | Kibana is your window into the Elastic Stack. Specifically, it's a browser-based analytics and search dashboard for Elasticsearch. 5 | -------------------------------------------------------------------------------- /stable/release/mariadb/10.2.12/Chart.yaml: -------------------------------------------------------------------------------- 1 | name: mariadb 2 | version: 10.2.12 3 | description: | 4 | MariaDB is a community-developed fork of the MySQL relational database management system intended to remain free under the GNU GPL. 5 | -------------------------------------------------------------------------------- /stable/release/redmine/3.4.4/Chart.yaml: -------------------------------------------------------------------------------- 1 | name: redmine 2 | version: 3.4.4 3 | description: | 4 | Redmine is a flexible project management web application. Written using the Ruby on Rails framework, it is cross-platform and cross-database. 5 | -------------------------------------------------------------------------------- /stable/release/mongo/3.6.1/Chart.yaml: -------------------------------------------------------------------------------- 1 | name: mongo 2 | version: 3.6.1 3 | description: | 4 | NoSQL document-oriented database that stores JSON-like documents with dynamic schemas, simplifying the integration of data in content-driven applications. 5 | -------------------------------------------------------------------------------- /images/filemanager/1.4.4/Docker.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 80, 3 | "address": "", 4 | "database": "/database.db", 5 | "scope": "/srv", 6 | "allowCommands": true, 7 | "allowEdit": true, 8 | "allowNew": true, 9 | "commands": [] 10 | } 11 | -------------------------------------------------------------------------------- /stable/release/wordpress/4.9.1/Chart.yaml: -------------------------------------------------------------------------------- 1 | name: wordpress 2 | version: 4.9.1 3 | description: | 4 | WordPress is a free and open source blogging tool and a content management system (CMS) based on PHP and MySQL, which runs on a web hosting service. 5 | -------------------------------------------------------------------------------- /templates/1.0.0/templates/_annotations.tpl: -------------------------------------------------------------------------------- 1 | {{/* annotations helper templates */}} 2 | 3 | {{- define "annotations" -}} 4 | {{- if . -}} 5 | {{- range .annotations }} 6 | {{.key | quote}}: {{.value | quote}} 7 | {{ end -}} 8 | {{- end -}} 9 | {{- end -}} 10 | -------------------------------------------------------------------------------- /stable/release/jenkins/2.101.0/Chart.yaml: -------------------------------------------------------------------------------- 1 | name: jenkins 2 | version: 2.101.0 3 | description: | 4 | Continuous Integration and Continuous Delivery. As an extensible automation server, 5 | Jenkins can be used as a simple CI server or turned into the continuous delivery hub for any project. -------------------------------------------------------------------------------- /stable/release/eureka/1.9.2/Chart.yaml: -------------------------------------------------------------------------------- 1 | name: eureka 2 | version: 1.9.2 3 | description: | 4 | Eureka is a REST (Representational State Transfer) based service that is primarily used in the AWS cloud for locating services for the purpose of load balancing and failover of middle-tier servers. 5 | -------------------------------------------------------------------------------- /stable/release/eureka/2.0.0/Chart.yaml: -------------------------------------------------------------------------------- 1 | name: eureka 2 | version: 2.0.0 3 | description: | 4 | Eureka is a REST (Representational State Transfer) based service that is primarily used in the AWS cloud for locating services for the purpose of load balancing and failover of middle-tier servers. 5 | -------------------------------------------------------------------------------- /stable/release/turbine/2.0.0/Chart.yaml: -------------------------------------------------------------------------------- 1 | name: turbine 2 | version: 2.0.0 3 | description: | 4 | Turbine is a tool for aggregating streams of Server-Sent Event (SSE) JSON data into a single stream. The targeted use case is metrics streams from instances in an SOA being aggregated for dashboards. -------------------------------------------------------------------------------- /stable/release/gitlab-ce/10.3.3/Chart.yaml: -------------------------------------------------------------------------------- 1 | name: gitlab-ce 2 | version: 10.3.3 3 | description: | 4 | GitLab is the leading integrated product for modern software development. 5 | Connecting issue management, version control, code review, CI, CD, 6 | and monitoring into a single, easy-to-install application. -------------------------------------------------------------------------------- /stable/release/config-server/2.0.0/Chart.yaml: -------------------------------------------------------------------------------- 1 | name: config-server 2 | version: 2.0.0 3 | description: | 4 | Spring Cloud Config Server provides an HTTP resource-based API for external configuration (name-value pairs or equivalent YAML content). The server is embeddable in a Spring Boot application, by using the @EnableConfigServer annotation. -------------------------------------------------------------------------------- /stable/release/zipkin/2.9.3/Chart.yaml: -------------------------------------------------------------------------------- 1 | name: zipkin 2 | version: 2.9.3 3 | description: | 4 | Zipkin is a distributed tracing system. It helps gather timing data needed to troubleshoot latency problems in microservice architectures. It manages both the collection and lookup of this data. Zipkin’s design is based on the Google Dapper paper. 5 | -------------------------------------------------------------------------------- /stable/release/zipkin/2.11.8/Chart.yaml: -------------------------------------------------------------------------------- 1 | name: zipkin 2 | version: 2.11.8 3 | description: | 4 | Zipkin is a distributed tracing system. It helps gather timing data needed to troubleshoot latency problems in microservice architectures. It manages both the collection and lookup of this data. Zipkin’s design is based on the Google Dapper paper. 5 | -------------------------------------------------------------------------------- /images/galera/5.7.20/mysql/galera.cnf: -------------------------------------------------------------------------------- 1 | [mysqld] 2 | bind-address=0.0.0.0 3 | binlog_format=ROW 4 | wsrep_provider=/usr/lib64/galera-3/libgalera_smm.so 5 | wsrep_provider_options="gcache.size=300M; gcache.page_size=300M" 6 | wsrep_cluster_name="mysql_cluster" 7 | wsrep_cluster_address="gcomm://" 8 | wsrep_sst_auth=user:password 9 | wsrep_sst_method=rsync 10 | -------------------------------------------------------------------------------- /images/galera/5.7.20/mysql/conf.d/mysqld.cnf: -------------------------------------------------------------------------------- 1 | [mysqld] 2 | pid-file=/var/run/mysqld/mysqld.pid 3 | datadir=/var/lib/mysql 4 | socket=/var/lib/mysql/mysql.sock 5 | user=mysql 6 | default_storage_engine=innodb 7 | innodb_autoinc_lock_mode=2 8 | innodb_flush_log_at_trx_commit=0 9 | innodb_buffer_pool_size=122M 10 | symbolic-links=0 11 | explicit_defaults_for_timestamp=ON 12 | -------------------------------------------------------------------------------- /images/hystrix-dashboard/1.2.3/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM primetoninc/jdk:1.8 2 | MAINTAINER stonesfour "sunshilei@caicloud.io" 3 | 4 | ENV HYSTRIX_DASHBOARD_PORT=30008 5 | 6 | RUN wget -q https://github.com/stonesfour/caicloud-spring/raw/master/caicloud-hystrix-dashboard/caicloud-hystrix-dashboard-0.0.1-SNAPSHOT.jar \ 7 | -O app.jar 8 | 9 | ENTRYPOINT [ "sh","-c","java -jar $PARAM /app.jar"] -------------------------------------------------------------------------------- /images/eureka/2.0.0/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM primetoninc/jdk:1.8 2 | MAINTAINER stonesfour "sunshilei@caicloud.io" 3 | 4 | ENV EUREKA_PORT=8761 5 | ENV EUREKA_HOST_NAME=localhost 6 | 7 | RUN wget -q https://github.com/stonesfour/caicloud-spring/raw/master/caicloud-discovery-eureka/caicloud-discovery-eureka-0.0.1-SNAPSHOT.jar \ 8 | -O app.jar 9 | 10 | ENTRYPOINT [ "sh","-c","java -jar $PARAM /app.jar"] -------------------------------------------------------------------------------- /stable/release/zuul/2.0.0/Chart.yaml: -------------------------------------------------------------------------------- 1 | name: zuul 2 | version: 2.0.0 3 | description: | 4 | Zuul is the front door for all requests from devices and web sites to the backend of the Netflix streaming application. As an edge service application, Zuul is built to enable dynamic routing, monitoring, resiliency and security. It also has the ability to route requests to multiple Amazon Auto Scaling Groups as appropriate. -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | **Is this a BUG REPORT or FEATURE REQUEST?**: 4 | 5 | > Uncomment only one, leave it on its own line: 6 | > 7 | > /kind bug 8 | > /kind feature 9 | 10 | **What happened**: 11 | 12 | **What you expected to happen**: 13 | 14 | **How to reproduce it (as minimally and precisely as possible)**: 15 | 16 | **Anything else we need to know?**: 17 | -------------------------------------------------------------------------------- /images/zuul/2.0.0/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM primetoninc/jdk:1.8 2 | MAINTAINER stonesfour "sunshilei@caicloud.io" 3 | 4 | ENV ZUUL_NAME=zuul-gateway 5 | ENV ZUUL_PORT=8080 6 | ENV EUREKA_URL=http://eureka-server:8761/eureka 7 | 8 | RUN wget -q https://github.com/stonesfour/caicloud-spring/raw/master/caicloud-zuul-gateway/caicloud-zuul-gateway-0.0.1-SNAPSHOT.jar \ 9 | -O app.jar 10 | 11 | ENTRYPOINT [ "sh","-c","java -jar $PARAM /app.jar"] -------------------------------------------------------------------------------- /images/galera/5.7.20/galera.repo: -------------------------------------------------------------------------------- 1 | [galera] 2 | name = Galera 3 | baseurl = http://releases.galeracluster.com/galera-3/centos/7/x86_64 4 | gpgkey = http://releases.galeracluster.com/GPG-KEY-galeracluster.com 5 | gpgcheck = 1 6 | 7 | [mysql-wsrep] 8 | name = MySQL-wsrep 9 | baseurl = http://releases.galeracluster.com/mysql-wsrep-5.7/centos/7/x86_64 10 | gpgkey = http://releases.galeracluster.com/GPG-KEY-galeracluster.com 11 | gpgcheck = 1 12 | -------------------------------------------------------------------------------- /images/zipkin/2.11.8/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM primetoninc/jdk:1.8 2 | 3 | LABEL maintainer "luomin@caicloud.io" 4 | 5 | ENV ZIPKIN_NAME=zipkin-server 6 | ENV ZIPKIN_PORT=9411 7 | ENV ENABLE_EUREKA=true 8 | ENV EUREKA_URL=http://eureka-server:8761/eureka 9 | 10 | RUN wget -q https://github.com/stonesfour/caicloud-spring/raw/master/caicloud-zipkin-server/zipkin-server-0.0.1-SNAPSHOT.jar \ 11 | -O app.jar 12 | 13 | ENTRYPOINT [ "sh","-c","java -jar $PARAM /app.jar"] -------------------------------------------------------------------------------- /images/filemanager/1.4.4/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM busybox:1.28.4-glibc 2 | 3 | WORKDIR / 4 | 5 | RUN wget -q https://github.com/filebrowser/filebrowser/releases/download/v1.4.4/linux-amd64-filemanager.tar.gz -O filemanager.tar.gz \ 6 | && tar -xvf filemanager.tar.gz \ 7 | && rm -rf filemanager.tar.gz 8 | 9 | VOLUME /tmp 10 | VOLUME /srv 11 | EXPOSE 80 12 | 13 | COPY Docker.json /config.json 14 | 15 | ENTRYPOINT ["/filemanager"] 16 | CMD ["--config", "/config.json"] 17 | -------------------------------------------------------------------------------- /images/config-server/2.0.0/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM primetoninc/jdk:1.8 2 | 3 | LABEL maintainer "luomin@caicloud.io" 4 | 5 | ENV CONFIG_SERVER_PORT=8888 6 | ENV ENABLE_EUREKA=true 7 | ENV EUREKA_URL=http://eureka-server:8761/eureka 8 | ENV CONFIG_SERVER_NAME=config-server 9 | 10 | RUN wget -q https://github.com/stonesfour/caicloud-spring/raw/master/caicloud-config-server/caicloud-config-server-0.0.1-SNAPSHOT.jar \ 11 | -O app.jar 12 | 13 | ENTRYPOINT [ "sh","-c","java -jar $PARAM /app.jar"] -------------------------------------------------------------------------------- /images/turbine/2.0.0/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM primetoninc/jdk:1.8 2 | 3 | LABEL maintainer "luomin@caicloud.io" 4 | 5 | ENV TURBINE_PORT=8989 6 | ENV TURBINE_NAME=turbine 7 | ENV EUREKA_URL=http://eureka-server:8761/eureka 8 | ENV CLUSTER_NAME=default 9 | ENV CLUSTER_CONFIG=default 10 | 11 | RUN wget -q https://github.com/stonesfour/caicloud-spring/raw/master/caicloud-turbine/caicloud-turbine-0.0.1-SNAPSHOT.jar \ 12 | -O app.jar 13 | 14 | ENTRYPOINT [ "sh","-c","java -jar $PARAM /app.jar"] -------------------------------------------------------------------------------- /images/galera/5.7.20/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM centos:7 2 | 3 | COPY ./galera.repo /etc/yum.repos.d/galera.repo 4 | 5 | RUN yum install -y galera-3 mysql-wsrep-5.7 &&\ 6 | yum install -y which &&\ 7 | yum install -y rsync &&\ 8 | rm -rf /etc/my.cnf &&\ 9 | yum clean all 10 | 11 | ADD ./mysql /etc/mysql 12 | 13 | COPY ./entrypoint.sh /entrypoint.sh 14 | 15 | RUN chmod u+x /entrypoint.sh 16 | 17 | EXPOSE 3306 4444 4567 4568 18 | 19 | ENTRYPOINT ["/entrypoint.sh"] 20 | 21 | CMD ["mysqld"] 22 | -------------------------------------------------------------------------------- /images/jenkins/2.101/basic-secrity.groovy: -------------------------------------------------------------------------------- 1 | #!groovy 2 | 3 | import jenkins.model.* 4 | import hudson.security.* 5 | 6 | def instance = Jenkins.getInstance() 7 | 8 | println "--> creating local user 'admin'" 9 | 10 | def hudsonRealm = new HudsonPrivateSecurityRealm(false) 11 | hudsonRealm.createAccount('admin','admin') 12 | instance.setSecurityRealm(hudsonRealm) 13 | 14 | def strategy = new FullControlOnceLoggedInAuthorizationStrategy() 15 | strategy.setAllowAnonymousRead(false) 16 | instance.setAuthorizationStrategy(strategy) 17 | instance.save() -------------------------------------------------------------------------------- /stable/release/redis/4.0.6/Chart.yaml: -------------------------------------------------------------------------------- 1 | name: redis 2 | version: 4.0.6 3 | description: | 4 | Redis is an open source (BSD licensed), in-memory data structure store, 5 | used as a database, cache and message broker. 6 | It supports data structures such as strings, hashes, lists, sets, 7 | sorted sets with range queries, bitmaps, hyperloglogs and geospatial indexes with radius queries. 8 | Redis has built-in replication, Lua scripting, LRU eviction, transactions and 9 | different levels of on-disk persistence, and provides high availability via Redis Sentinel and 10 | automatic partitioning with Redis Cluster. 11 | -------------------------------------------------------------------------------- /templates/1.0.0/templates/_labels.tpl: -------------------------------------------------------------------------------- 1 | {{/* annotations helper templates */}} 2 | 3 | {{- define "releaselabels" -}} 4 | {{- $release := index . 0 -}} 5 | {{- $chart:= index . 1 }} 6 | "controller.caicloud.io/release": {{ $release | quote }} 7 | "controller.caicloud.io/chart": {{ $chart | quote }} 8 | {{- end -}} 9 | 10 | {{- define "controllerlabels" -}} 11 | {{- if . }} 12 | "controller.caicloud.io/name": {{ . | quote }} 13 | {{- end -}} 14 | {{- end -}} 15 | 16 | {{- define "appLabels" -}} 17 | {{- $app := index . 0 -}} 18 | {{- $version := index . 1 | default "v1"}} 19 | "app": {{ $app | quote }} 20 | "version": {{ $version | quote }} 21 | {{- end -}} 22 | -------------------------------------------------------------------------------- /templates/1.0.0/templates/configmaps.yaml: -------------------------------------------------------------------------------- 1 | {{/* Generates all configmaps */}} 2 | 3 | 4 | {{- $g := . -}} 5 | {{- $metadata := $g.Values._config._metadata -}} 6 | {{- range $index, $controller := .Values._config.controllers -}} 7 | {{- range $controller.configs }} 8 | --- 9 | apiVersion: v1 10 | kind: ConfigMap 11 | metadata: 12 | name: {{ .name }} 13 | labels: 14 | {{- include "appLabels" (list $g.Release.Name $metadata.appVersion) | indent 4 }} 15 | {{- include "releaselabels" (list $g.Release.Name $g.Chart.Name) | indent 4 }} 16 | data: 17 | {{- range .data }} 18 | {{ .key | quote }}: {{ .value | quote }} 19 | {{- end }} 20 | --- 21 | {{ end -}} 22 | {{- end -}} 23 | 24 | -------------------------------------------------------------------------------- /templates/1.0.0/templates/secrets.yaml: -------------------------------------------------------------------------------- 1 | {{/* Generates all secrets */}} 2 | 3 | 4 | {{- $g := . -}} 5 | {{- $metadata := $g.Values._config._metadata -}} 6 | {{- range $index, $controller := .Values._config.controllers -}} 7 | {{- range $controller.secrets }} 8 | --- 9 | apiVersion: v1 10 | kind: Secret 11 | metadata: 12 | name: {{ .name }} 13 | labels: 14 | {{- include "appLabels" (list $g.Release.Name $metadata.appVersion) | indent 4 }} 15 | {{- include "releaselabels" (list $g.Release.Name $g.Chart.Name) | indent 4 }} 16 | type: {{ .type | default "Opaque" | quote }} 17 | data: 18 | {{- range .data }} 19 | {{ .key | quote }}: {{ .value | quote }} 20 | {{- end }} 21 | --- 22 | {{ end -}} 23 | {{- end -}} 24 | 25 | -------------------------------------------------------------------------------- /stable/release/kibana/6.5.4/description.yaml: -------------------------------------------------------------------------------- 1 | name: Kibana 2 | briefDesc: Kibana 能够对 Elasticsearch 中的数据进行可视化操作,因此您可以在这里解开任何疑问。 3 | desc: | 4 | Kibana 能够对 Elasticsearch 中的数据进行可视化操作,因此您可以在这里解开任何疑问。 5 | introduce: 6 | brief: | 7 | 基于 Kibana 社区版本(Repo(https://github.com/elastic/kibana-docker) - Dockerfile) 8 | howToUse: | 9 | 直接从模板部署出一个完整的 Kibana 服务,不需要任何外部依赖。 10 | 通过环境变量 ELASTICSEARCH_URL 配置 Elasticsearch 服务器地址。 11 | 配置 12 | 更加详细的配置说明请看[自解释的配置](https://hub.helm.sh/charts/stable/kibana/1.1.2) 13 | version: | 14 | 基于社区 6.5.4 稳定版本。 15 | resources: | 16 | 最低资源要求:CPU:0.1 Core,内存:0.5 GiB 17 | 推荐资源配置:CPU:1 Core,内存:2 GiB 18 | service: | 19 | 默认使用集群内部 IP 暴露服务的 5601 端口 20 | 如果要提供对外服务, 可以使用节点端口或者对接负载均衡来暴露服务。 21 | -------------------------------------------------------------------------------- /images/galera/5.7.20/mysql/my.cnf: -------------------------------------------------------------------------------- 1 | # 2 | # The MySQL database server configuration file. 3 | # 4 | # You can copy this to one of: 5 | # - "/etc/mysql/my.cnf" to set global options, 6 | # - "~/.my.cnf" to set user-specific options. 7 | # 8 | # One can use all long options that the program supports. 9 | # Run program with --help to get a list of available options and with 10 | # --print-defaults to see which it would actually understand and use. 11 | # 12 | # For explanations see 13 | # http://dev.mysql.com/doc/mysql/en/server-system-variables.html 14 | 15 | # 16 | # * IMPORTANT: Additional settings that can override those from this file! 17 | # The files must end with '.cnf', otherwise they'll be ignored. 18 | # 19 | 20 | !include /etc/mysql/galera.cnf 21 | !includedir /etc/mysql/conf.d/ 22 | -------------------------------------------------------------------------------- /stable/release/zipkin/2.9.3/description.yaml: -------------------------------------------------------------------------------- 1 | name: zipkin 2 | briefDesc: Zipkin 是一个分布式跟踪系统。 3 | desc: | 4 | 跟踪器(Tracer)位于你的应用程序中,并记录发生的操作的时间和元数据,提供了相应的类库,对用户的使用来说是透明的,收集的跟踪数据称为Span;将数据发送到Zipkin的仪器化应用程序中的组件称为Reporter,Reporter通过几种传输方式之一将追踪数据发送到Zipkin收集器(collector),然后将跟踪数据进行存储(storage),由API查询存储以向UI提供数据。 5 | introduce: 6 | brief: | 7 | 基于官方 2.9.3 稳定版本。 8 | 基于 Zipkin 开源版本([Repo](https://github.com/openzipkin/zipkin) [Dockerfile](https://github.com/openzipkin/docker-zipkin/blob/2.9.3/zipkin/Dockerfile)) 9 | howToUse: | 10 | 直接从模版部署出一个完整的 Zipkin 应用,不需要任何外部依赖。 11 | version: | 12 | 基于官方 2.9.3 稳定版本。 13 | resources: | 14 | 最低资源要求:CPU:1 Core,内存:1G 15 | 推荐资源配置:CPU:2 Core,内存:4G 16 | service: | 17 | 默认使用集群内部IP 暴露服务的 9411 端口。 18 | 默认服务名为zipkin,如果服务名冲突,请修改为其他名称。可通过服务名+端口访问Zipkin。 19 | 如果要提供对外服务, 可以使用对接负载均衡来暴露服务。 20 | -------------------------------------------------------------------------------- /stable/release/zipkin/2.11.8/description.yaml: -------------------------------------------------------------------------------- 1 | name: zipkin 2 | briefDesc: Zipkin 是一个分布式跟踪系统。 3 | desc: | 4 | 跟踪器(Tracer)位于你的应用程序中,并记录发生的操作的时间和元数据,提供了相应的类库,对用户的使用来说是透明的,收集的跟踪数据称为Span;将数据发送到Zipkin的仪器化应用程序中的组件称为Reporter,Reporter通过几种传输方式之一将追踪数据发送到Zipkin收集器(collector),然后将跟踪数据进行存储(storage),由API查询存储以向UI提供数据。 5 | introduce: 6 | brief: | 7 | 基于官方 2.11.8 稳定版本。 8 | 基于 Zipkin 开源版本([Repo](https://github.com/openzipkin/zipkin) 9 | howToUse: | 10 | 直接从模版部署出一个完整的 Zipkin 应用,需要关闭eureka client。 11 | **环境变量** 12 | - ZIPKIN_PORT:容器内端口。 13 | - ZIPKIN_NAME:主机名称。 14 | - ENABLE_EUREKA:开启eureka client。 15 | - EUREKA_URL:eureka地址。 16 | version: | 17 | 基于官方 2.11.8 稳定版本。 18 | resources: | 19 | 最低资源要求:CPU:1 Core,内存:1G 20 | 推荐资源配置:CPU:2 Core,内存:4G 21 | service: | 22 | 默认使用集群内部IP 暴露服务的 9411 端口。 23 | 默认服务名为 zipkin-server,如果服务名冲突,请修改为其他名称。可通过服务名+端口访问 zipkin-server。 24 | 如果要提供对外服务, 可以使用对接负载均衡来暴露服务。 25 | -------------------------------------------------------------------------------- /images/jenkins/2.101/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM jenkins/jenkins:2.101-alpine 2 | 3 | USER root 4 | 5 | ENV JENKINS_VERSION=2.101 6 | ENV JENKINS_UC_DOWNLOAD="https://mirrors.tuna.tsinghua.edu.cn/jenkins" 7 | 8 | RUN echo ${JENKINS_VERSION} > /usr/share/jenkins/ref/jenkins.install.UpgradeWizard.state 9 | COPY basic-secrity.groovy /usr/share/jenkins/ref/init.groovy.d/basic-secrity.groovy 10 | 11 | RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \ 12 | /usr/local/bin/install-plugins.sh \ 13 | kubernetes \ 14 | workflow-aggregator \ 15 | pipeline-stage-view \ 16 | git \ 17 | credentials-binding \ 18 | ws-cleanup \ 19 | ant \ 20 | ldap \ 21 | email-ext \ 22 | simple-theme-plugin \ 23 | github-organization-folder \ 24 | ghprb \ 25 | subversion \ 26 | gitlab-plugin \ 27 | ansicolor \ 28 | dashboard-view \ 29 | build-timeout \ 30 | gitlab-hook \ 31 | blueocean 32 | -------------------------------------------------------------------------------- /stable/release/zuul/2.0.0/description.yaml: -------------------------------------------------------------------------------- 1 | name: zuul 2 | briefDesc: zuul 是一个开源的服务发现框架。 3 | desc: | 4 | Zuul 是开源的微服务网关,可与 Eureka、Ribbon、Hystrix 等组件配合使用,具备服务路由、均衡负载、权限控制等功能,使得服务集群主体能够具备更高的可复用性和可测试性,并且为微服务架构提供了前置的保护和控制能力。 5 | introduce: 6 | brief: | 7 | 通过与Eureka整合,将自身注册到服务中心,可以获到所有其他微服务实例信息。 8 | Zuul默认通过以服务名作为ContextPath来创建路由映射,可以满足大多数情况需要, 9 | 如访问http://localhost:8080/user-service/getUser会自动路由到service-id为user-service的微服务实例中。特殊路由可以通过配置来实现。 10 | howToUse: | 11 | 直接从模版部署出一个完整的 zuul 应用。 12 | **环境变量** 13 | - ZUUL_NAME:应用的名称。 14 | - ZUUL_PORT:容器内端口。 15 | - EUREKA_URL:eureka server地址。 16 | version: | 17 | 基于 2.0.0 RELEASE。 18 | resources: | 19 | 最低资源要求:CPU: 1 Core,内存:1G。 20 | 推荐资源配置:CPU: 2 Core,内存:4G。 21 | zuul 对资源较高,如果资源分配不足,可能导致启动失败。 22 | service: | 23 | 默认使用集群内部 IP 暴露服务的 8080 端口。 24 | 默认服务名为 zuul-server ,如果服务名冲突,请修改为其他名称。可通过服务名 + 端口访问 zuul-server。 25 | 如果要提供对外服务, 可以使用对接负载均衡来暴露服务。 26 | -------------------------------------------------------------------------------- /stable/release/elasticsearch/6.5.4/description.yaml: -------------------------------------------------------------------------------- 1 | name: Elasticsearch 2 | briefDesc: Elasticsearch 是一个分布式、RESTful 风格的搜索和数据分析引擎,能够解决不断涌现出的各种用例。作为 Elastic Stack 的核心,它集中存储您的数据,帮助您发现意料之中以及意料之外的情况。 3 | desc: | 4 | Elasticsearch 是一个分布式、RESTful 风格的搜索和数据分析引擎,能够解决不断涌现出的各种用例。作为 Elastic Stack 的核心,它集中存储您的数据,帮助您发现意料之中以及意料之外的情况。 5 | introduce: 6 | brief: | 7 | 基于 Elasticsearch 社区版本(Repo(https://github.com/elastic/elasticsearch-docker) - Dockerfile) 8 | howToUse: | 9 | 直接从模板部署出一个完整的 Elasticsearch 服务,不需要任何外部依赖。 10 | 如何挂载数据 11 | 数据挂载在 /usr/share/elasticsearch/data 12 | 配置挂载在 /usr/share/elasticsearch/config/elasticsearch.yml 13 | 配置 14 | 更加详细的配置说明请看[自解释的配置](https://hub.helm.sh/charts/stable/elasticsearch/1.15.4) 15 | version: | 16 | 基于社区 6.5.4 稳定版本。 17 | resources: | 18 | 最低资源要求:CPU:0.25 Core,内存:0.5 GiB,1个节点 19 | 推荐资源配置:CPU:1 Core,内存:2 GiB,2个以上节点 20 | service: | 21 | 默认使用集群内部 IP 暴露服务的 9200,9300 端口 22 | 如果要提供对外服务, 可以使用节点端口或者对接负载均衡来暴露服务。 23 | -------------------------------------------------------------------------------- /stable/release/memcached/1.5.4/description.yaml: -------------------------------------------------------------------------------- 1 | name: Memcached 2 | briefDesc: Memcached 是一套分布式的高速缓存系统 3 | desc: | 4 | memcached是一套分布式的高速缓存系统,由LiveJournal的Brad Fitzpatrick开发,但目前被许多网站使用。 5 | 这是一套开放源代码软件,以BSD license授权发布。 6 | memcached缺乏认证以及安全管制,这代表应该将memcached服务器放置在防火墙后。 7 | memcached的API使用三十二比特的循环冗余校验(CRC-32)计算键值后,将数据分散在不同的机器上。 8 | 当表格满了以后,接下来新增的数据会以LRU机制替换掉。由于memcached通常只是当作缓存系统使用, 9 | 所以使用memcached的应用程序在写回较慢的系统时(像是后端的数据库)需要额外的代码更新memcached内的数据。 10 | introduce: 11 | brief: | 12 | 基于 Memcached 社区版本(Repo(https://github.com/docker-library/memcached) - [Dockerfile](https://github.com/docker-library/memcached/blob/6af843ea5c1ada3cc711424c6a533292cca31a40/alpine/Dockerfile)) 13 | howToUse: | 14 | 直接从模板部署出一个完整的 Memcached 应用,不需要任何外部依赖。 15 | version: | 16 | 基于社区 1.5.4 稳定版本。 17 | resources: | 18 | 没有最低配置的要求,资源配置视使用情况而定, CPU 占用较低,最好给足够的内存 19 | 推荐资源配置:CPU:1 Core,内存:4 GiB 20 | service: | 21 | 默认使用集群内部 IP 暴露服务的 11211 端口 22 | 如果要提供对外服务, 可以使用节点端口或者对接负载均衡来暴露服务。 -------------------------------------------------------------------------------- /stable/release/mongo/3.6.1/description.yaml: -------------------------------------------------------------------------------- 1 | name: mongo 2 | briefDesc: MongoDB 是一个开源的 NoSQL 数据库 3 | desc: MongoDB 是一个开源的面向文档的数据库系统。MongoDB 使用类似 JSON 格式的文档规范,提供了较高的扩展性和灵活性。 4 | introduce: 5 | brief: | 6 | 基于 MongoDB 开源版本([Repo](https://github.com/mongodb/mongo) [Dockerfile](https://github.com/docker-library/mongo/blob/master/3.6/Dockerfile)) 7 | howToUse: | 8 | 直接从模板部署出一个完整的 MongoDB 数据库,不需要任何外部依赖。 9 | **如何挂载数据** 10 | MongoDB 的所有数据都挂载在 `/data/db`. 默认使用的是临时数据卷,如果需要持久化文件数据,请挂载其他类型的数据卷。 11 | **配置** 12 | MongoDB 使用默认配置。如果需要自定义配置,可以将配置挂载到 `/etc/mongo/mongod.conf`,然后修改启动参数为 `mongo -f /etc/mongo/mongod.conf`。 13 | 不要把配置直接挂载到 `/etc/mongod.conf`。 14 | **关于扩容** 15 | 目前不支持扩容。请不要增加副本数量。 16 | version: | 17 | 基于社区 MongoDB 3.6.1 稳定版本。 18 | resources: | 19 | 最低资源要求:CPU:0.25 Core,内存:512 MiB 20 | 推荐资源配置:CPU:1 Core,内存:1 GiB 21 | service: | 22 | 默认使用集群内部 IP 暴露服务的 27017 端口。 23 | 默认服务名为 mongo,如果服务名冲突,请修改为其他名称。可通过服务名访问数据库。 24 | 如果要提供对外服务, 可以使用节点端口或者对接负载均衡来暴露服务。 25 | -------------------------------------------------------------------------------- /stable/release/nginx/1.13.8/values.yaml: -------------------------------------------------------------------------------- 1 | _config: 2 | _metadata: 3 | name: nginx 4 | version: 1.13.8 5 | description: | 6 | Nginx [engine x] is an HTTP and reverse proxy server, a mail proxy server, and a generic TCP/UDP proxy server. 7 | controllers: 8 | - type: Deployment 9 | controller: 10 | replica: 1 11 | strategy: 12 | type: "RollingUpdate" 13 | services: 14 | - name: nginx 15 | type: ClusterIP 16 | ports: 17 | - protocol: HTTP 18 | targetPort: 80 19 | port: 80 20 | nodePort: 0 21 | containers: 22 | - imagePullPolicy: Always 23 | image: cargo.caicloudprivatetest.com/library/nginx:1.13.8-alpine 24 | mounts: [] 25 | env: [] 26 | resources: 27 | requests: 28 | cpu: '0.5' 29 | memory: 0.5Gi 30 | limits: 31 | cpu: '0.5' 32 | memory: 0.5Gi 33 | ports: 34 | - protocol: HTTP 35 | port: 80 36 | volumes: [] 37 | -------------------------------------------------------------------------------- /stable/release/wordpress/4.9.1/description.yaml: -------------------------------------------------------------------------------- 1 | name: wordpress 2 | briefDesc: WordPress 是一个开源的博客系统 3 | desc: Wordress 是一个开源的博客系统,基于 PHP 和 Mysql。Wordpress 拥有大量主题和插件,用于优化 Wordress 的 UI 和功能。 4 | introduce: 5 | brief: | 6 | 基于 WrodPress 开源版本([Repo](https://github.com/WordPress/WordPress) [Dockerfile](https://github.com/docker-library/wordpress/blob/master/php7.2/apache/Dockerfile)) 7 | howToUse: | 8 | WordPress 依赖 Mysql 数据库,因此在部署 WordPress 之前,需要先部署一个 Mysql 数据库。 9 | **环境变量** 10 | - WORDPRESS_DB_HOST:Mysql 服务名。 11 | - WORDPRESS_DB_NAME:数据库名称。 12 | - WORDPRESS_DB_USER:数据库用户名。 13 | - WORDPRESS_DB_PASSWORD:数据库密码。 14 | - WORDPRESS_TABLE_PREFIX:数据库表前缀。 15 | **关于扩容** 16 | 目前不支持扩容。请不要增加副本数量。 17 | version: | 18 | 基于社区 WordPres 4.9.1 稳定版本。 19 | resources: | 20 | 最低资源要求:CPU:0.25 Core,内存:512 MiB 21 | 推荐资源配置:CPU:0.5 Core,内存:512 MiB 22 | service: | 23 | 默认使用集群内部 IP 暴露服务的 80 端口。 24 | 默认服务名为 wordpress,如果服务名冲突,请修改为其他名称。可通过服务名访问 WordPress。 25 | 如果要提供对外服务, 可以使用节点端口或者对接负载均衡来暴露服务。 26 | -------------------------------------------------------------------------------- /stable/release/turbine/2.0.0/description.yaml: -------------------------------------------------------------------------------- 1 | name: turbine 2 | briefDesc: 3 | Turbine 来对服务的 Hystrix 数据进行聚合展示。 4 | desc: | 5 | Turbine是聚合服务器发送事件流数据的一个工具,Hystrix的监控中,只能监控单个节点,实际生产中都为集群,因此可以通过Turbine来监控集群下Hystrix的metrics情况。 6 | introduce: 7 | brief: | 8 | 在复杂的分布式系统中,相同服务的节点经常需要部署上百甚至上千个,很多时候,运维人员希望能够把相同服务的节点状态以一个整体集群的形式展现出来,这样可以更好的把握整个系统的状态。 9 | 为此,Netflix提供了一个开源项目(Turbine)来提供把多个hystrix.stream的内容聚合为一个数据源供Dashboard展示。 10 | howToUse: | 11 | 直接从模版部署出一个完整的 turbine 应用,需要eureka服务。 12 | **环境变量** 13 | - TURBINE_PORT:容器内端口。 14 | - TURBINE_NAME:主机名称。 15 | - EUREKA_URL:eureka地址。 16 | - CLUSTER_CONFIG:指定聚合哪些集群 17 | - APP_CONFIG:指定了被收集的app名称 18 | - CLUSTER_NAME:指定集群名称 19 | version: | 20 | 基于 2.0.0 稳定版。 21 | resources: | 22 | 最低资源要求:CPU: 1 Core,内存:1G。 23 | 推荐资源配置:CPU: 2 Core,内存:4G。 24 | turbine 对资源较高,如果资源分配不足,可能导致启动失败。 25 | service: | 26 | 默认使用集群内部 IP 暴露服务的 8761 端口。 27 | 默认服务名为 turbine-server ,如果服务名冲突,请修改为其他名称。可通过服务名 + 端口访问 turbine-server。 28 | 如果要提供对外服务, 可以使用对接负载均衡来暴露服务。 29 | -------------------------------------------------------------------------------- /stable/release/filemanager/1.4.4/description.yaml: -------------------------------------------------------------------------------- 1 | name: filemanager 2 | briefDesc: File Manager 是一个文件管理系统 3 | desc: File Manager 提供管理指定目录的 Web UI 界面。支持上传,下载,修改,删除,预览,重命名等功能。同时支持多个用户,并且每个用户可以拥有自己的目录。 4 | introduce: 5 | brief: | 6 | 基于 File Manager 开源版本([Repo](https://github.com/hacdias/filemanager) [Dockerfile](https://github.com/hacdias/filemanager/blob/master/Dockerfile)) 7 | howToUse: | 8 | 直接从模板部署出一个完整的 File Manager 应用,不需要任何外部依赖。 9 | File Manager 拥有 Web UI,可通过 UI 登陆并管理文件。 10 | **管理员信息** 11 | 账号: admin 12 | 密码: admin 13 | 请在首次登陆后修改管理员密码。 14 | **如何挂载数据** 15 | File Manager 的所有数据都挂载在 `/srv`. 默认使用的是临时数据卷,如果需要持久化文件数据,请挂载其他类型的数据卷。 16 | **关于扩容** 17 | 目前不支持扩容。请不要增加副本数量。 18 | version: | 19 | 基于社区 1.4.4 稳定版本。 20 | resources: | 21 | 最低资源要求:CPU:0.25 Core,内存:128 MiB 22 | 推荐资源配置:CPU:0.25 Core,内存:512 MiB 23 | File Manager 对资源要求不高,如果资源紧张,可以适当降低资源配置。 24 | service: | 25 | 默认使用集群内部 IP 暴露服务的 80 端口。 26 | 默认服务名为 filemanager,如果服务名冲突,请修改为其他名称。可通过服务名访问 File Manager。 27 | 如果要提供对外服务, 可以使用节点端口或者对接负载均衡来暴露服务。 28 | -------------------------------------------------------------------------------- /stable/release/nginx/1.13.8/description.yaml: -------------------------------------------------------------------------------- 1 | name: Nginx 2 | briefDesc: Nginx 是一看轻量级的 Web 服务器和反向代理服务器 3 | desc: | 4 | Nginx(发音同engine x)是一个 Web服务器,也可以用作反向代理,负载平衡器和 HTTP缓存。 5 | 该软件由 Igor Sysoev 创建,并于2004年首次公开发布。同名公司成立于2011年,以提供支持。 6 | Nginx是一款免费的开源软件,根据类BSD许可证的条款发布。大部分 Web服务器通常使用 NGINX 作为负载均衡器。 7 | introduce: 8 | brief: | 9 | 基于 Nginx 社区版本(Repo(https://github.com/nginxinc/docker-nginx) - [Dockerfile](https://github.com/nginxinc/docker-nginx/blob/f8fad321cf58d5cbcafa3d9fa15314b8a77b5e65/mainline/alpine/Dockerfile)) 10 | howToUse: | 11 | 直接从模板部署出一个完整的 Nginx 应用,不需要任何外部依赖。 12 | **如何挂载数据** 13 | 静态网页数据挂载在 `/usr/share/nginx/html` 14 | 配置挂载在 `/etc/nginx/nginx.conf` 15 | **配置** 16 | 更加详细的配置说明请看官方文档 [Beginner Guide](http://nginx.org/en/docs/beginners_guide.html) [Full Example Configuration](https://www.nginx.com/resources/wiki/start/topics/examples/full/) 17 | version: | 18 | 基于社区 1.13.8 稳定版本。 19 | resources: | 20 | 没有最低配置的要求,资源配置视使用情况而定 21 | 推荐资源配置:CPU:2 Core,内存:2 GiB 22 | service: | 23 | 默认使用集群内部 IP 暴露服务的 80 端口 24 | 如果要提供对外服务, 可以使用节点端口或者对接负载均衡来暴露服务。 -------------------------------------------------------------------------------- /stable/release/kibana/6.5.4/values.yaml: -------------------------------------------------------------------------------- 1 | _config: 2 | _metadata: 3 | name: kibana 4 | version: 6.5.4 5 | description: | 6 | Kibana is your window into the Elastic Stack. Specifically, it's a browser-based analytics and search dashboard for Elasticsearch. 7 | controllers: 8 | - type: Deployment 9 | controller: 10 | replica: 1 11 | strategy: 12 | type: "RollingUpdate" 13 | name: kibana 14 | services: 15 | - name: kibana 16 | type: ClusterIP 17 | ports: 18 | - protocol: HTTP 19 | targetPort: 5601 20 | port: 5601 21 | nodePort: 0 22 | containers: 23 | - imagePullPolicy: Always 24 | image: cargo.caicloudprivatetest.com/library/kibana:6.5.4 25 | mounts: [] 26 | env: 27 | - name: ELASTICSEARCH_URL 28 | value: http://elasticsearch:9200 29 | resources: 30 | requests: 31 | cpu: '0.1' 32 | memory: 0.5Gi 33 | limits: 34 | cpu: '1' 35 | memory: 2Gi 36 | ports: 37 | - protocol: TCP 38 | port: 5601 39 | -------------------------------------------------------------------------------- /stable/release/redmine/3.4.4/description.yaml: -------------------------------------------------------------------------------- 1 | name: redmine 2 | briefDesc: Redmine 是一个基于 Web 的项目管理工具 3 | desc: Redmine 是一个开源的基于 Web 的项目管理和问题跟踪的工具。它让用户能够同时管理多个项目和子项目,每个项目都有 wiki,论坛,时间跟踪,以及基于角色的权限管理。Redmine 也集成了多种版本控制系统以查看项目源码。 4 | introduce: 5 | brief: | 6 | 基于 Redmine 开源版本([Repo](https://github.com/redmine/redmine) [Dockerfile](https://github.com/docker-library/redmine/blob/master/3.4/Dockerfile)) 7 | howToUse: | 8 | Redmine 依赖 Mysql 数据库,因此在部署 Redmine 之前,需要先部署一个 Mysql 数据库。 9 | **管理员信息** 10 | 账号: admin 11 | 密码: admin 12 | 请在首次登陆后修改管理员密码。 13 | **环境变量** 14 | - REDMINE_DB_MYSQL:Mysql 服务名。 15 | - REDMINE_DB_PORT:Mysql 服务端口,一般为 3306. 16 | - REDMINE_DB_DATABASE:数据库名称。 17 | - REDMINE_DB_USERNAME:数据库用户名。 18 | - REDMINE_DB_PASSWORD:数据库密码。 19 | **关于扩容** 20 | 目前不支持扩容。请不要增加副本数量。 21 | version: | 22 | 基于社区 Redmine 3.4.4 稳定版本。 23 | resources: | 24 | 最低资源要求:CPU:0.25 Core,内存:128 MiB 25 | 推荐资源配置:CPU:0.5 Core,内存:512 MiB 26 | service: | 27 | 默认使用集群内部 IP 暴露服务的 80 端口。 28 | 默认服务名为 redmine,如果服务名冲突,请修改为其他名称。可通过服务名访问 Redmine。 29 | 如果要提供对外服务, 可以使用节点端口或者对接负载均衡来暴露服务。 30 | -------------------------------------------------------------------------------- /stable/release/influxdb/1.4.2/description.yaml: -------------------------------------------------------------------------------- 1 | name: influxdb 2 | briefDesc: InfluxDB 是一个开源的时序数据库 3 | desc: InfluxDB 是一个开源的时序数据库,专门用于处理高频读写请求。并且主要用于存储大量的时序数据,包括监控信息,应用指标数据,IoT 传感器数据等。 4 | introduce: 5 | brief: | 6 | 基于 InfluxDB 开源版本([Repo](https://github.com/influxdata/influxdb) [Dockerfile](https://github.com/influxdata/influxdata-docker/blob/master/influxdb/1.4/Dockerfile)) 7 | howToUse: | 8 | 直接从模板部署出一个完整的 InfluxDB 数据库,不需要任何外部依赖。 9 | **如何挂载数据** 10 | InfluxDB 的所有数据都挂载在 `/var/lib/influxdb`. 默认使用的是临时数据卷,如果需要持久化文件数据,请挂载其他类型的数据卷。 11 | **配置** 12 | InfluxDB 的配置路径为 `/etc/influxdb/influxdb.conf`,如果需要自定义 InfluxDB 的配置,请将配置挂载到该位置。 13 | InfluxDB 也提供了使用环境变量的方式设置配置,请参考[配置](https://docs.influxdata.com/influxdb/v1.4/administration/config/)。 14 | **关于扩容** 15 | 目前不支持扩容。请不要增加副本数量。 16 | version: | 17 | 基于社区 InfluxDB 1.4.2 稳定版本。 18 | resources: | 19 | 最低资源要求:CPU:0.25 Core,内存:512 MiB 20 | 推荐资源配置:CPU:1 Core,内存:1 GiB 21 | service: | 22 | 默认使用集群内部 IP 暴露服务的 8086 和 8088 端口。8086 端口提供 HTTP API 服务,8088 端口提供 RPC 服务用于备份和恢复。 23 | 默认服务名为 influxdb,如果服务名冲突,请修改为其他名称。可通过服务名访问数据库。 24 | 如果要提供对外服务, 可以使用节点端口或者对接负载均衡来暴露服务。 25 | -------------------------------------------------------------------------------- /stable/release/memcached/1.5.4/values.yaml: -------------------------------------------------------------------------------- 1 | _config: 2 | _metadata: 3 | name: memcached 4 | version: 1.5.4 5 | description: | 6 | Free & open source, high-performance, distributed memory object caching. 7 | controllers: 8 | - containers: 9 | - imagePullPolicy: Always 10 | image: cargo.caicloudprivatetest.com/library/memcached:1.5.4-alpine 11 | resources: 12 | limits: 13 | cpu: '1' 14 | memory: 4Gi 15 | requests: 16 | cpu: '0.25' 17 | memory: 512Mi 18 | ports: 19 | - protocol: HTTP 20 | port: 11211 21 | probe: {} 22 | services: 23 | - ports: 24 | - protocol: HTTP 25 | targetPort: 11211 26 | port: 11211 27 | nodePort: 0 28 | name: memcached 29 | type: ClusterIP 30 | volumes: [] 31 | pod: 32 | restart: Always 33 | dns: ClusterFirst 34 | termination: 30 35 | host: 36 | network: false 37 | pid: false 38 | ipc: false 39 | type: Deployment 40 | controller: 41 | replica: 1 42 | strategy: 43 | unavailable: 0 44 | surge: 1 45 | -------------------------------------------------------------------------------- /stable/release/config-server/2.0.0/description.yaml: -------------------------------------------------------------------------------- 1 | name: config-server 2 | briefDesc: 3 | Config Server 是 Spring Cloud 架构中的一套用于配置管理的组件。 4 | desc: | 5 | Spring Cloud Config 提供一种基于客户端与服务端(C/S)模式的分布式的配置管理。可以把配置管理在应用之外(config server 端),并且可以在外部对配置进行不同环境的管理,比如开发/测试/生产环境隔离,并且还能够做到实时更新配置。 6 | introduce: 7 | brief: | 8 | 拉取配置时更新 git 仓库副本,保证是最新结果。 9 | 支持数据结构丰富,yml, json, properties 。 10 | 配合 eureke 可实现服务发现,配合 cloud bus 可实现配置推送更新。 11 | 配置存储基于 git 仓库,可进行版本管理。 12 | 简单可靠,有丰富的配套方案。 13 | howToUse: | 14 | 直接从模版部署出一个完整的 config-server 应用,需要配置仓库地址。 15 | **环境变量** 16 | - CONFIG_SERVER_PORT:容器内端口。 17 | - CONFIG_SERVER_NAME:主机名称。 18 | - ENABLE_EUREKA:开启eureka客户端。 19 | - EUREKA_URL:eureka服务地址。 20 | - GIT_URL:配置仓库地址。 21 | - SEARCH_PATH:搜索路径。 22 | - USERNAME:用户名。 23 | - PASSWORD:密码。 24 | version: | 25 | 基于 2.0.0 稳定版。 26 | resources: | 27 | 最低资源要求:CPU: 1 Core,内存:1G。 28 | 推荐资源配置:CPU: 2 Core,内存:4G。 29 | config-server 对资源较高,如果资源分配不足,可能导致启动失败。 30 | service: | 31 | 默认使用集群内部 IP 暴露服务的 8888 端口。 32 | 默认服务名为 caicloud-config-server ,如果服务名冲突,请修改为其他名称。可通过服务名 + 端口访问 config-server。 33 | 如果要提供对外服务, 可以使用对接负载均衡来暴露服务。 34 | -------------------------------------------------------------------------------- /stable/release/hystrix-dashboard/1.2.3/description.yaml: -------------------------------------------------------------------------------- 1 | name: hystrix-dashboard 2 | briefDesc: Hystrix-dashboard 是一款针对Hystrix进行实时监控的工具。 3 | desc: | 4 | Spring Cloud 除了整合 Hystrix,也完美地整合了它的仪表盘组件 Hystrix Dashboard。Hystrix Dashboard 是作为断路器状态的一个组件,它主要用来实时监控Hystrix的各项指标信息,并且它为我们提供了友好的图形化界面。通过 Hystrix Dashboard 反馈的实时信息,可以帮助我们快速发现系统存在的问题,从而及时地采取应对措施。 5 | introduce: 6 | brief: | 7 | 基于官方 1.2.3 稳定版本。 8 | howToUse: | 9 | 直接从模版部署出一个完整的 htstrix-dashboard 应用,不需要任何外部依赖。 10 | **环境变量** 11 | - HYSTRIX_DASHBOARD_PORT:容器内端口。 12 | version: | 13 | 基于官方 1.2.3 提供定制化版本。 14 | resources: | 15 | 最低资源要求:CPU:1 Core,内存:1G 16 | 推荐资源配置:CPU:2 Core,内存:4G 17 | service: | 18 | 默认使用集群内部IP 暴露服务的 30008 端口。 19 | 默认服务名为 hystrix-dashboard,如果服务名冲突,请修改为其他名称。可通过服务名+端口访问 hystrix-dashboard/hystrix 。 20 | 如果要提供对外服务, 可以使用对接负载均衡来暴露服务。 21 | 默认的集群监控:通过 http://turbine-hostname:port/turbine.stream 开启,实现对默认集群的监控。 22 | 指定的集群监控:通过 http://turbine-hostname:port/turbine.stream?cluster=[clusterName] 开启,实现对 clusterName 集群的监控。 23 | 单体应用的监控:通过 http://hystrix-app:port/hystrix.stream 开启,实现对具体某个服务实例的监控。 24 | Delay:控制服务器上轮询监控信息的延迟时间,默认为 2000 毫秒,可以通过配置该属性来降低客户端的网络和CPU消耗。 25 | Title:该参数可以展示合适的标题 26 | -------------------------------------------------------------------------------- /stable/release/redis/4.0.6/description.yaml: -------------------------------------------------------------------------------- 1 | name: Redis 2 | briefDesc: Redis 是一个开源 key-value 数据库 3 | desc: | 4 | Redis是一个使用ANSI C编写的开源、支持网络、基于内存、可选持久性的键值对存储数据库。 5 | 它支持以下数据类型:字符串,哈希表,列表,集合,有序集合,位图,hyperloglog,支持半径查询的地理空间索引。 6 | Redis 内置了复制,Lua 脚本,LRU 回收,事务和不同级别持久化存储等功能,通过 Redis Sentinel 来支持高可用,通过 Redis 7 | Cluster 来支持自动分区。 8 | 从2015年6月开始,Redis的开发由Redis Labs赞助,而2013年5月至2015年6月期间,其开发由Pivotal赞助。 9 | 在2013年5月之前,其开发由VMware赞助。根据月度排行网站DB-Engines.com的数据显示,Redis是最流行的键值对存储数据库。 10 | introduce: 11 | brief: | 12 | 基于 Redis 社区版本(Repo(https://github.com/docker-library/redis) - [Dockerfile](https://github.com/docker-library/redis/blob/9c63bd5fc7b52cc3d8f3441a660a593028a0ed15/4.0/alpine/Dockerfile)) 13 | howToUse: | 14 | 直接从模板部署出一个完整的 Redis 应用,不需要任何外部依赖。 15 | **如何挂载数据** 16 | 数据挂载在 `/data` 17 | 配置挂载在 `/usr/local/etc/redis/redis.conf` 18 | **配置** 19 | 更加详细的配置说明请看[自解释的配置](https://raw.githubusercontent.com/antirez/redis/4.0/redis.conf) 20 | version: | 21 | 基于社区 4.0.6 稳定版本。 22 | resources: | 23 | 最低资源要求:CPU:1 Core,内存:2 GiB,1个节点 24 | 推荐资源配置:CPU:4 Core,内存:4 GiB,2个以上节点 25 | service: | 26 | 默认使用集群内部 IP 暴露服务的 6379 端口 27 | 如果要提供对外服务, 可以使用节点端口或者对接负载均衡来暴露服务。 28 | -------------------------------------------------------------------------------- /stable/release/mysql/5.7.20/description.yaml: -------------------------------------------------------------------------------- 1 | name: mysql 2 | briefDesc: Mysql 是一个开源的关系型数据库管理系统 3 | desc: Mysql 是一个开源的基于 SQL 的关系型数据库系统。Mysql 具有多种数据库引擎,用户可以根据不同的业务需求进行选择。 4 | introduce: 5 | brief: | 6 | 基于 Mysql 开源版本([Repo](https://github.com/mysql/mysql-server) [Dockerfile](https://github.com/docker-library/mysql/blob/master/5.7/Dockerfile)) 7 | howToUse: | 8 | 直接从模板部署出一个完整的 Mysql 数据库,不需要任何外部依赖。 9 | **环境变量** 10 | - MYSQL_ROOT_PASSWORD:Mysql root 用户密码。 11 | - MYSQL_DATABASE:数据库初始化时默认创建的数据库。 12 | - MYSQL_USER:数据库初始化时默认创建的用户。 13 | - MYSQL_PASSWORD:数据库初始化时默认创建的用户密码。 14 | 其中 MYSQL_DATABASE,MYSQL_USER,MYSQL_PASSWORD 三项可不填写。不填则默认不创建数据库和新用户。 15 | **如何挂载数据** 16 | Mysql 的所有数据都挂载在 `/var/lib/mysql`. 默认使用的是临时数据卷,如果需要持久化文件数据,请挂载其他类型的数据卷。 17 | **配置** 18 | Mysql 的配置在 `/etc/mysql` 目录中,如果需要自定义 Mysql 的配置,请将配置挂载到该目录中。 19 | **关于扩容** 20 | 目前不支持扩容。请不要增加副本数量。如果需要使用 Mysql 集群,请使用 Galera。 21 | version: | 22 | 基于社区 Mysql 5.7.20 稳定版本。 23 | resources: | 24 | 最低资源要求:CPU:0.25 Core,内存:512 MiB 25 | 推荐资源配置:CPU:1 Core,内存:1 GiB 26 | service: | 27 | 默认使用集群内部 IP 暴露服务的 3306 端口。 28 | 默认服务名为 mysql,如果服务名冲突,请修改为其他名称。可通过服务名访问数据库。 29 | 如果要提供对外服务, 可以使用节点端口或者对接负载均衡来暴露服务。 30 | -------------------------------------------------------------------------------- /stable/release/eureka/1.9.2/description.yaml: -------------------------------------------------------------------------------- 1 | name: eureka 2 | briefDesc: Eureka 是一个开源的服务发现框架。 3 | desc: | 4 | Eureka 是 Netflix 开发的服务发现框架,本身是一个基于 REST 的服务,主要用于定位运行在 AWS 域中的中间层服务,以达到负载均衡和中间层服务故障转移的目的。SpringCloud 将它集成在其子项目 spring-cloud-netflix 中,以实现 SpringCloud 的服务发现功能。 5 | introduce: 6 | brief: | 7 | Eureka 包含两个组件:Eureka Server 和 Eureka Client。 8 | Eureka Server 提供服务注册服务,各个节点启动后,会在 Eureka Server 中进行注册,这样 Eureka Server 中的服务注册表中将会存储所有可用服务节点的信息,服务节点的信息可以在界面中直观的看到。 9 | Eureka Client 是一个 java 客户端,用于简化与 Eureka Server 的交互,客户端同时也就别一个内置的、使用轮询(round-robin)负载算法的负载均衡器。 10 | 在应用启动后,将会向 Eureka Server 发送心跳,默认周期为 30 秒,如果 Eureka Server 在多个心跳周期内没有接收到某个节点的心跳,Eureka Server 将会从服务注册表中把这个服务节点移除(默认 90 秒)。 11 | Eureka Server 之间通过复制的方式完成数据的同步,Eureka 还提供了客户端缓存机制,即使所有的 Eureka Server 都挂掉,客户端依然可以利用缓存中的信息消费其他服务的 API。综上,Eureka 通过心跳检查、客户端缓存等机制,确保了系统的高可用性、灵活性和可伸缩性。 12 | howToUse: | 13 | 直接从模版部署出一个完整的 Eureka 应用,不需要任何外部依赖。 14 | version: | 15 | 基于 1.9.2 稳定版。 16 | resources: | 17 | 最低资源要求:CPU: 1 Core,内存:1G。 18 | 推荐资源配置:CPU: 2 Core,内存:4G。 19 | Eureka 对资源较高,如果资源分配不足,可能导致启动失败。 20 | service: | 21 | 默认使用集群内部 IP 暴露服务的 8761 端口。 22 | 默认服务名为 eureka ,如果服务名冲突,请修改为其他名称。可通过服务名 + 端口访问 Eureka。 23 | 如果要提供对外服务, 可以使用对接负载均衡来暴露服务。 24 | -------------------------------------------------------------------------------- /stable/release/gitlab-ce/10.3.3/description.yaml: -------------------------------------------------------------------------------- 1 | name: gitlab-ce 2 | briefDesc: Gitlab 是一个开源的自托管的Git项目仓库 3 | desc: | 4 | GitLab 是一个利用 Ruby on Rails 开发的开源应用程序,实现一个自托管的 Git 项目仓库,可通过 Web 界面进行访问公开的或者私人项目。 5 | 它拥有与 GitHub 类似的功能,能够浏览源代码,管理缺陷和注释。可以管理团队对仓库的访问,它非常易于浏览提交过的版本并提供一个文件历史库。 6 | 团队成员可以利用内置的简单聊天程序(Wall)进行交流。它还提供一个代码片段收集功能可以轻松实现代码复用,便于日后有需要的时候进行查找。 7 | introduce: 8 | brief: | 9 | 基于 Gitlab 社区版本([Repo](https://gitlab.com/gitlab-org/omnibus-gitlab) - [Dockerfile](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/docker/Dockerfile)) 10 | howToUse: | 11 | 直接从模板部署出一个完整的 Gitlab 应用,不需要任何外部依赖。 12 | **如何挂载数据** 13 | 日志挂载在 `/var/log/gitlab`, 14 | 数据挂载在 `/var/opt/gitlab`. 15 | 配置挂载在 `/etc/gitlab/gitlab.rb` 16 | **配置** 17 | 需要确保 Gitlab 配置文件里面配置了external_url, 18 | 更加完整的配置请查看[官方文档](https://docs.gitlab.com/omnibus/settings/configuration.html) 19 | 另外,你还可以通过环境变量 `GITLAB_OMNIBUS_CONFIG` 来预先配置 gitlab, 注意 `GITLAB_OMNIBUS_CONFIG` 的值并不会被写入 `gitlab.rb` 配置文件中。 20 | version: | 21 | 基于社区 10.3.3 稳定版本。 22 | resources: | 23 | 最低资源要求:CPU:1 Core,内存:2 GiB。 24 | 推荐资源配置:CPU:2 Core,内存:4 GiB, 能支持 100-500 个用户使用 25 | service: | 26 | 默认使用集群内部 IP 暴露服务的80,443,22端口, 27 | 如果要提供对外服务, 可以使用节点端口或者对接负载均衡来暴露服务。 -------------------------------------------------------------------------------- /stable/release/jenkins/2.101.0/description.yaml: -------------------------------------------------------------------------------- 1 | name: Jenkins 2 | briefDesc: Jekins 是一个开源的持续集成工具 3 | desc: | 4 | Jenkins是一个用Java编写的开源的持续集成工具。Jenkins提供了软件开发的持续集成服务。 5 | 它运行在Servlet容器中(例如Apache Tomcat)。它支持软件配置管理(SCM)工具(包括AccuRev SCM、CVS、 6 | Subversion、Git、Perforce、Clearcase和RTC),可以执行基于Apache Ant和Apache Maven的项目, 7 | 以及任意的Shell脚本和Windows批处理命令。Jenkins的主要开发者是川口耕介。Jenkins是在MIT许可证下发布的自由软件。 8 | 可以通过各种手段触发构建。例如提交给版本控制系统时被触发,也可以通过类似Cron的机制调度, 9 | 也可以在其他的构建已经完成时,还可以通过一个特定的URL进行请求。 10 | introduce: 11 | brief: | 12 | 基于 Jenkins 社区版本([Repo](https://github.com/jenkinsci/docker) - [Dockerfile](https://github.com/jenkinsci/docker/blob/master/Dockerfile-alpine)) 13 | 在上面添加了大量常用的插件,如果pipeline,git, svn, github, gitlab等 14 | howToUse: | 15 | 直接从模板部署出一个完整的 Jenkins 应用,不需要任何外部依赖。 16 | 跳过了默认输入验证码的步骤,内置了一个管理员账户,用户名:admin,密码:admin 17 | **如何挂载数据** 18 | Jenkins 的所有数据都挂载在 `/var/jenkins_home`. 19 | **配置** 20 | Jenkins 的配置全部都是写入 `jenkins_home`, 所以需要将 `jenkins_home` 挂载在一个可持久化的存储上 21 | version: | 22 | 基于社区 2.101.0 稳定版本。 23 | resources: | 24 | 最低资源要求:CPU:1 Core,内存:2 GiB 25 | 推荐资源配置:CPU:4 Core,内存:4 GiB 26 | Jenkins 非常吃资源,资源越大越好。 27 | service: | 28 | 默认使用集群内部 IP 暴露服务的 8080 和 50000 端口 29 | 如果要提供对外服务, 可以使用节点端口或者对接负载均衡来暴露服务。 -------------------------------------------------------------------------------- /stable/release/mariadb/10.2.12/description.yaml: -------------------------------------------------------------------------------- 1 | name: mariadb 2 | briefDesc: MariaDB 是一个开源的关系型数据库管理系统 3 | desc: MariaDB 是一个开源的基于 SQL 的关系型数据库系统。MariaDB 是 Mysql 的一个分支,由社区维护。MariaDB 兼容 Mysql 5.5 及以前的所有特性,与 Mysql 后续版本特性可能不兼容。 4 | introduce: 5 | brief: | 6 | 基于 MariaDB 开源版本([Repo](https://github.com/MariaDB/server) [Dockerfile](https://github.com/docker-library/mariadb/blob/master/10.2/Dockerfile)) 7 | howToUse: | 8 | 直接从模板部署出一个完整的 MariaDB 数据库,不需要任何外部依赖。由于是 Mysql 的分支,因此目录和所需的环境变量都与 Mysql 相同。 9 | **环境变量** 10 | - MYSQL_ROOT_PASSWORD:Mysql root 用户密码。 11 | - MYSQL_DATABASE:数据库初始化时默认创建的数据库。 12 | - MYSQL_USER:数据库初始化时默认创建的用户。 13 | - MYSQL_PASSWORD:数据库初始化时默认创建的用户密码。 14 | 其中 MYSQL_DATABASE,MYSQL_USER,MYSQL_PASSWORD 三项可不填写。不填则默认不创建数据库和新用户。 15 | **如何挂载数据** 16 | MariaDB 的所有数据都挂载在 `/var/lib/mysql`. 默认使用的是临时数据卷,如果需要持久化文件数据,请挂载其他类型的数据卷。 17 | **配置** 18 | MariaDB 的配置在 `/etc/mysql` 目录中,如果需要自定义 MariaDB 的配置,请将配置挂载到该目录中。 19 | **关于扩容** 20 | 目前不支持扩容。请不要增加副本数量。 21 | version: | 22 | 基于社区 MariaDB 10.2.12 稳定版本。 23 | resources: | 24 | 最低资源要求:CPU:0.25 Core,内存:512 MiB 25 | 推荐资源配置:CPU:1 Core,内存:1 GiB 26 | service: | 27 | 默认使用集群内部 IP 暴露服务的 3306 端口。 28 | 默认服务名为 mariadb,如果服务名冲突,请修改为其他名称。可通过服务名访问数据库。 29 | 如果要提供对外服务, 可以使用节点端口或者对接负载均衡来暴露服务。 30 | -------------------------------------------------------------------------------- /stable/release/eureka/2.0.0/description.yaml: -------------------------------------------------------------------------------- 1 | name: eureka 2 | briefDesc: Eureka 是一个开源的服务发现框架。 3 | desc: | 4 | Eureka 是 Netflix 开发的服务发现框架,本身是一个基于 REST 的服务,主要用于定位运行在 AWS 域中的中间层服务,以达到负载均衡和中间层服务故障转移的目的。SpringCloud 将它集成在其子项目 spring-cloud-netflix 中,以实现 SpringCloud 的服务发现功能。 5 | introduce: 6 | brief: | 7 | Eureka 包含两个组件:Eureka Server 和 Eureka Client。 8 | Eureka Server 提供服务注册服务,各个节点启动后,会在 Eureka Server 中进行注册,这样 Eureka Server 中的服务注册表中将会存储所有可用服务节点的信息,服务节点的信息可以在界面中直观的看到。 9 | Eureka Client 是一个 java 客户端,用于简化与 Eureka Server 的交互,客户端同时也就别一个内置的、使用轮询(round-robin)负载算法的负载均衡器。 10 | 在应用启动后,将会向 Eureka Server 发送心跳,默认周期为 30 秒,如果 Eureka Server 在多个心跳周期内没有接收到某个节点的心跳,Eureka Server 将会从服务注册表中把这个服务节点移除(默认 90 秒)。 11 | Eureka Server 之间通过复制的方式完成数据的同步,Eureka 还提供了客户端缓存机制,即使所有的 Eureka Server 都挂掉,客户端依然可以利用缓存中的信息消费其他服务的 API。综上,Eureka 通过心跳检查、客户端缓存等机制,确保了系统的高可用性、灵活性和可伸缩性。 12 | howToUse: | 13 | 直接从模版部署出一个完整的 Eureka 应用,不需要任何外部依赖。 14 | **环境变量** 15 | - EUREKA_PORT:容器内端口。 16 | - EUREKA_HOST_NAME:主机名称。 17 | version: | 18 | 基于 2.0.0 稳定版。 19 | resources: | 20 | 最低资源要求:CPU: 1 Core,内存:1G。 21 | 推荐资源配置:CPU: 2 Core,内存:4G。 22 | Eureka 对资源较高,如果资源分配不足,可能导致启动失败。 23 | service: | 24 | 默认使用集群内部 IP 暴露服务的 8761 端口。 25 | 默认服务名为 eureka ,如果服务名冲突,请修改为其他名称。可通过服务名 + 端口访问 Eureka。 26 | 如果要提供对外服务, 可以使用对接负载均衡来暴露服务。 27 | -------------------------------------------------------------------------------- /templates/1.0.0/templates/volumes.yaml: -------------------------------------------------------------------------------- 1 | {{/* Generates all dynamic volumes */}} 2 | 3 | 4 | {{/* Creates pvc for storage class */}} 5 | {{- $g := . -}} 6 | {{- range $index, $controller := .Values._config.controllers -}} 7 | {{- $controllerName := include "onlyname" (list $g $index) | default (include "fullname" (list $g $index)) -}} 8 | {{- range $controller.volumes -}} 9 | {{- if eq .type "Dynamic" }} 10 | --- 11 | apiVersion: v1 12 | kind: PersistentVolumeClaim 13 | metadata: 14 | {{- if eq $controller.type "StatefulSet" }} 15 | {{ $name := $controller.controller.name | default $controllerName -}} 16 | name: {{ printf "%s-%s" $name .name | quote }} 17 | {{- else }} 18 | name: {{ printf "%s-%s" $controllerName .name | quote }} 19 | {{- end }} 20 | labels: 21 | "volume.caicloud.io/type" : {{ .type | quote }} 22 | {{- include "releaselabels" (list $g.Release.Name $g.Chart.Name) | indent 4 }} 23 | spec: 24 | accessModes: 25 | {{- range .source.modes }} 26 | - {{ . | quote }} 27 | {{- end }} 28 | storageClassName: {{ .source.class | quote }} 29 | resources: 30 | requests: 31 | storage: {{ .storage.request }} 32 | {{- if hasKey .storage "limit" }} 33 | limits: 34 | storage: {{ .storage.limit }} 35 | {{- end }} 36 | --- 37 | {{ end -}} 38 | {{- end -}} 39 | {{- end -}} 40 | -------------------------------------------------------------------------------- /stable/release/rabbitmq/3.7.2/description.yaml: -------------------------------------------------------------------------------- 1 | name: RabbitMQ 2 | briefDesc: RabbitMQ 是实现了高级消息队列协议的开源消息代理软件 3 | desc: | 4 | RabbitMQ是实现了高级消息队列协议(AMQP)的开源消息代理软件(亦称面向消息的中间件)。 5 | RabbitMQ服务器是用Erlang语言编写的,而群集和故障转移是构建在开放电信平台框架上的。 6 | 所有主要的编程语言均有与代理接口通讯的客户端库。 7 | introduce: 8 | brief: | 9 | 基于 RabbitMQ 社区版本(Repo(https://github.com/docker-library/rabbitmq) - [Dockerfile](https://github.com/docker-library/rabbitmq/blob/31a69457c8adbe0d7fe7e33afeaa95e4faf2b73e/3.7/alpine/Dockerfile)) 10 | howToUse: | 11 | 直接从模板部署出一个完整的 RabbitMQ 应用,不需要任何外部依赖。 12 | RabbitMQ 使用节点名(hostname)来存储数据,我们在应用内部使用了 `StatefulSet` 来启动多个副本, 13 | 保证每次启动的 RabbitMQ hostname 都是固定的。 14 | **如何挂载数据** 15 | 数据挂载在 `/var/lib/rabbitmq` 16 | database 路径 `/var/lib/rabbitmq/mnesia/rabbit@hostname` 17 | 配置挂载在 `/etc/rabbitmq/rabbitmq.config` 18 | **配置** 19 | 更加详细的配置说明请看[官方文档](https://www.rabbitmq.com/configure.html) 20 | **Erlang Cookie** 21 | 节点之间使用 cookie([关于 RabbitMQ 集群](https://www.rabbitmq.com/clustering.html#erlang-cookie)) 来判断是否通信,唯有 cookie 相同的节点之间才能通信。 22 | 你可使用 `RABBITMQ_ERLANG_COOKIE` 来设置 RabbitMQ 实例的 cookie 23 | 24 | version: | 25 | 基于社区 3.7.2 稳定版本。 26 | resources: | 27 | 没有最低配置的要求,资源配置视使用情况而定 28 | 推荐资源配置:CPU:2 Core,内存:2 GiB 29 | service: | 30 | 默认使用集群内部 IP 暴露服务的 4369,5671,5672,25672 端口 31 | 如果要提供对外服务, 可以使用节点端口或者对接负载均衡来暴露服务。 32 | -------------------------------------------------------------------------------- /stable/release/filemanager/1.4.4/values.yaml: -------------------------------------------------------------------------------- 1 | _config: 2 | _metadata: 3 | name: filemanager 4 | version: 1.4.4 5 | description: | 6 | Web File Manager which can be used as a middleware or standalone app. 7 | controllers: 8 | - containers: 9 | - env: [] 10 | mounts: 11 | - path: "/srv" 12 | name: data 13 | command: [] 14 | args: [] 15 | imagePullPolicy: Always 16 | image: cargo.caicloudprivatetest.com/release/filemanager:1.4.4 17 | resources: 18 | limits: 19 | cpu: '0.25' 20 | memory: 512Mi 21 | requests: 22 | cpu: '0.25' 23 | memory: 128Mi 24 | ports: 25 | - protocol: HTTP 26 | port: 80 27 | probe: {} 28 | services: 29 | - ports: 30 | - protocol: HTTP 31 | targetPort: 80 32 | port: 80 33 | nodePort: 0 34 | name: filemanager 35 | type: ClusterIP 36 | volumes: 37 | - storage: 38 | limit: 10Gi 39 | request: 10Gi 40 | source: {} 41 | type: Static 42 | name: data 43 | pod: 44 | restart: Always 45 | dns: ClusterFirst 46 | termination: 30 47 | host: 48 | network: false 49 | pid: false 50 | ipc: false 51 | type: Deployment 52 | controller: 53 | replica: 1 54 | strategy: 55 | unavailable: 0 56 | surge: 1 57 | -------------------------------------------------------------------------------- /stable/release/mongo/3.6.1/values.yaml: -------------------------------------------------------------------------------- 1 | _config: 2 | _metadata: 3 | name: mongo 4 | version: 3.6.1 5 | description: | 6 | NoSQL document-oriented database that stores JSON-like documents with dynamic schemas, simplifying the integration of data in content-driven applications. 7 | controllers: 8 | - containers: 9 | - env: [] 10 | mounts: 11 | - path: "/data/db" 12 | name: data 13 | command: [] 14 | args: [] 15 | imagePullPolicy: Always 16 | image: cargo.caicloudprivatetest.com/library/mongo:3.6.1 17 | resources: 18 | limits: 19 | cpu: '1' 20 | memory: 1Gi 21 | requests: 22 | cpu: '0.25' 23 | memory: 512Mi 24 | ports: 25 | - protocol: HTTP 26 | port: 27017 27 | probe: {} 28 | services: 29 | - ports: 30 | - protocol: HTTP 31 | targetPort: 27017 32 | port: 27017 33 | nodePort: 0 34 | name: mongo 35 | type: ClusterIP 36 | volumes: 37 | - storage: 38 | limit: 10Gi 39 | request: 10Gi 40 | source: {} 41 | type: Static 42 | name: data 43 | pod: 44 | restart: Always 45 | dns: ClusterFirst 46 | termination: 30 47 | host: 48 | network: false 49 | pid: false 50 | ipc: false 51 | type: Deployment 52 | controller: 53 | replica: 1 54 | strategy: 55 | unavailable: 0 56 | surge: 1 57 | -------------------------------------------------------------------------------- /stable/release/redmine/3.4.4/values.yaml: -------------------------------------------------------------------------------- 1 | _config: 2 | _metadata: 3 | name: redmine 4 | version: 3.4.4 5 | description: | 6 | Redmine is a flexible project management web application. Written using the Ruby on Rails framework, it is cross-platform and cross-database. 7 | controllers: 8 | - containers: 9 | - env: 10 | - name: REDMINE_DB_MYSQL 11 | value: mysql 12 | - name: REDMINE_DB_PORT 13 | value: '3306' 14 | - name: REDMINE_DB_DATABASE 15 | value: db 16 | - name: REDMINE_DB_USERNAME 17 | value: user 18 | - name: REDMINE_DB_PASSWORD 19 | value: password 20 | mounts: [] 21 | command: [] 22 | args: [] 23 | imagePullPolicy: Always 24 | image: cargo.caicloudprivatetest.com/library/redmine:3.4.4 25 | resources: 26 | limits: 27 | cpu: '0.5' 28 | memory: 512Mi 29 | requests: 30 | cpu: '0.25' 31 | memory: 128Mi 32 | ports: 33 | - protocol: HTTP 34 | port: 80 35 | probe: {} 36 | services: 37 | - ports: 38 | - protocol: HTTP 39 | targetPort: 3000 40 | port: 80 41 | nodePort: 0 42 | name: redmine 43 | type: ClusterIP 44 | volumes: [] 45 | pod: 46 | restart: Always 47 | dns: ClusterFirst 48 | termination: 30 49 | host: 50 | network: false 51 | pid: false 52 | ipc: false 53 | type: Deployment 54 | controller: 55 | replica: 1 56 | strategy: 57 | unavailable: 0 58 | surge: 1 59 | -------------------------------------------------------------------------------- /stable/release/influxdb/1.4.2/values.yaml: -------------------------------------------------------------------------------- 1 | _config: 2 | _metadata: 3 | name: influxdb 4 | version: 1.4.2 5 | description: | 6 | InfluxData provides a Modern Time Series Platform, designed from the ground up to handle metrics and events. 7 | controllers: 8 | - containers: 9 | - env: [] 10 | mounts: 11 | - path: "/var/lib/influxdb" 12 | name: data 13 | command: [] 14 | args: [] 15 | imagePullPolicy: Always 16 | image: cargo.caicloudprivatetest.com/library/influxdb:1.4.2-alpine 17 | resources: 18 | limits: 19 | cpu: '1' 20 | memory: 1Gi 21 | requests: 22 | cpu: '0.25' 23 | memory: 512Mi 24 | ports: 25 | - protocol: HTTP 26 | port: 8086 27 | - protocol: TCP 28 | port: 8088 29 | probe: {} 30 | services: 31 | - ports: 32 | - protocol: HTTP 33 | targetPort: 8086 34 | port: 8086 35 | nodePort: 0 36 | - protocol: TCP 37 | targetPort: 8088 38 | port: 8088 39 | nodePort: 0 40 | name: influxdb 41 | type: ClusterIP 42 | volumes: 43 | - storage: 44 | limit: 10Gi 45 | request: 10Gi 46 | source: {} 47 | type: Static 48 | name: data 49 | pod: 50 | restart: Always 51 | dns: ClusterFirst 52 | termination: 30 53 | host: 54 | network: false 55 | pid: false 56 | ipc: false 57 | type: Deployment 58 | controller: 59 | replica: 1 60 | strategy: 61 | unavailable: 0 62 | surge: 1 63 | -------------------------------------------------------------------------------- /stable/release/wordpress/4.9.1/values.yaml: -------------------------------------------------------------------------------- 1 | _config: 2 | _metadata: 3 | name: wordpress 4 | version: 4.9.1 5 | description: | 6 | WordPress is a free and open source blogging tool and a content management system (CMS) based on PHP and MySQL, which runs on a web hosting service. 7 | controllers: 8 | - containers: 9 | - env: 10 | - name: WORDPRESS_DB_HOST 11 | value: mysql 12 | - name: WORDPRESS_DB_USER 13 | value: root 14 | - name: WORDPRESS_DB_PASSWORD 15 | value: root 16 | - name: WORDPRESS_DB_NAME 17 | value: wordpress 18 | - name: WORDPRESS_TABLE_PREFIX 19 | value: wp 20 | mounts: [] 21 | command: [] 22 | args: [] 23 | imagePullPolicy: Always 24 | image: cargo.caicloudprivatetest.com/library/wordpress:4.9.1 25 | resources: 26 | limits: 27 | cpu: '0.5' 28 | memory: 512Mi 29 | requests: 30 | cpu: '0.25' 31 | memory: 512Mi 32 | ports: 33 | - protocol: HTTP 34 | port: 80 35 | probe: {} 36 | services: 37 | - ports: 38 | - protocol: HTTP 39 | targetPort: 80 40 | port: 80 41 | nodePort: 0 42 | name: wordpress 43 | type: ClusterIP 44 | volumes: [] 45 | pod: 46 | restart: Always 47 | dns: ClusterFirst 48 | termination: 30 49 | host: 50 | network: false 51 | pid: false 52 | ipc: false 53 | type: Deployment 54 | controller: 55 | replica: 1 56 | strategy: 57 | unavailable: 0 58 | surge: 1 59 | -------------------------------------------------------------------------------- /stable/release/mysql/5.7.20/values.yaml: -------------------------------------------------------------------------------- 1 | _config: 2 | _metadata: 3 | name: mysql 4 | version: 5.7.20 5 | description: | 6 | Fast, reliable, scalable, and easy to use open-source relational database. 7 | controllers: 8 | - containers: 9 | - env: 10 | - name: MYSQL_ROOT_PASSWORD 11 | value: root 12 | - name: MYSQL_DATABASE 13 | value: db 14 | - name: MYSQL_USER 15 | value: user 16 | - name: MYSQL_PASSWORD 17 | value: password 18 | mounts: 19 | - path: "/var/lib/mysql" 20 | name: data 21 | command: [] 22 | args: [] 23 | imagePullPolicy: Always 24 | image: cargo.caicloudprivatetest.com/library/mysql:5.7.20 25 | resources: 26 | limits: 27 | cpu: '1' 28 | memory: 1Gi 29 | requests: 30 | cpu: '0.25' 31 | memory: 512Mi 32 | ports: 33 | - protocol: HTTP 34 | port: 3306 35 | probe: {} 36 | services: 37 | - ports: 38 | - protocol: HTTP 39 | targetPort: 3306 40 | port: 3306 41 | nodePort: 0 42 | name: mysql 43 | type: ClusterIP 44 | volumes: 45 | - storage: 46 | limit: 10Gi 47 | request: 10Gi 48 | source: {} 49 | type: Static 50 | name: data 51 | pod: 52 | restart: Always 53 | dns: ClusterFirst 54 | termination: 30 55 | host: 56 | network: false 57 | pid: false 58 | ipc: false 59 | type: Deployment 60 | controller: 61 | replica: 1 62 | strategy: 63 | type: "RollingUpdate" 64 | -------------------------------------------------------------------------------- /stable/release/hystrix-dashboard/1.2.3/values.yaml: -------------------------------------------------------------------------------- 1 | _config: 2 | _metadata: 3 | name: hystrix-dashboard 4 | version: 1.2.3 5 | description: | 6 | The Hystrix Dashboard allows you to monitor Hystrix metrics in real time. 7 | controllers: 8 | - type: Deployment 9 | controller: 10 | replica: '1' 11 | ready: 0 12 | strategy: 13 | type: RollingUpdate 14 | unavailable: 0 15 | surge: 1 16 | pod: 17 | restart: Always 18 | dns: ClusterFirst 19 | termination: 30 20 | isPrivilege: false 21 | hostAliases: [] 22 | host: 23 | network: false 24 | pid: false 25 | ipc: false 26 | annotations: [] 27 | containers: 28 | - env: 29 | - name: HYSTRIX_DASHBOARD_PORT 30 | value: 30008 31 | envFrom: [] 32 | command: [] 33 | lifecycle: {} 34 | image: cargo.caicloudprivatetest.com/release/hystrix-dashboard:1.2.3 35 | imagePullPolicy: Always 36 | probe: {} 37 | resources: 38 | limits: 39 | cpu: '2' 40 | memory: 4Gi 41 | requests: 42 | cpu: '1' 43 | memory: 1Gi 44 | securityContext: 45 | privileged: false 46 | services: 47 | # - type: ClusterIP 48 | # name: hystrix-dashboard-server 49 | # ports: 50 | # - protocol: HTTP 51 | # targetPort: 30008 52 | # port: 30008 53 | # nodePort: 0 54 | - type: NodePort 55 | name: hystrix-dashboard-server 56 | ports: 57 | - protocol: HTTP 58 | targetPort: 30008 59 | port: 30008 60 | nodePort: 0 61 | -------------------------------------------------------------------------------- /templates/1.0.0/templates/jobs.yaml: -------------------------------------------------------------------------------- 1 | {{/* Generates all Jobs */}} 2 | 3 | {{- $g := . -}} 4 | 5 | 6 | 7 | 8 | {{- $metadata := $g.Values._config._metadata -}} 9 | {{- range $index, $controller := .Values._config.controllers -}} 10 | {{- if eq $controller.type "Job" -}} 11 | {{- $controllerName := include "onlyname" (list $g $index) | default (include "fullname" (list $g $index)) -}} 12 | 13 | 14 | 15 | --- 16 | apiVersion: batch/v1 17 | kind: Job 18 | metadata: 19 | name: {{ $controllerName | quote }} 20 | labels: 21 | {{- include "appLabels" (list $g.Release.Name $metadata.appVersion) | indent 4 }} 22 | {{- include "releaselabels" (list $g.Release.Name $g.Chart.Name) | indent 4 }} 23 | annotations: 24 | {{- include "annotations" $controller.controller | indent 4 }} 25 | {{- with $controller }} 26 | spec: 27 | {{- with .controller }} 28 | parallelism: {{ .parallelism }} 29 | completions: {{ .completions }} 30 | backoffLimit: {{ .backoffLimit }} 31 | activeDeadlineSeconds: {{ .active }} 32 | {{- end }} 33 | template: 34 | metadata: 35 | labels: 36 | {{- include "appLabels" (list $g.Release.Name $metadata.appVersion) | indent 8 }} 37 | {{- include "releaselabels" (list $g.Release.Name $g.Chart.Name) | indent 8 }} 38 | {{- include "controllerlabels" $controllerName | indent 8 }} 39 | {{- include "schelabels" $controller.schedule | indent 8 }} 40 | annotations: 41 | {{- include "annotations" $controller.pod | indent 8 }} 42 | spec: 43 | {{- include "podspec" (list $controller $controllerName) | indent 6 }} 44 | {{- end }} 45 | --- 46 | 47 | 48 | 49 | {{- end -}} 50 | {{- end -}} 51 | 52 | -------------------------------------------------------------------------------- /stable/release/galera/5.7.20/description.yaml: -------------------------------------------------------------------------------- 1 | name: galera 2 | briefDesc: Galera 是一个基于 Mysql 的多主集群 3 | desc: Galera 集群是一个基于 Mysql/InnoDB 的多主数据库集群。在一个 Galera 集群中,每个数据库节点都是可以直接读写的。部分节点发生故障不会导致集群不可用,剩余节点仍然能够正常提供数据库服务。 4 | introduce: 5 | brief: | 6 | 基于 Galera 开源版本([Repo](https://github.com/codership/galera) [Dockerfile](https://github.com/caicloud/charts/tree/master/images/galera/5.7.20/Dockerfile)) 7 | howToUse: | 8 | 直接从模板部署出一个完整的 Galera 集群,不需要任何外部依赖。 9 | **环境变量** 10 | - GALERA_CLUSTER_DOMAIN:实例域名。 11 | - GALERA_CHECK_DELAY:启动时存活检查等待时间。 12 | - GALERA_CLUSTER_NAME:集群名称。 13 | - GALERA_USER:数据同步时使用的 Mysql 用户名。 14 | - GALERA_PASSWORD:数据同步时使用的 Mysql 密码。 15 | - MYSQL_ROOT_PASSWORD:Mysql root 用户密码。 16 | - MYSQL_DATABASE:数据库初始化时默认创建的数据库。 17 | - MYSQL_USER:数据库初始化时默认创建的用户。 18 | - MYSQL_PASSWORD:数据库初始化时默认创建的用户密码。 19 | 其中 MYSQL_DATABASE,MYSQL_USER,MYSQL_PASSWORD 三项可不填写。不填则默认不创建数据库和新用户。 20 | **如何挂载数据** 21 | Galera 的所有数据都挂载在 `/var/lib/mysql`, 默认使用应用专用的数据卷。 22 | **配置** 23 | Galera 的配置在 `/etc/mysql/conf.d` 目录中,如果需要自定义 Mysql 的配置,请将配置挂载到该目录中。 24 | **关于扩容** 25 | Galera 支持扩容。可以增加或者减少副本数量。但是请确保你了解副本数量变化的意义。 26 | **关于服务名和实例域名** 27 | 服务名和实例域名都是用于 DNS 解析的域名,因此两者名称不能冲突。用户应该使用服务名访问数据库。 28 | version: | 29 | 基于社区 Galera 3 / Mysql 5.7.20 稳定版本。 30 | resources: | 31 | 每节点配置: 32 | 最低资源要求:CPU:0.5 Core,内存:512 MiB 33 | 推荐资源配置:CPU:1 Core,内存:1 GiB 34 | Galera 默认启动三个 Mysql 节点,因此会占用 3 倍的资源。 35 | service: | 36 | 默认使用集群内部 IP 暴露服务的 3306 端口。 37 | 默认服务名为 galera,如果服务名冲突,请修改为其他名称。可通过服务名访问数据库。 38 | 如果要提供对外服务, 可以使用节点端口或者对接负载均衡来暴露服务。 39 | 由于 Galera 是有状态的应用,因此设置了实例域名为 galera-cluster 用于副本之间的数据同步。请不要使用实例域名访问数据库。 40 | -------------------------------------------------------------------------------- /stable/release/redis/4.0.6/values.yaml: -------------------------------------------------------------------------------- 1 | _config: 2 | _metadata: 3 | name: redis 4 | version: 4.0.6 5 | description: | 6 | Redis is an open source (BSD licensed), in-memory data structure store, 7 | used as a database, cache and message broker. 8 | It supports data structures such as strings, hashes, lists, sets, 9 | sorted sets with range queries, bitmaps, hyperloglogs and geospatial indexes with radius queries. 10 | Redis has built-in replication, Lua scripting, LRU eviction, transactions and 11 | different levels of on-disk persistence, and provides high availability via Redis Sentinel and 12 | automatic partitioning with Redis Cluster. 13 | controllers: 14 | - containers: 15 | - image: cargo.caicloudprivatetest.com/library/redis:4.0.6-alpine 16 | imagePullPolicy: Always 17 | mounts: 18 | - name: data 19 | path: "/data" 20 | resources: 21 | requests: 22 | cpu: 1 23 | memory: 2Gi 24 | limits: 25 | cpu: 4 26 | memory: 4Gi 27 | controller: 28 | replica: 1 29 | strategy: 30 | surge: 1 31 | unavailable: 0 32 | pod: 33 | dns: ClusterFirst 34 | host: 35 | ipc: false 36 | network: false 37 | pid: false 38 | restart: Always 39 | termination: 30 40 | services: 41 | - name: redis 42 | type: ClusterIP 43 | ports: 44 | - protocol: TCP 45 | targetPort: 6379 46 | port: 6379 47 | type: Deployment 48 | volumes: 49 | - name: data 50 | source: {} 51 | storage: 52 | limit: 10Gi 53 | request: 10Gi 54 | type: Static 55 | -------------------------------------------------------------------------------- /stable/release/jenkins/2.101.0/values.yaml: -------------------------------------------------------------------------------- 1 | _config: 2 | _metadata: 3 | name: jenkins 4 | version: 2.101.0 5 | description: | 6 | Continuous Integration and Continuous Delivery. As an extensible automation server, 7 | Jenkins can be used as a simple CI server or turned into the continuous delivery hub for any project. 8 | controllers: 9 | - containers: 10 | - env: [] 11 | mounts: 12 | - name: home 13 | path: "/var/jenkins_home" 14 | command: [] 15 | args: [] 16 | imagePullPolicy: Always 17 | image: cargo.caicloudprivatetest.com/library/jenkins:2.101-alpine-enhanced 18 | resources: 19 | limits: 20 | cpu: '4' 21 | memory: 4Gi 22 | requests: 23 | cpu: '1' 24 | memory: 2Gi 25 | ports: 26 | - protocol: HTTP 27 | port: 8080 28 | - protocol: HTTP 29 | port: 50000 30 | probe: {} 31 | services: 32 | - ports: 33 | - protocol: HTTP 34 | targetPort: 8080 35 | port: 8080 36 | nodePort: 0 37 | - protocol: HTTP 38 | targetPort: 50000 39 | port: 50000 40 | nodePort: 0 41 | name: jenkins 42 | type: NodePort 43 | volumes: 44 | - storage: 45 | limit: 10Gi 46 | request: 10Gi 47 | source: {} 48 | type: Static 49 | name: home 50 | pod: 51 | restart: Always 52 | dns: ClusterFirst 53 | termination: 30 54 | host: 55 | network: false 56 | pid: false 57 | ipc: false 58 | type: Deployment 59 | controller: 60 | replica: 1 61 | strategy: 62 | unavailable: 0 63 | surge: 1 64 | -------------------------------------------------------------------------------- /stable/release/mariadb/10.2.12/values.yaml: -------------------------------------------------------------------------------- 1 | _config: 2 | _metadata: 3 | name: mariadb 4 | version: 10.2.12 5 | description: | 6 | MariaDB is a community-developed fork of the MySQL relational database management system intended to remain free under the GNU GPL. 7 | controllers: 8 | - containers: 9 | - env: 10 | - name: MYSQL_ROOT_PASSWORD 11 | value: root 12 | - name: MYSQL_DATABASE 13 | value: db 14 | - name: MYSQL_USER 15 | value: user 16 | - name: MYSQL_PASSWORD 17 | value: password 18 | mounts: 19 | - path: "/var/lib/mysql" 20 | name: data 21 | command: [] 22 | args: [] 23 | imagePullPolicy: Always 24 | image: cargo.caicloudprivatetest.com/library/mariadb:10.2.12 25 | resources: 26 | limits: 27 | cpu: '1' 28 | memory: 1Gi 29 | requests: 30 | cpu: '0.25' 31 | memory: 512Mi 32 | ports: 33 | - protocol: HTTP 34 | port: 3306 35 | probe: {} 36 | services: 37 | - ports: 38 | - protocol: HTTP 39 | targetPort: 3306 40 | port: 3306 41 | nodePort: 0 42 | name: mariadb 43 | type: ClusterIP 44 | volumes: 45 | - storage: 46 | limit: 10Gi 47 | request: 10Gi 48 | source: {} 49 | type: Static 50 | name: data 51 | pod: 52 | restart: Always 53 | dns: ClusterFirst 54 | termination: 30 55 | host: 56 | network: false 57 | pid: false 58 | ipc: false 59 | type: Deployment 60 | controller: 61 | replica: 1 62 | strategy: 63 | unavailable: 0 64 | surge: 1 65 | -------------------------------------------------------------------------------- /stable/release/eureka/2.0.0/values.yaml: -------------------------------------------------------------------------------- 1 | _config: 2 | _metadata: 3 | name: eureka 4 | version: 2.0.0 5 | description: | 6 | Eureka is a REST (Representational State Transfer) based service that is primarily used in the AWS cloud for locating services for the purpose of load balancing and failover of middle-tier servers. 7 | controllers: 8 | - type: Deployment 9 | controller: 10 | replica: '1' 11 | ready: 0 12 | strategy: 13 | type: RollingUpdate 14 | unavailable: 0 15 | surge: 1 16 | pod: 17 | restart: Always 18 | dns: ClusterFirst 19 | termination: 30 20 | hostAliases: [] 21 | host: 22 | network: false 23 | pid: false 24 | ipc: false 25 | annotations: [] 26 | containers: 27 | - env: 28 | - name: EUREKA_PORT 29 | value: 8761 30 | - name: EUREKA_HOST_NAME 31 | value: localhost 32 | envFrom: [] 33 | mounts: [] 34 | command: [] 35 | lifecycle: {} 36 | image: cargo.caicloudprivatetest.com/release/eureka:2.0.0 37 | imagePullPolicy: Always 38 | probe: {} 39 | resources: 40 | limits: 41 | cpu: '2' 42 | memory: 4Gi 43 | requests: 44 | cpu: '1' 45 | memory: 1Gi 46 | volumes: [] 47 | services: 48 | - type: NodePort 49 | name: eureka-server 50 | ports: 51 | - protocol: HTTP 52 | targetPort: 8761 53 | port: 8761 54 | nodePort: 0 55 | # - type: ClusterIP 56 | # name: eureka-server 57 | # ports: 58 | # - protocol: HTTP 59 | # targetPort: 8761 60 | # port: 8761 61 | # nodePort: 0 62 | -------------------------------------------------------------------------------- /stable/release/eureka/1.9.2/values.yaml: -------------------------------------------------------------------------------- 1 | _config: 2 | _metadata: 3 | name: eureka 4 | version: 1.9.2 5 | description: | 6 | Eureka is a REST (Representational State Transfer) based service that is primarily used in the AWS cloud for locating services for the purpose of load balancing and failover of middle-tier servers. 7 | controllers: 8 | - type: Deployment 9 | controller: 10 | replica: '1' 11 | ready: 0 12 | strategy: 13 | type: RollingUpdate 14 | unavailable: 0 15 | surge: 1 16 | pod: 17 | restart: Always 18 | dns: ClusterFirst 19 | termination: 30 20 | hostAliases: [] 21 | host: 22 | network: false 23 | pid: false 24 | ipc: false 25 | annotations: [] 26 | containers: 27 | - env: [] 28 | envFrom: [] 29 | mounts: 30 | - name: data 31 | path: "/app" 32 | command: [] 33 | lifecycle: {} 34 | image: cargo.caicloudprivatetest.com/release/eureka:1.9.2 35 | imagePullPolicy: Always 36 | probe: {} 37 | resources: 38 | limits: 39 | cpu: '2' 40 | memory: 4Gi 41 | requests: 42 | cpu: '1' 43 | memory: 1Gi 44 | volumes: 45 | - storage: 46 | limit: 1Gi 47 | request: 1Gi 48 | type: Scratch 49 | name: data 50 | services: 51 | # - type: NodePort 52 | # name: eureka-server 53 | # ports: 54 | # - protocol: HTTP 55 | # targetPort: 8761 56 | # port: 8761 57 | # nodePort: 0 58 | - type: ClusterIP 59 | name: eureka 60 | ports: 61 | - protocol: HTTP 62 | targetPort: 8761 63 | port: 8761 64 | nodePort: 0 65 | -------------------------------------------------------------------------------- /stable/release/turbine/2.0.0/values.yaml: -------------------------------------------------------------------------------- 1 | _config: 2 | _metadata: 3 | name: turbine 4 | version: 2.0.0 5 | description: | 6 | Turbine is a tool for aggregating streams of Server-Sent Event (SSE) JSON data into a single stream. The targeted use case is metrics streams from instances in an SOA being aggregated for dashboards. 7 | controllers: 8 | - type: Deployment 9 | controller: 10 | replica: '1' 11 | ready: 0 12 | strategy: 13 | type: RollingUpdate 14 | unavailable: 0 15 | surge: 1 16 | pod: 17 | restart: Always 18 | dns: ClusterFirst 19 | termination: 30 20 | hostAliases: [] 21 | host: 22 | network: false 23 | pid: false 24 | ipc: false 25 | annotations: [] 26 | containers: 27 | - env: 28 | - name: TURBINE_PORT 29 | value: 8989 30 | - name: TURBINE_NAME 31 | value: turbine 32 | - name: EUREKA_URL 33 | value: http://eureka-server:8761/eureka 34 | envFrom: [] 35 | mounts: [] 36 | command: [] 37 | lifecycle: {} 38 | image: cargo.caicloudprivatetest.com/release/turbine:2.0.0 39 | imagePullPolicy: Always 40 | probe: {} 41 | resources: 42 | limits: 43 | cpu: '2' 44 | memory: 4Gi 45 | requests: 46 | cpu: '1' 47 | memory: 1Gi 48 | volumes: [] 49 | services: 50 | - type: NodePort 51 | name: turbine-server 52 | ports: 53 | - protocol: HTTP 54 | targetPort: 8989 55 | port: 8989 56 | nodePort: 0 57 | # - type: ClusterIP 58 | # name: turbine-server 59 | # ports: 60 | # - protocol: HTTP 61 | # targetPort: 8989 62 | # port: 8989 63 | # nodePort: 0 64 | -------------------------------------------------------------------------------- /stable/release/zipkin/2.9.3/values.yaml: -------------------------------------------------------------------------------- 1 | _config: 2 | _metadata: 3 | name: zipkin 4 | version: 2.9.3 5 | description: | 6 | Zipkin is a distributed tracing system. It helps gather timing data needed to troubleshoot latency problems in microservice architectures. It manages both the collection and lookup of this data. Zipkin’s design is based on the Google Dapper paper. 7 | controllers: 8 | - type: Deployment 9 | controller: 10 | replica: 1 11 | ready: 0 12 | strategy: 13 | type: RollingUpdate 14 | unavailable: 0 15 | surge: 1 16 | pod: 17 | restart: Always 18 | dns: ClusterFirst 19 | termination: 30 20 | isPrivilege: false 21 | hostAliases: [] 22 | host: 23 | network: false 24 | pid: false 25 | ipc: false 26 | annotations: [] 27 | containers: 28 | - env: [] 29 | envFrom: [] 30 | mounts: 31 | - name: data 32 | path: "/app" 33 | command: [] 34 | lifecycle: {} 35 | image: cargo.caicloudprivatetest.com/library/zipkin:2.9.3 36 | imagePullPolicy: Always 37 | probe: {} 38 | resources: 39 | limits: 40 | cpu: '2' 41 | memory: 4Gi 42 | requests: 43 | cpu: '1' 44 | memory: 1Gi 45 | securityContext: 46 | privileged: false 47 | volumes: 48 | - name: data 49 | type: Scratch 50 | services: 51 | - type: ClusterIP 52 | name: zipkin 53 | ports: 54 | - protocol: HTTP 55 | targetPort: 9411 56 | port: 9411 57 | nodePort: 0 58 | # - type: NodePort 59 | # name: zipkin-server 60 | # ports: 61 | # - protocol: HTTP 62 | # targetPort: 9411 63 | # port: 9411 64 | # nodePort: 0 65 | -------------------------------------------------------------------------------- /templates/1.0.0/templates/services.yaml: -------------------------------------------------------------------------------- 1 | {{/* Generates all services */}} 2 | 3 | {{- $g := . -}} 4 | 5 | {{ template "required" list .Values ".Values" "_config.controllers" "list"}} 6 | 7 | {{- $metadata := $g.Values._config._metadata -}} 8 | {{- range $index, $controller := .Values._config.controllers -}} 9 | {{- template "required" list $controller ".Values._config.controllers" "type" "string" -}} 10 | {{- $controllerName := include "onlyname" (list $g $index) | default (include "fullname" (list $g $index)) -}} 11 | 12 | {{- if .services -}} 13 | {{- range .services }} 14 | --- 15 | apiVersion: v1 16 | kind: Service 17 | metadata: 18 | name: {{ .name | quote }} 19 | labels: 20 | {{- include "appLabels" (list $g.Release.Name $metadata.appVersion) | indent 4 }} 21 | {{- include "releaselabels" (list $g.Release.Name $g.Chart.Name) | indent 4 }} 22 | annotations: 23 | {{- include "annotations" . | indent 4 }} 24 | spec: 25 | type: {{ .type | quote }} 26 | sessionAffinity: {{ .sessionAffinity | default "None" | quote }} 27 | sessionAffinityConfig: 28 | clientIP: 29 | timeoutSeconds: {{ .affinityTimeout | default 10800 }} 30 | selector: 31 | {{/* we do not add appLabels in selector to let service select all versions */}} 32 | {{- include "controllerlabels" $controllerName | indent 4 }} 33 | {{- range $k, $v := .selector }} 34 | {{ $k | quote }}: {{ $v | quote }} 35 | {{- end }} 36 | ports: 37 | {{- $s := . -}} 38 | {{- range .ports }} 39 | - name: {{ (printf "%s-%.0f" .protocol .port) | lower | quote }} 40 | {{- if eq .protocol "UDP" }} 41 | protocol: "UDP" 42 | {{- else }} 43 | protocol: "TCP" 44 | {{- end }} 45 | port: {{ .port }} 46 | targetPort: {{ .targetPort }} 47 | {{ if eq $s.type "NodePort" -}} nodePort: {{ .nodePort }} {{- end -}} 48 | {{- end }} 49 | --- 50 | 51 | {{ end -}} 52 | {{- end -}} 53 | {{- end -}} 54 | -------------------------------------------------------------------------------- /stable/release/zuul/2.0.0/values.yaml: -------------------------------------------------------------------------------- 1 | _config: 2 | _metadata: 3 | name: zuul 4 | version: 2.0.0 5 | description: | 6 | Zuul is the front door for all requests from devices and web sites to the backend of the Netflix streaming application. As an edge service application, Zuul is built to enable dynamic routing, monitoring, resiliency and security. It also has the ability to route requests to multiple Amazon Auto Scaling Groups as appropriate. 7 | controllers: 8 | - type: Deployment 9 | controller: 10 | replica: '1' 11 | ready: 0 12 | strategy: 13 | type: RollingUpdate 14 | unavailable: 0 15 | surge: 1 16 | pod: 17 | restart: Always 18 | dns: ClusterFirst 19 | termination: 30 20 | hostAliases: [] 21 | host: 22 | network: false 23 | pid: false 24 | ipc: false 25 | annotations: [] 26 | containers: 27 | - env: 28 | - name: ZUUL_NAME 29 | value: zuul-gateway 30 | - name: ZUUL_PORT 31 | value: 8080 32 | - name: EUREKA_URL 33 | value: http://eureka-server:8761/eureka 34 | envFrom: [] 35 | mounts: [] 36 | command: [] 37 | lifecycle: {} 38 | image: cargo.caicloudprivatetest.com/release/zuul:2.0.0 39 | imagePullPolicy: Always 40 | probe: {} 41 | resources: 42 | limits: 43 | cpu: '2' 44 | memory: 4Gi 45 | requests: 46 | cpu: '1' 47 | memory: 1Gi 48 | volumes: [] 49 | services: 50 | # - type: ClusterIP 51 | # name: zuul-server 52 | # ports: 53 | # - protocol: HTTP 54 | # targetPort: 8080 55 | # port: 8080 56 | # nodePort: 0 57 | - type: NodePort 58 | name: zuul-server 59 | ports: 60 | - protocol: HTTP 61 | targetPort: 8080 62 | port: 8080 63 | nodePort: 0 -------------------------------------------------------------------------------- /stable/release/rabbitmq/3.7.2/values.yaml: -------------------------------------------------------------------------------- 1 | _config: 2 | _metadata: 3 | name: rabbitmq 4 | version: 3.7.2 5 | description: | 6 | RabbitMQ is the most widely deployed open source message broker. 7 | controllers: 8 | - containers: 9 | - env: [] 10 | command: [] 11 | args: [] 12 | imagePullPolicy: Always 13 | image: cargo.caicloudprivatetest.com/library/rabbitmq:3.7.2-alpine 14 | resources: 15 | limits: 16 | cpu: '2' 17 | memory: 2Gi 18 | requests: 19 | cpu: '0.25' 20 | memory: 512Mi 21 | mounts: 22 | - path: "/var/lib/rabbitmq" 23 | name: data 24 | ports: 25 | - protocol: TCP 26 | port: 4369 27 | - protocol: TCP 28 | port: 5671 29 | - protocol: TCP 30 | port: 5672 31 | - protocol: TCP 32 | port: 25672 33 | probe: {} 34 | services: 35 | - ports: 36 | - protocol: HTTP 37 | targetPort: 4369 38 | port: 4369 39 | nodePort: 0 40 | - protocol: HTTP 41 | targetPort: 5671 42 | port: 5671 43 | nodePort: 0 44 | - protocol: HTTP 45 | targetPort: 5672 46 | port: 5672 47 | nodePort: 0 48 | - protocol: HTTP 49 | targetPort: 25672 50 | port: 25672 51 | nodePort: 0 52 | name: rabbitmq 53 | type: ClusterIP 54 | volumes: 55 | - storage: 56 | limit: 10Gi 57 | request: 10Gi 58 | source: {} 59 | type: Dedicated 60 | name: data 61 | pod: 62 | restart: Always 63 | dns: ClusterFirst 64 | termination: 30 65 | host: 66 | network: false 67 | pid: false 68 | ipc: false 69 | type: StatefulSet 70 | controller: 71 | replica: 1 72 | domain: rabbitmq-cluster 73 | strategy: 74 | type: "RollingUpdate" 75 | -------------------------------------------------------------------------------- /stable/release/config-server/2.0.0/values.yaml: -------------------------------------------------------------------------------- 1 | _config: 2 | _metadata: 3 | name: config-server 4 | version: 2.0.0 5 | description: | 6 | Spring Cloud Config Server provides an HTTP resource-based API for external configuration (name-value pairs or equivalent YAML content). The server is embeddable in a Spring Boot application, by using the @EnableConfigServer annotation. 7 | controllers: 8 | - type: Deployment 9 | controller: 10 | replica: '1' 11 | ready: 0 12 | strategy: 13 | type: RollingUpdate 14 | unavailable: 0 15 | surge: 1 16 | pod: 17 | restart: Always 18 | dns: ClusterFirst 19 | termination: 30 20 | hostAliases: [] 21 | host: 22 | network: false 23 | pid: false 24 | ipc: false 25 | annotations: [] 26 | containers: 27 | - env: 28 | - name: CONFIG_SERVER_PORT 29 | value: 8888 30 | - name: ENABLE_EUREKA 31 | value: true 32 | - name: EUREKA_URL 33 | value: http://eureka-server:8761/eureka 34 | - name: CONFIG_SERVER_NAME 35 | value: config-server 36 | envFrom: [] 37 | mounts: [] 38 | command: [] 39 | lifecycle: {} 40 | image: cargo.caicloudprivatetest.com/release/config-server:2.0.0 41 | imagePullPolicy: Always 42 | probe: {} 43 | resources: 44 | limits: 45 | cpu: '2' 46 | memory: 4Gi 47 | requests: 48 | cpu: '1' 49 | memory: 1Gi 50 | volumes: [] 51 | services: 52 | - type: NodePort 53 | name: caicloud-config-server 54 | ports: 55 | - protocol: HTTP 56 | targetPort: 8888 57 | port: 8888 58 | nodePort: 0 59 | # - type: ClusterIP 60 | # name: caicloud-config-server 61 | # ports: 62 | # - protocol: HTTP 63 | # targetPort: 8888 64 | # port: 8888 65 | # nodePort: 0 66 | -------------------------------------------------------------------------------- /stable/release/zipkin/2.11.8/values.yaml: -------------------------------------------------------------------------------- 1 | _config: 2 | _metadata: 3 | name: zipkin 4 | version: 2.11.8 5 | description: | 6 | Zipkin is a distributed tracing system. It helps gather timing data needed to troubleshoot latency problems in microservice architectures. It manages both the collection and lookup of this data. Zipkin’s design is based on the Google Dapper paper. 7 | controllers: 8 | - type: Deployment 9 | controller: 10 | replica: 1 11 | ready: 0 12 | strategy: 13 | type: RollingUpdate 14 | unavailable: 0 15 | surge: 1 16 | pod: 17 | restart: Always 18 | dns: ClusterFirst 19 | termination: 30 20 | isPrivilege: false 21 | hostAliases: [] 22 | host: 23 | network: false 24 | pid: false 25 | ipc: false 26 | annotations: [] 27 | containers: 28 | - env: 29 | - name: ZIPKIN_NAME 30 | value: zipkin-server 31 | - name: ZIPKIN_PORT 32 | value: 9411 33 | - name: ENABLE_EUREKA 34 | value: true 35 | - name: EUREKA_URL 36 | value: http://eureka-server:8761/eureka 37 | envFrom: [] 38 | command: [] 39 | lifecycle: {} 40 | image: cargo.caicloudprivatetest.com/release/zipkin:2.11.8 41 | imagePullPolicy: Always 42 | probe: {} 43 | resources: 44 | limits: 45 | cpu: '2' 46 | memory: 4Gi 47 | requests: 48 | cpu: '1' 49 | memory: 1Gi 50 | securityContext: 51 | privileged: false 52 | services: 53 | # - type: ClusterIP 54 | # name: zipkin-server 55 | # ports: 56 | # - protocol: HTTP 57 | # targetPort: 9411 58 | # port: 9411 59 | # nodePort: 0 60 | - type: NodePort 61 | name: zipkin-server 62 | ports: 63 | - protocol: HTTP 64 | targetPort: 9411 65 | port: 9411 66 | nodePort: 0 67 | -------------------------------------------------------------------------------- /stable/release/galera/5.7.20/values.yaml: -------------------------------------------------------------------------------- 1 | _config: 2 | _metadata: 3 | name: galera 4 | version: 5.7.20 5 | description: | 6 | Galera Cluster for MySQL is a synchronous replication solution that can improve availability and performance of MySQL service. 7 | controllers: 8 | - containers: 9 | - env: 10 | - name: GALERA_CLUSTER_DOMAIN 11 | value: galera-cluster 12 | - name: GALERA_START_DELAY 13 | value: '5' 14 | - name: GALERA_CLUSTER_NAME 15 | value: galera_cluster 16 | - name: GALERA_USER 17 | value: sst 18 | - name: GALERA_PASSWORD 19 | value: sstpassword 20 | - name: MYSQL_ROOT_PASSWORD 21 | value: root 22 | - name: MYSQL_DATABASE 23 | value: db 24 | - name: MYSQL_USER 25 | value: user 26 | - name: MYSQL_PASSWORD 27 | value: password 28 | mounts: 29 | - path: "/var/lib/mysql" 30 | name: data 31 | command: [] 32 | args: [] 33 | image: cargo.caicloudprivatetest.com/library/galera:5.7.20 34 | imagePullPolicy: Always 35 | ports: 36 | - port: 3306 37 | protocol: TCP 38 | probe: {} 39 | resources: 40 | limits: 41 | cpu: 1 42 | memory: 1Gi 43 | requests: 44 | cpu: 0.5 45 | memory: 512Mi 46 | services: 47 | - ports: 48 | - protocol: TCP 49 | targetPort: 3306 50 | port: 3306 51 | nodePort: 0 52 | name: galera 53 | type: ClusterIP 54 | volumes: 55 | - storage: 56 | limit: 10Gi 57 | request: 10Gi 58 | source: {} 59 | type: Dedicated 60 | name: data 61 | pod: 62 | dns: ClusterFirst 63 | host: 64 | ipc: false 65 | network: false 66 | pid: false 67 | restart: Always 68 | termination: 30 69 | controller: 70 | domain: galera-cluster 71 | name: '' 72 | replica: 3 73 | strategy: 74 | type: RollingUpdate 75 | type: StatefulSet 76 | -------------------------------------------------------------------------------- /templates/1.0.0/templates/daemonsets.yaml: -------------------------------------------------------------------------------- 1 | {{/* Generates all DaemonSets */}} 2 | 3 | {{- $g := . -}} 4 | 5 | 6 | 7 | 8 | {{- $metadata := $g.Values._config._metadata -}} 9 | {{- range $index, $controller := .Values._config.controllers -}} 10 | {{- if eq $controller.type "DaemonSet" -}} 11 | {{- $controllerName := include "onlyname" (list $g $index) | default (include "fullname" (list $g $index)) -}} 12 | 13 | 14 | 15 | --- 16 | apiVersion: apps/v1 17 | kind: DaemonSet 18 | metadata: 19 | name: {{ $controllerName | quote }} 20 | labels: 21 | {{- include "appLabels" (list $g.Release.Name $metadata.appVersion) | indent 4 }} 22 | {{- include "releaselabels" (list $g.Release.Name $g.Chart.Name) | indent 4 }} 23 | annotations: 24 | {{- include "annotations" $controller.controller | indent 4 }} 25 | {{- with $controller }} 26 | spec: 27 | {{- with .controller }} 28 | updateStrategy: 29 | {{- with .strategy }} 30 | type: {{ .type }} 31 | rollingUpdate: 32 | maxUnavailable: {{ .unavailable }} 33 | {{- end }} 34 | minReadySeconds: {{ .ready }} 35 | {{- end }} 36 | selector: 37 | matchLabels: 38 | {{- include "appLabels" (list $g.Release.Name $metadata.appVersion) | indent 6 }} 39 | {{- include "releaselabels" (list $g.Release.Name $g.Chart.Name) | indent 6 }} 40 | {{- include "controllerlabels" $controllerName | indent 6 }} 41 | {{- include "schelabels" $controller.schedule | indent 6 }} 42 | template: 43 | metadata: 44 | labels: 45 | {{- include "appLabels" (list $g.Release.Name $metadata.appVersion) | indent 8 }} 46 | {{- include "releaselabels" (list $g.Release.Name $g.Chart.Name) | indent 8 }} 47 | {{- include "controllerlabels" $controllerName | indent 8 }} 48 | {{- include "schelabels" $controller.schedule | indent 8 }} 49 | annotations: 50 | {{- include "annotations" $controller.pod | indent 8 }} 51 | spec: 52 | {{- include "podspec" (list $controller $controllerName) | indent 6 }} 53 | {{- end }} 54 | --- 55 | 56 | 57 | 58 | {{- end -}} 59 | {{- end -}} 60 | 61 | -------------------------------------------------------------------------------- /templates/1.0.0/templates/deployments.yaml: -------------------------------------------------------------------------------- 1 | {{/* Generates all Deployments */}} 2 | 3 | {{- $g := . -}} 4 | 5 | 6 | 7 | 8 | {{- $metadata := $g.Values._config._metadata -}} 9 | {{- range $index, $controller := .Values._config.controllers -}} 10 | {{- if eq $controller.type "Deployment" -}} 11 | {{- $controllerName := include "onlyname" (list $g $index) | default (include "fullname" (list $g $index)) -}} 12 | 13 | 14 | 15 | --- 16 | apiVersion: apps/v1 17 | kind: Deployment 18 | metadata: 19 | name: {{ $controllerName | quote }} 20 | labels: 21 | {{- include "appLabels" (list $g.Release.Name $metadata.appVersion) | indent 4 }} 22 | {{- include "releaselabels" (list $g.Release.Name $g.Chart.Name) | indent 4 }} 23 | annotations: 24 | {{- include "annotations" $controller.controller | indent 4 }} 25 | {{- with $controller }} 26 | spec: 27 | {{- with .controller }} 28 | replicas: {{ .replica }} 29 | {{- with .strategy }} 30 | strategy: 31 | {{- $strategyType := .type | default "RollingUpdate" -}} 32 | {{- if eq $strategyType "Recreate" }} 33 | type: Recreate 34 | {{- else }} 35 | type: RollingUpdate 36 | rollingUpdate: 37 | maxUnavailable: {{ .unavailable }} 38 | maxSurge: {{ .surge }} 39 | {{- end }} 40 | {{- end }} 41 | minReadySeconds: {{ .ready }} 42 | {{- end }} 43 | selector: 44 | matchLabels: 45 | {{- include "appLabels" (list $g.Release.Name $metadata.appVersion) | indent 6 }} 46 | {{- include "releaselabels" (list $g.Release.Name $g.Chart.Name) | indent 6 }} 47 | {{- include "controllerlabels" $controllerName | indent 6 }} 48 | {{- include "schelabels" $controller.schedule | indent 6 }} 49 | template: 50 | metadata: 51 | labels: 52 | {{- include "appLabels" (list $g.Release.Name $metadata.appVersion) | indent 8 }} 53 | {{- include "releaselabels" (list $g.Release.Name $g.Chart.Name) | indent 8 }} 54 | {{- include "controllerlabels" $controllerName | indent 8 }} 55 | {{- include "schelabels" $controller.schedule | indent 8 }} 56 | annotations: 57 | {{- include "annotations" $controller.pod | indent 8 }} 58 | spec: 59 | {{- include "podspec" (list $controller $controllerName) | indent 6 }} 60 | {{- end }} 61 | --- 62 | 63 | 64 | 65 | {{- end -}} 66 | {{- end -}} 67 | 68 | -------------------------------------------------------------------------------- /templates/1.0.0/templates/cronjobs.yaml: -------------------------------------------------------------------------------- 1 | {{/* Generates all CronJobs */}} 2 | 3 | {{- $g := . -}} 4 | 5 | 6 | 7 | 8 | {{- $metadata := $g.Values._config._metadata -}} 9 | {{- range $index, $controller := .Values._config.controllers -}} 10 | {{- if eq $controller.type "CronJob" -}} 11 | {{- $controllerName := include "onlyname" (list $g $index) | default (include "fullname" (list $g $index)) -}} 12 | 13 | 14 | 15 | --- 16 | apiVersion: batch/v1beta1 17 | kind: CronJob 18 | metadata: 19 | name: {{ $controllerName | quote }} 20 | labels: 21 | {{- include "appLabels" (list $g.Release.Name $metadata.appVersion) | indent 4 }} 22 | {{- include "releaselabels" (list $g.Release.Name $g.Chart.Name) | indent 4 }} 23 | annotations: 24 | {{- include "annotations" $controller.controller | indent 4 }} 25 | {{- with $controller }} 26 | spec: 27 | {{- with .controller }} 28 | schedule: {{ .rule | quote }} 29 | startingDeadlineSeconds: {{ .deadline }} 30 | concurrencyPolicy: {{ .policy | quote }} 31 | suspend: {{ .suspend }} 32 | {{- with .history }} 33 | successfulJobsHistoryLimit: {{ .success }} 34 | failedJobsHistoryLimit: {{ .fail }} 35 | {{- end }} 36 | {{- end }} 37 | jobTemplate: 38 | metadata: 39 | labels: 40 | {{- include "appLabels" (list $g.Release.Name $metadata.appVersion) | indent 8 }} 41 | {{- include "releaselabels" (list $g.Release.Name $g.Chart.Name) | indent 8 }} 42 | annotations: 43 | {{- include "annotations" $controller.controller | indent 8 }} 44 | spec: 45 | {{- with .controller }} 46 | parallelism: {{ .parallelism }} 47 | completions: {{ .completions }} 48 | backoffLimit: {{ .backoffLimit }} 49 | activeDeadlineSeconds: {{ .active }} 50 | {{- end }} 51 | template: 52 | metadata: 53 | labels: 54 | {{- include "appLabels" (list $g.Release.Name $metadata.appVersion) | indent 12 }} 55 | {{- include "releaselabels" (list $g.Release.Name $g.Chart.Name) | indent 12 }} 56 | {{- include "controllerlabels" $controllerName | indent 12 }} 57 | {{- include "schelabels" $controller.schedule | indent 12 }} 58 | annotations: 59 | {{- include "annotations" $controller.pod | indent 12 }} 60 | spec: 61 | {{- include "podspec" (list $controller $controllerName) | indent 10 }} 62 | {{- end }} 63 | --- 64 | 65 | 66 | 67 | {{- end -}} 68 | {{- end -}} 69 | 70 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | **What type of PR is this?** 4 | 5 | 36 | 37 | **What this PR does / why we need it**: 38 | 39 | **Which issue(s) this PR is related to** *(optional, link to 3rd issue(s))*: 40 | 41 | Fixes # 42 | 43 | Reference to # 44 | 45 | 46 | **Special notes for your reviewer**: 47 | 48 | /cc @your-reviewer 49 | 50 | 58 | 59 | **Does this PR introduce a user-facing change?**: 60 | 67 | ```release-note 68 | 69 | ``` 70 | 71 | 81 | -------------------------------------------------------------------------------- /templates/1.0.0/templates/_volumes.tpl: -------------------------------------------------------------------------------- 1 | {{/* volumes helper templates */}} 2 | 3 | {{/* volumes generates all volumes for pod */}} 4 | {{- define "volumes" -}} 5 | {{- $volumes := index . 0 -}} 6 | {{- $cname := index . 1 -}} 7 | {{- range $volumes -}} 8 | {{- if ne .type "Dedicated" }} 9 | - name: {{ .name | quote }} 10 | {{- if eq .type "Dynamic" }} 11 | persistentVolumeClaim: 12 | claimName: {{ printf "%s-%s" $cname .name | quote }} 13 | {{- end -}} 14 | {{- if eq .type "Static" }} 15 | persistentVolumeClaim: 16 | claimName: {{ .source.target | quote }} 17 | readOnly: {{ .source.readonly }} 18 | {{- end -}} 19 | {{- if eq .type "Scratch" }} 20 | emptyDir: 21 | medium: {{ .source.medium | quote }} 22 | {{- end -}} 23 | {{- if eq .type "HostPath" }} 24 | hostPath: 25 | path: {{ .source.path | quote }} 26 | {{- end -}} 27 | {{- if eq .type "Config" }} 28 | configMap: 29 | name: {{ .source.target | quote }} 30 | defaultMode: {{ .source.default }} 31 | optional: {{ .source.optional }} 32 | items: 33 | {{- range .source.items }} 34 | - key: {{ .key | quote }} 35 | path: {{ .path | quote }} 36 | mode: {{ .mode }} 37 | {{- end -}} 38 | {{- end -}} 39 | {{- if eq .type "Secret" }} 40 | secret: 41 | secretName: {{ .source.target | quote }} 42 | defaultMode: {{ .source.default }} 43 | optional: {{ .source.optional }} 44 | items: 45 | {{- range .source.items }} 46 | - key: {{ .key | quote }} 47 | path: {{ .path | quote }} 48 | mode: {{ .mode }} 49 | {{- end -}} 50 | {{ end -}} 51 | {{- if eq .type "Glusterfs" }} 52 | glusterfs: 53 | endpoints: {{ .source.endpoints | quote }} 54 | path: {{ .source.path | quote }} 55 | readOnly: {{ .source.readonly }} 56 | {{ end -}} 57 | {{- end -}} 58 | {{- end -}} 59 | {{- end -}} 60 | 61 | 62 | {{/* dedicated generates volume templates for StatefulSet */}} 63 | {{- define "dedicated" -}} 64 | {{- $g := index . 0 -}} 65 | {{- $name := index . 1 -}} 66 | {{- $volumes := index . 2 -}} 67 | {{- range $volumes -}} 68 | {{- if eq .type "Dedicated" }} 69 | - metadata: 70 | name: {{ .name | quote }} 71 | labels: 72 | "controller.caicloud.io/release": {{ $g.Release.Name | quote }} 73 | "controller.caicloud.io/chart": {{ $g.Chart.Name | quote }} 74 | "controller.caicloud.io/name": {{ $name | quote }} 75 | spec: 76 | accessModes: 77 | {{- range .source.modes }} 78 | - {{ . | quote }} 79 | {{- end }} 80 | storageClassName: {{ .source.class | quote }} 81 | resources: 82 | requests: 83 | storage: {{ .storage.request }} 84 | {{- if hasKey .storage "limit" }} 85 | limits: 86 | storage: {{ .storage.limit }} 87 | {{- end -}} 88 | {{- end -}} 89 | {{- end -}} 90 | {{- end -}} 91 | 92 | 93 | -------------------------------------------------------------------------------- /stable/release/elasticsearch/6.5.4/values.yaml: -------------------------------------------------------------------------------- 1 | _config: 2 | _metadata: 3 | name: elasticsearch 4 | version: 6.5.4 5 | description: | 6 | Flexible and powerful open source, distributed real-time search and analytics engine. 7 | controllers: 8 | - type: StatefulSet 9 | controller: 10 | replica: 3 11 | domain: elasticsearch 12 | strategy: 13 | type: "OnDelete" 14 | name: elasticsearch 15 | pod: 16 | securityContext: 17 | fsGroup: 1000 18 | schedule: 19 | antiaffinity: 20 | pod: 21 | type: Prefered 22 | terms: 23 | - weight: 1 24 | topologyKey: kubernetes.io/hostname 25 | selector: 26 | expressions: 27 | - key: controller.caicloud.io/release 28 | operator: In 29 | values: 30 | - "elasticsearch" 31 | initContainers: 32 | - image: cargo.caicloudprivatetest.com/library/elasticsearch:6.5.4 33 | name: chown 34 | imagePullPolicy: Always 35 | command: 36 | - /usr/local/bin/pre-start.sh 37 | mounts: 38 | - name: data 39 | path: /usr/share/elasticsearch/data 40 | resources: 41 | requests: 42 | cpu: '0.25' 43 | memory: 512Mi 44 | limits: 45 | cpu: '1' 46 | memory: 2Gi 47 | containers: 48 | - imagePullPolicy: Always 49 | name: elasticsearch 50 | image: cargo.caicloudprivatetest.com/library/elasticsearch:6.5.4 51 | env: 52 | - name: DISCOVERY_SERVICE 53 | value: elasticsearch-discovery 54 | - name: PROCESSORS 55 | from: 56 | type: ResourceFieldRef 57 | resource: limits.cpu 58 | - name: ES_JAVA_OPTS 59 | value: "-Djava.net.preferIPv4Stack=true -Xms512m -Xmx512m " 60 | - name: MINIMUM_MASTER_NODES 61 | value: 2 62 | resources: 63 | requests: 64 | cpu: '0.25' 65 | memory: 512Mi 66 | limits: 67 | cpu: '1' 68 | memory: 2Gi 69 | ports: 70 | - protocol: TCP 71 | port: 9300 72 | name: transport 73 | - protocol: TCP 74 | port: 9200 75 | name: http 76 | probe: 77 | readiness: 78 | handler: 79 | type: HTTP 80 | method: 81 | path: /_cluster/health?local=true 82 | port: 9200 83 | delay: 5 84 | mounts: 85 | - name: data 86 | path: /usr/share/elasticsearch/data 87 | volumes: 88 | - name: data 89 | type: Dedicated 90 | services: 91 | - name: elasticsearch-discovery 92 | type: ClusterIP 93 | ports: 94 | - protocol: HTTP 95 | targetPort: 9300 96 | port: 9300 97 | -------------------------------------------------------------------------------- /stable/release/gitlab-ce/10.3.3/values.yaml: -------------------------------------------------------------------------------- 1 | _config: 2 | _metadata: 3 | name: gitlab-ce 4 | version: 10.3.3 5 | description: | 6 | GitLab is the leading integrated product for modern software development. 7 | Connecting issue management, version control, code review, CI, CD, 8 | and monitoring into a single, easy-to-install application. 9 | controllers: 10 | - containers: 11 | - env: [] 12 | mounts: 13 | - name: log 14 | path: "/var/log/gitlab" 15 | - name: data 16 | path: "/var/opt/gitlab" 17 | command: [] 18 | args: [] 19 | image: cargo.caicloudprivatetest.com/library/gitlab-ce:10.3.3-ce.0 20 | imagePullPolicy: Always 21 | resources: 22 | limits: 23 | cpu: '2' 24 | memory: 4Gi 25 | requests: 26 | cpu: '1' 27 | memory: 2Gi 28 | ports: 29 | - protocol: HTTP 30 | port: 80 31 | - protocol: HTTPS 32 | port: 443 33 | - protocol: TCP 34 | port: 22 35 | probe: 36 | liveness: 37 | handler: 38 | type: HTTP 39 | method: 40 | scheme: HTTP 41 | path: "/help" 42 | port: '80' 43 | delay: 200 44 | timeout: 1 45 | period: 10 46 | threshold: 47 | success: 1 48 | failure: 10 49 | readiness: 50 | handler: 51 | type: HTTP 52 | method: 53 | scheme: HTTP 54 | port: '80' 55 | path: "/help" 56 | delay: 30 57 | timeout: 1 58 | period: 10 59 | threshold: 60 | success: 1 61 | failure: 3 62 | services: 63 | - ports: 64 | - protocol: HTTP 65 | targetPort: 80 66 | port: 80 67 | nodePort: 0 68 | - protocol: HTTPS 69 | targetPort: 443 70 | port: 443 71 | nodePort: 0 72 | - protocol: TCP 73 | targetPort: 22 74 | port: 22 75 | nodePort: 0 76 | name: gitlab 77 | type: ClusterIP 78 | volumes: 79 | - storage: 80 | limit: 10Gi 81 | request: 10Gi 82 | type: Static 83 | name: log 84 | - storage: 85 | limit: 10Gi 86 | request: 10Gi 87 | type: Static 88 | name: data 89 | pod: 90 | restart: Always 91 | dns: ClusterFirst 92 | termination: 30 93 | host: 94 | network: false 95 | pid: false 96 | ipc: false 97 | type: Deployment 98 | controller: 99 | replica: 1 100 | strategy: 101 | unavailable: 1 102 | surge: 1 103 | -------------------------------------------------------------------------------- /templates/1.0.0/templates/statefulsets.yaml: -------------------------------------------------------------------------------- 1 | {{/* Generates all StatefulSets */}} 2 | 3 | {{- $g := . -}} 4 | 5 | 6 | {{- $metadata := $g.Values._config._metadata -}} 7 | {{- range $index, $controller := .Values._config.controllers -}} 8 | {{- if eq $controller.type "StatefulSet" -}} 9 | {{- $controllerName := include "onlyname" (list $g $index) | default (include "fullname" (list $g $index)) -}} 10 | {{- $domain := $controller.controller.domain | default $controllerName }} 11 | 12 | --- 13 | apiVersion: v1 14 | kind: Service 15 | metadata: 16 | name: {{ $domain | quote }} 17 | labels: 18 | {{- include "appLabels" (list $g.Release.Name $metadata.appVersion) | indent 4 }} 19 | {{- include "releaselabels" (list $g.Release.Name $g.Chart.Name) | indent 4 }} 20 | spec: 21 | clusterIP: None 22 | selector: 23 | {{/* we do not add appLabels in selector to let service select all versions */}} 24 | {{- include "controllerlabels" $controllerName | indent 4 }} 25 | ports: 26 | {{- range .containers -}} 27 | {{- range .ports }} 28 | - name: {{ (printf "%s-%.0f" .protocol .port) | lower | quote }} 29 | {{- if eq .protocol "UDP" }} 30 | protocol: "UDP" 31 | {{- else }} 32 | protocol: "TCP" 33 | {{- end }} 34 | port: {{ .port }} 35 | targetPort: {{ .port }} 36 | {{- end -}} 37 | {{- end }} 38 | --- 39 | apiVersion: apps/v1 40 | kind: StatefulSet 41 | metadata: 42 | name: {{ $controllerName | quote }} 43 | labels: 44 | {{- include "appLabels" (list $g.Release.Name $metadata.appVersion) | indent 4 }} 45 | {{- include "releaselabels" (list $g.Release.Name $g.Chart.Name) | indent 4 }} 46 | annotations: 47 | {{- include "annotations" $controller.controller | indent 4 }} 48 | spec: 49 | serviceName: {{ $domain | quote }} 50 | replicas: {{ $controller.controller.replica }} 51 | {{- with $controller.controller.strategy }} 52 | updateStrategy: 53 | type: {{ $controller.controller.strategy.type }} 54 | {{- with $controller.controller.strategy.rollingUpdate }} 55 | rollingUpdate: 56 | partition: {{ $controller.controller.strategy.rollingUpdate.partition }} 57 | {{- end }} 58 | {{- end }} 59 | podManagementPolicy: {{ $controller.controller.podManagementPolicy }} 60 | selector: 61 | matchLabels: 62 | {{- include "appLabels" (list $g.Release.Name $metadata.appVersion) | indent 6 }} 63 | {{- include "releaselabels" (list $g.Release.Name $g.Chart.Name) | indent 6 }} 64 | {{- include "controllerlabels" $controllerName | indent 6 }} 65 | {{- include "schelabels" $controller.schedule | indent 6 }} 66 | template: 67 | metadata: 68 | labels: 69 | {{- include "appLabels" (list $g.Release.Name $metadata.appVersion) | indent 8 }} 70 | {{- include "releaselabels" (list $g.Release.Name $g.Chart.Name) | indent 8 }} 71 | {{- include "controllerlabels" $controllerName | indent 8 }} 72 | {{- include "schelabels" $controller.schedule | indent 8 }} 73 | annotations: 74 | {{- include "annotations" $controller.pod | indent 8 }} 75 | spec: 76 | {{- include "podspec" (list $controller $controllerName) | indent 6 }} 77 | volumeClaimTemplates: 78 | {{- include "dedicated" (list $g $controllerName $controller.volumes) | indent 2 }} 79 | --- 80 | {{ end -}} 81 | {{- end -}} 82 | 83 | -------------------------------------------------------------------------------- /stable/application/WordPress/0.0.1/config.json: -------------------------------------------------------------------------------- 1 | {"name":"WordPress","description":"Wordpress 是一个开源的博客系统应用,包含两个服务: wordpress 和 mysql","data":"{\"vertexes\":[{\"metadata\":{\"index\":1,\"alias\":\"wordpress\",\"memos\":{\"style\":{\"left\":565,\"top\":243}}},\"spec\":{\"description\":\"Wordpress 拥有大量主题和插件,用于优化 Wordress 的 UI 和功能。\",\"config\":{\"metadata\":{\"version\":\"4.9.1\",\"description\":\"Wordpress 拥有大量主题和插件,用于优化 Wordress 的 UI 和功能。\",\"alias\":\"wordpress\"},\"controllers\":[{\"containers\":[{\"env\":[{\"name\":\"WORDPRESS_DB_HOST\",\"value\":\"mysql\"},{\"name\":\"WORDPRESS_DB_USER\",\"value\":\"user\"},{\"name\":\"WORDPRESS_DB_PASSWORD\",\"value\":\"password\"},{\"name\":\"WORDPRESS_DB_NAME\",\"value\":\"db\"},{\"name\":\"WORDPRESS_TABLE_PREFIX\",\"value\":\"wp\"}],\"mounts\":[],\"command\":[],\"args\":[],\"imagePullPolicy\":\"Always\",\"image\":\"IMAGE_REPOSITORY/library/wordpress:4.9.1\",\"resources\":{\"limits\":{\"cpu\":\"0.5\",\"memory\":\"512Mi\"},\"requests\":{\"cpu\":\"0.25\",\"memory\":\"512Mi\"},\"__method\":\"custom\"},\"ports\":[{\"protocol\":\"HTTP\",\"port\":80}],\"probe\":{},\"__isEnvCustom\":true,\"fileLog\":[],\"envFrom\":[],\"mountFile\":[]}],\"services\":[{\"ports\":[{\"protocol\":\"HTTP\",\"targetPort\":80,\"port\":80,\"nodePort\":0}],\"name\":\"wordpress\",\"type\":\"ClusterIP\"}],\"volumes\":[],\"pod\":{\"dns\":\"ClusterFirst\",\"termination\":30,\"hostAliases\":[],\"securityContext\":{\"runAsNonRoot\":false},\"annotations\":[],\"restart\":\"Always\",\"host\":{\"network\":false,\"pid\":false,\"ipc\":false}},\"type\":\"Deployment\",\"controller\":{\"replica\":1,\"strategy\":{\"type\":\"RollingUpdate\",\"unavailable\":0,\"surge\":1},\"ready\":0},\"schedule\":{},\"initContainers\":[]}]}}},{\"metadata\":{\"index\":2,\"alias\":\"mysql\",\"memos\":{\"style\":{\"left\":223,\"top\":243}}},\"spec\":{\"description\":\"MySQL 是一个开源的基于 SQL 的关系型数据库系统。\\n\",\"config\":{\"metadata\":{\"version\":\"5.7.20\",\"description\":\"MySQL 是一个开源的基于 SQL 的关系型数据库系统。\\n\",\"alias\":\"mysql\"},\"controllers\":[{\"containers\":[{\"env\":[{\"name\":\"MYSQL_ROOT_PASSWORD\",\"value\":\"root\"},{\"name\":\"MYSQL_DATABASE\",\"value\":\"db\"},{\"name\":\"MYSQL_USER\",\"value\":\"user\"},{\"name\":\"MYSQL_PASSWORD\",\"value\":\"password\"}],\"mounts\":[{\"path\":\"/var/lib/mysql\",\"name\":\"data\"}],\"command\":[],\"args\":[],\"imagePullPolicy\":\"Always\",\"image\":\"IMAGE_REPOSITORY/library/mysql:5.7.20\",\"resources\":{\"limits\":{\"cpu\":\"1\",\"memory\":\"1Gi\"},\"requests\":{\"cpu\":\"0.25\",\"memory\":\"512Mi\"},\"__method\":\"custom\"},\"ports\":[{\"protocol\":\"HTTP\",\"port\":3306}],\"probe\":{},\"__isEnvCustom\":true,\"fileLog\":[],\"envFrom\":[],\"mountFile\":[]}],\"services\":[{\"ports\":[{\"protocol\":\"HTTP\",\"targetPort\":3306,\"port\":3306,\"nodePort\":0}],\"name\":\"mysql\",\"type\":\"ClusterIP\"}],\"volumes\":[{\"storage\":{\"request\":\"\",\"limit\":\"\"},\"source\":{},\"type\":\"Static\",\"name\":\"data\"}],\"pod\":{\"dns\":\"ClusterFirst\",\"termination\":30,\"hostAliases\":[],\"securityContext\":{\"runAsNonRoot\":false},\"annotations\":[],\"restart\":\"Always\",\"host\":{\"network\":false,\"pid\":false,\"ipc\":false}},\"type\":\"Deployment\",\"controller\":{\"replica\":1,\"strategy\":{\"type\":\"RollingUpdate\",\"unavailable\":0,\"surge\":1},\"ready\":0},\"schedule\":{},\"initContainers\":[]}]}}}],\"edges\":[{\"from\":2,\"to\":1}]}","annotations":{"serverCount":"2"},"labels":{},"version":"0.0.1"} 2 | 3 | -------------------------------------------------------------------------------- /templates/1.0.0/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* common helper templates */}} 2 | 3 | 4 | {{/* fullname returns the name of a controller */}} 5 | {{- define "fullname" -}} 6 | {{- $global := index . 0 -}} 7 | {{- $index := index . 1 -}} 8 | {{- $metadata := $global.Values._config._metadata -}} 9 | {{- $release := $global.Release.Name | trunc 30 | trimSuffix "-" | lower -}} 10 | {{- $chart := $global.Chart.Name | trunc 20 | trimSuffix "-" | lower -}} 11 | {{- $appVersion := $metadata.appVersion | default "v1" | lower -}} 12 | {{- printf "%s-%s-%s-%d" $release $chart $appVersion $index -}} 13 | {{- end -}} 14 | 15 | {{/* onlyname returns the controller's name */}} 16 | {{- define "onlyname" -}} 17 | {{- $global := index . 0 -}} 18 | {{- $index := index . 1 -}} 19 | {{- $controller := index $global.Values._config.controllers $index -}} 20 | {{- with $controller.controller -}} 21 | {{- with .name -}} 22 | {{- printf "%s" . -}} 23 | {{- end -}} 24 | {{- end -}} 25 | {{- end -}} 26 | 27 | {{/* cid gets unique chart id in a release */}} 28 | {{/* All charts in a release should have different name */}} 29 | {{/* It strongly depends on a ordered template engine */}} 30 | {{- define "cid" -}} 31 | {{- if not (hasKey .Release "cids") -}} 32 | {{- $_ := set .Release "cids" dict -}} 33 | {{- $_ := set .Release "counter" -1 -}} 34 | {{- end -}} 35 | {{- if not (hasKey .Release.cids .Chart.Name) -}} 36 | {{- $counter := add1 .Release.counter -}} 37 | {{- $_ := set .Release "counter" $counter -}} 38 | {{- $_ := set .Release.cids .Chart.Name $counter -}} 39 | {{- end -}} 40 | {{- index .Release.cids .Chart.Name -}} 41 | {{- end -}} 42 | 43 | {{/* required checks target object */}} 44 | {{- define "required" -}} 45 | {{- $target := index . 0 -}} 46 | {{- $prefix := index . 1 -}} 47 | {{- $field := index . 2 -}} 48 | {{- $type := index . 3 -}} 49 | 50 | {{- $fields := splitList "." $field -}} 51 | {{- $temp := list | dict "fields" -}} 52 | {{- range $fields -}} 53 | {{- $f := $temp.fields -}} 54 | {{- $f := append $f . -}} 55 | {{- $_ := set $temp "fields" $f -}} 56 | {{- end -}} 57 | {{- template "check" list $target $temp.fields $type $prefix -}} 58 | {{- end -}} 59 | 60 | {{- define "check" -}} 61 | {{- $target := index . 0 -}} 62 | {{- $fields := index . 1 -}} 63 | {{- $type := index . 2 -}} 64 | {{- $prefix := index . 3 -}} 65 | 66 | {{- $first := first $fields -}} 67 | {{- $rest := rest $fields -}} 68 | {{- $restLen := len $rest -}} 69 | 70 | {{- $existing := hasKey $target $first -}} 71 | {{- if not $existing -}} 72 | {{- printf "field %s.%s not found" $prefix $first | fail -}} 73 | {{- end -}} 74 | 75 | {{- $target := index $target $first -}} 76 | {{- if eq $restLen 0 -}} 77 | {{- if eq $type "dict" -}} 78 | {{- if not (typeIs "map[string]interface {}" $target) -}} 79 | {{- printf "field %s.%s is not dict" $prefix $first | fail -}} 80 | {{- end -}} 81 | {{- end -}} 82 | {{- if eq $type "list" -}} 83 | {{- if not (typeIs "[]interface {}" $target) -}} 84 | {{- printf "field %s.%s is not list" $prefix $first | fail -}} 85 | {{- end -}} 86 | {{- else -}} 87 | {{- if not (typeIs $type $target) -}} 88 | {{- printf "field %s.%s is not %s" $prefix $first $type | fail -}} 89 | {{- end -}} 90 | {{- end -}} 91 | {{- else -}} 92 | {{- $prefix := printf "%s.%s" $prefix $first -}} 93 | {{- template "check" list $target $rest $type $prefix -}} 94 | {{- end -}} 95 | {{- end -}} 96 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2019 The Caicloud Authors. 2 | # 3 | # The old school Makefile, following are required targets. The Makefile is written 4 | # to allow building multiple binaries. You are free to add more targets or change 5 | # existing implementations, as long as the semantics are preserved. 6 | # 7 | # make - default to 'build' target 8 | # make lint - code analysis 9 | # make test - run unit test (or plus integration test) 10 | # make build - alias to build-local target 11 | # make build-local - build local binary targets 12 | # make build-linux - build linux binary targets 13 | # make container - build containers 14 | # $ docker login registry -u username -p xxxxx 15 | # make push - push containers 16 | # make clean - clean up targets 17 | # 18 | # Not included but recommended targets: 19 | # make e2e-test 20 | # 21 | # The makefile is also responsible to populate project version information. 22 | # 23 | 24 | # 25 | # Tweak the variables based on your project. 26 | # 27 | 28 | # This repo's root import path (under GOPATH). 29 | ROOT := github.com/caicloud/charts 30 | 31 | # Target binaries. You can build multiple binaries for a single project. 32 | TARGETS := charts templates 33 | 34 | # Container image prefix and suffix added to targets. 35 | # The final built images are: 36 | # $[REGISTRY]/$[IMAGE_PREFIX]$[TARGET]$[IMAGE_SUFFIX]:$[VERSION] 37 | # $[REGISTRY] is an item from $[REGISTRIES], $[TARGET] is an item from $[TARGETS]. 38 | IMAGE_PREFIX ?= $(strip ) 39 | IMAGE_SUFFIX ?= $(strip ) 40 | 41 | # Go build GOARCH, you can choose to build amd64 or arm64 42 | ARCH ?= amd64 43 | 44 | # Change Dockerfile name and registry project name for arm64 45 | ifeq ($(ARCH),arm64) 46 | DOCKERFILE := Dockerfile.arm64 47 | REGISTRY ?= cargo.dev.caicloud.xyz/arm64v8 48 | else 49 | DOCKERFILE := Dockerfile 50 | REGISTRY ?= cargo.dev.caicloud.xyz/release 51 | endif 52 | 53 | # 54 | # These variables should not need tweaking. 55 | # 56 | 57 | # Project main package location (can be multiple ones). 58 | CMD_DIR := ./build 59 | 60 | # Build direcotory. 61 | BUILD_DIR := ./build 62 | 63 | # Current version of the project. 64 | VERSION ?= $(shell git describe --tags --always --dirty) 65 | 66 | # 67 | # Define all targets. At least the following commands are required: 68 | # 69 | 70 | # All targets. 71 | .PHONY: lint test build container push 72 | 73 | build: build-local 74 | 75 | lint: 76 | @echo 'no lint' 77 | 78 | test: 79 | @echo 'no test' 80 | 81 | test-linux: 82 | @for target in $(TARGETS); do \ 83 | $(CMD_DIR)/$${target}/test.sh; \ 84 | done 85 | 86 | container: test-linux 87 | @for target in $(TARGETS); do \ 88 | image=$(IMAGE_PREFIX)$${target}$(IMAGE_SUFFIX); \ 89 | docker build -t $(REGISTRY)/$${image}:$(VERSION) \ 90 | -f $(BUILD_DIR)/$${target}/$(DOCKERFILE) .; \ 91 | done 92 | 93 | push: container 94 | @for target in $(TARGETS); do \ 95 | image=$(IMAGE_PREFIX)$${target}$(IMAGE_SUFFIX); \ 96 | docker push $(REGISTRY)/$${image}:$(VERSION); \ 97 | done 98 | 99 | .PHONY: clean 100 | clean: 101 | @-rm -vrf ${OUTPUT_DIR} 102 | -------------------------------------------------------------------------------- /templates/1.0.0/templates/_scheduler.tpl: -------------------------------------------------------------------------------- 1 | {{/* scheduler helper templates */}} 2 | 3 | {{/* schelabels generates schedule labels */}} 4 | {{- define "schelabels" -}} 5 | {{- range $k, $v := .labels }} 6 | {{ $k | quote }}: {{ $v | quote}} 7 | {{- end }} 8 | {{- end -}} 9 | 10 | 11 | {{- define "schedule" }} 12 | schedulerName: {{ .scheduler | quote }} 13 | affinity: 14 | {{- with .affinity }} 15 | {{- with .node }} 16 | nodeAffinity: 17 | {{- if eq .type "Required" }} 18 | requiredDuringSchedulingIgnoredDuringExecution: 19 | nodeSelectorTerms: 20 | {{- range .terms }} 21 | - matchExpressions: 22 | {{- range .expressions }} 23 | - key: {{ .key | quote }} 24 | operator: {{ .operator | quote }} 25 | values: 26 | {{- range .values }} 27 | - {{ . | quote }} 28 | {{- end }} 29 | {{- end }} 30 | {{- end }} 31 | {{- else }} 32 | preferredDuringSchedulingIgnoredDuringExecution: 33 | {{- range .terms }} 34 | - weight: {{ .weight }} 35 | preference: 36 | matchExpressions: 37 | {{- range .expressions }} 38 | - key: {{ .key | quote }} 39 | operator: {{ .operator | quote }} 40 | values: 41 | {{- range .values }} 42 | - {{ . | quote }} 43 | {{- end }} 44 | {{- end }} 45 | {{- end }} 46 | {{- end }} 47 | {{- end }} 48 | {{- with .pod }} 49 | podAffinity: 50 | {{- include "podaffinity" . | indent 4 }} 51 | {{- end }} 52 | {{- end }} 53 | {{- with .antiaffinity }} 54 | {{- with .pod }} 55 | podAntiAffinity: 56 | {{- include "podaffinity" . | indent 4 }} 57 | {{- end }} 58 | {{- end }} 59 | tolerations: 60 | {{- range .tolerations }} 61 | - key: {{ .key | quote }} 62 | operator: {{ .operator | quote }} 63 | value: {{ .value | quote }} 64 | effect: {{ .effect | quote }} 65 | tolerationSeconds: {{ .tolerationSeconds }} 66 | {{- end -}} 67 | {{- end -}} 68 | 69 | 70 | {{/* podaffinity */}} 71 | {{- define "podaffinity" -}} 72 | {{- if eq .type "Required" }} 73 | requiredDuringSchedulingIgnoredDuringExecution: 74 | {{- range .terms }} 75 | - labelSelector: 76 | {{- if hasKey .selector "labels" }} 77 | matchLabels: 78 | {{- range $k, $v := .selector.labels }} 79 | {{ $k | quote }}: {{ $v | quote }} 80 | {{- end }} 81 | {{- end }} 82 | {{- if hasKey .selector "expressions" }} 83 | matchExpressions: 84 | {{- range .selector.expressions }} 85 | - key: {{ .key | quote }} 86 | operator: {{ .operator | quote }} 87 | values: 88 | {{- range .values }} 89 | - {{ . | quote }} 90 | {{- end }} 91 | {{- end }} 92 | {{- end }} 93 | namespaces: 94 | {{- range .namespaces }} 95 | - {{ . }} 96 | {{- end }} 97 | topologyKey: {{ .topologyKey | default "kubernetes.io/hostname" | quote }} 98 | {{- end }} 99 | {{- else }} 100 | preferredDuringSchedulingIgnoredDuringExecution: 101 | {{- range .terms }} 102 | - weight: {{ .weight }} 103 | podAffinityTerm: 104 | labelSelector: 105 | {{- if hasKey .selector "labels" }} 106 | matchLabels: 107 | {{- range $k, $v := .selector.labels }} 108 | {{ $k | quote }}: {{ $v | quote }} 109 | {{- end }} 110 | {{- end }} 111 | {{- if hasKey .selector "expressions" }} 112 | matchExpressions: 113 | {{- range .selector.expressions }} 114 | - key: {{ .key | quote }} 115 | operator: {{ .operator | quote }} 116 | values: 117 | {{- range .values }} 118 | - {{ . | quote }} 119 | {{- end }} 120 | {{- end }} 121 | {{- end }} 122 | namespaces: 123 | {{- range .namespaces }} 124 | - {{ . | quote }} 125 | {{- end }} 126 | topologyKey: {{ .topologyKey | default "kubernetes.io/hostname" | quote }} 127 | {{- end }} 128 | {{- end }} 129 | {{- end -}} 130 | 131 | 132 | -------------------------------------------------------------------------------- /images/galera/5.7.20/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # ENVS: 4 | # GALERA_CLUSTER_DOMAIN=galera 5 | # GALERA_CHECK_DELAY=5 6 | # GALERA_CLUSTER_NAME=mysql_cluster 7 | # GALERA_USER=sst 8 | # GALERA_PASSWORD=sstpassword 9 | # MYSQL_ROOT_PASSWORD=root 10 | # MYSQL_DATABASE=db 11 | # MYSQL_USER=user 12 | # MYSQL_PASSWORD=password 13 | 14 | # check envs 15 | oldIFS=$IFS 16 | IFS=',' 17 | GALERA_ENVS=GALERA_CLUSTER_DOMAIN,GALERA_START_DELAY,GALERA_CLUSTER_NAME,GALERA_USER,GALERA_PASSWORD,MYSQL_ROOT_PASSWORD 18 | for env in ${GALERA_ENVS[@]}; do 19 | if [[ -z "${!env}" ]]; then 20 | echo >&2 "error: ${env} is not set" 21 | exit 1 22 | fi 23 | done 24 | IFS=$oldIFS 25 | 26 | # get current node index in galera cluster 27 | INDEX=${HOSTNAME##*-} 28 | expr $INDEX '+' 1000 &>/dev/null 29 | if [ "$?" -ne 0 ]; then 30 | echo >&2 'error: start without StatefulSet and HOSTNAME is wrong' 31 | exit 1 32 | fi 33 | 34 | echo "HOSTNAME: ${HOSTNAME}" 35 | echo "GALERA_CLUSTER_DOMAIN: ${GALERA_CLUSTER_DOMAIN}" 36 | echo "GALERA_START_DELAY: ${GALERA_START_DELAY}" 37 | echo "GALERA_CLUSTER_NAME: ${GALERA_CLUSTER_NAME}" 38 | echo "GALERA_USER: ${GALERA_USER}" 39 | echo "INDEX: ${INDEX}" 40 | 41 | # initiate db when it is not existing 42 | firstTime=0 43 | if [ ! -d '/var/lib/mysql/mysql' ]; then 44 | # install db 45 | echo "Info: Initialize DB" 46 | set -e 47 | mysqld --initialize --user=mysql --datadir=/var/lib/mysql 48 | chown -R mysql:mysql /var/lib/mysql 49 | set +e 50 | echo "Info: Installed DB" 51 | firstTime=1 52 | fi 53 | 54 | echo "Info: Check alive" 55 | 56 | # check if the cluster is running 57 | alive=0 58 | check() { 59 | oldIFS=$IFS 60 | IFS=',' 61 | nodes=($GALERA_CLUSTER_ADDRESS) 62 | IFS=$oldIFS 63 | pids="" 64 | for node in ${nodes[@]}; do 65 | timeout 2 bash -c "mysql -h$node -uroot -p$MYSQL_ROOT_PASSWORD -e 'select 1' 2>/dev/null 1>/dev/null" & 66 | pids="$pids $!" 67 | done 68 | for pid in $pids; do 69 | wait $pid 70 | if [ "$?" -eq 0 ]; then 71 | alive=1 72 | break 73 | fi 74 | done 75 | } 76 | 77 | # if the cluster is not alive,try check cluster status every GALERA_START_DELAY seconds 78 | times=$INDEX 79 | while [ $times -ge 0 ]; do 80 | # get available node IPs. 81 | GALERA_CLUSTER_ADDRESS=$(resolveip "$GALERA_CLUSTER_DOMAIN" | awk '{print $6}') 82 | GALERA_CLUSTER_ADDRESS=$(printf ",%s" $GALERA_CLUSTER_ADDRESS) 83 | GALERA_CLUSTER_ADDRESS=${GALERA_CLUSTER_ADDRESS#,*} 84 | echo "Check alive countdown: ${times}" 85 | echo "GALERA_CLUSTER_ADDRESS: ${GALERA_CLUSTER_ADDRESS}" 86 | 87 | if [[ $GALERA_CLUSTER_ADDRESS != "" ]]; then 88 | check 89 | if [ "$alive" -ne 0 -o "$times" -eq 0 ]; then 90 | break 91 | fi 92 | fi 93 | 94 | sleep $GALERA_START_DELAY 95 | times=$(($times - 1)) 96 | done 97 | 98 | # configure galera:/etc/mysql/galera.cnf 99 | configFile='/etc/mysql/galera.cnf' 100 | sed -i "s|^wsrep_cluster_name.*$|wsrep_cluster_name=\"$GALERA_CLUSTER_NAME\"|g" "$configFile" 101 | sed -i "s|^wsrep_cluster_address.*$|wsrep_cluster_address=\"gcomm://$GALERA_CLUSTER_ADDRESS\"|g" $configFile 102 | sed -i "s|^wsrep_sst_auth.*$|wsrep_sst_auth=$GALERA_USER:$GALERA_PASSWORD|g" $configFile 103 | 104 | if [ "$alive" -eq 0 ]; then 105 | # set --wsrep-new-cluster 106 | echo "Info: $GALERA_CLUSTER_NAME is not running, start a new cluster" 107 | set -- "$@" --wsrep-new-cluster 108 | else 109 | echo "Info: $GALERA_CLUSTER_NAME is running, join cluster" 110 | fi 111 | 112 | # generate a init.sql 113 | if [ "$firstTime" -eq 1 -a "$alive" -eq 0 ]; then 114 | tempFile='/tmp/first.sql' 115 | cat >"$tempFile" <<-EOF 116 | DELETE FROM mysql.user ; 117 | CREATE USER 'root'@'%' IDENTIFIED BY '$MYSQL_ROOT_PASSWORD' ; 118 | GRANT ALL ON *.* TO 'root'@'%' WITH GRANT OPTION ; 119 | CREATE USER '$GALERA_USER'@'%' IDENTIFIED BY '$GALERA_PASSWORD' ; 120 | GRANT ALL ON *.* TO '$GALERA_USER'@'%' WITH GRANT OPTION ; 121 | DROP DATABASE IF EXISTS test ; 122 | EOF 123 | 124 | if [ "$MYSQL_DATABASE" ]; then 125 | echo "CREATE DATABASE IF NOT EXISTS $MYSQL_DATABASE ;" >>"$tempFile" 126 | fi 127 | 128 | if [ "$MYSQL_USER" -a "$MYSQL_PASSWORD" ]; then 129 | echo "CREATE USER '$MYSQL_USER'@'%' IDENTIFIED BY '$MYSQL_PASSWORD' ;" >>"$tempFile" 130 | 131 | if [ "$MYSQL_DATABASE" ]; then 132 | echo "GRANT ALL ON $MYSQL_DATABASE.* TO '$MYSQL_USER'@'%' ;" >>"$tempFile" 133 | fi 134 | fi 135 | 136 | echo 'FLUSH PRIVILEGES ;' >>"$tempFile" 137 | 138 | # use initial script when current node is the most advanced node of galera 139 | if [ -f './init.sql' ]; then 140 | cat ./init.sql >>"$tempFile" 141 | fi 142 | 143 | set -- "$@" --init-file="$tempFile" 144 | fi 145 | echo "Info: $@" 146 | exec "$@" 147 | -------------------------------------------------------------------------------- /templates/1.0.0/values.yaml: -------------------------------------------------------------------------------- 1 | _config: 2 | _metadata: 3 | name: template 4 | version: 1.0.0 5 | description: "A basic template for application" 6 | creationTime: "2017-07-14 12:00:00" 7 | source: "/library/template/1.0.0" 8 | revision: 1 9 | appVersion: v1 10 | class: Default 11 | template: 12 | type: "template.caicloud.io/application" 13 | version: 1.0.0 14 | controllers: 15 | - type: StatefulSet 16 | controller: 17 | replica: 3 18 | name: "asda2222" 19 | domain: "asdas" 20 | annotations: 21 | - key: "controller.caicloud.io/feature-1.0.0" 22 | value: "{'test':'controller'}" 23 | schedule: 24 | labels: 25 | cpu: heavy 26 | io: heavy 27 | affinity: 28 | node: 29 | type: Prefered 30 | terms: 31 | - weight: 10 32 | expressions: 33 | - key: cpu 34 | operator: NotIn 35 | values: 36 | - heavy 37 | - midium 38 | pod: 39 | type: Required 40 | terms: 41 | - selector: 42 | labels: 43 | cpu: heavy 44 | antiaffinity: 45 | pod: 46 | type: Prefered 47 | terms: 48 | - weight: 10 49 | selector: 50 | expressions: 51 | - key: cpu 52 | operator: In 53 | values: 54 | - heavy 55 | - midium 56 | tolerations: 57 | - key: tolerations_key 58 | operator: Equal 59 | value: tolerations_value 60 | effect: NoSchedule(PreferNoSchedule、NoExecute) 61 | tolerationSeconds: 60 62 | - key: tolerations_key1 63 | operator: Exists 64 | value: tolerations_value1 65 | effect: PreferNoSchedule 66 | tolerationSeconds: 60 67 | - key: tolerations_key2 68 | operator: Equal 69 | value: tolerations_value2 70 | effect: NoExecute 71 | tolerationSeconds: 60 72 | pod: 73 | host: 74 | network: true 75 | annotations: 76 | - key: "pod.caicloud.io/feature-1.0.0" 77 | value: "{'test':'pod'}" 78 | hostAliases: 79 | - ip: 192.168.19.0 80 | hostnames: 81 | - www.baidu.com 82 | initContainers: 83 | - image: mysql-init:v1.0.0 84 | mounts: 85 | - name: db-volume 86 | path: /var/lib/mysql 87 | resources: 88 | requests: 89 | cpu: 100m 90 | memory: 100Mi 91 | limits: 92 | cpu: 100m 93 | memory: 100Mi 94 | containers: 95 | - image: mysql:v5.6 96 | ports: 97 | - protocol: TCP 98 | port: 3306 99 | mounts: 100 | - name: db-volume 101 | path: /var/lib/mysql 102 | - name: shared-volume 103 | path: /var/lib/logs 104 | envFrom: 105 | - type: Config 106 | name: someconfigmap 107 | prefix: XXXX_ 108 | optional: false 109 | downwardPrefix: MY_ENV 110 | env: 111 | - name: XXSS_ 112 | value: "sd" 113 | - name: Sdsaa 114 | value: "10" 115 | resources: 116 | requests: 117 | cpu: 100m 118 | memory: 100Mi 119 | limits: 120 | cpu: 100m 121 | memory: 100Mi 122 | probe: 123 | liveness: 124 | handler: 125 | type: HTTP 126 | method: 127 | port: 80 128 | path: /liveness 129 | delay: 10 130 | readiness: 131 | handler: 132 | type: EXEC 133 | method: 134 | command: 135 | - curl 136 | - http://localhost 137 | delay: 15 138 | volumes: 139 | - name: db-volume 140 | type: Dedicated 141 | source: 142 | class: hdd 143 | modes: 144 | - ReadWriteOnce 145 | storage: 146 | request: 5Gi 147 | - name: shared-volume 148 | type: Dynamic 149 | source: 150 | class: ssd 151 | modes: 152 | - ReadWriteMany 153 | storage: 154 | request: 5Gi 155 | limit: 100Gi 156 | services: 157 | - name: mysql1 158 | type: ClusterIP 159 | ports: 160 | - protocol: HTTP 161 | targetPort: 80 162 | port: 80 163 | sessionAffinity: ClientIP 164 | affinityTimeout: 10800 165 | - name: mysql2 166 | type: NodePort 167 | ports: 168 | - protocol: HTTPS 169 | targetPort: 443 170 | port: 443 171 | nodePort: 31222 172 | - type: Deployment 173 | controller: 174 | replica: 1 175 | containers: 176 | - image: cargo.caicloudprivatetest.com/caicloud/simplelog 177 | mounts: 178 | - name: cfgvolume 179 | path: /etc/simplelog 180 | resources: 181 | requests: 182 | cpu: 100m 183 | memory: 100Mi 184 | limits: 185 | cpu: 100m 186 | memory: 100Mi 187 | services: 188 | - name: log1 189 | type: ClusterIP 190 | ports: 191 | - protocol: HTTP 192 | targetPort: 80 193 | port: 80 194 | volumes: 195 | - name: test 196 | type: Scratch 197 | source: 198 | medium: "memory" 199 | - name: cfgvolume 200 | type: Config 201 | source: 202 | target: simplecfg 203 | items: 204 | - key: "config.yaml" 205 | path: "config.yaml" 206 | configs: 207 | - name: simplecfg 208 | data: 209 | - key: "config.yaml" 210 | value: | 211 | sync: "5m" 212 | deadline: "3h" 213 | secrets: 214 | - name: simplesecret 215 | data: 216 | - key: "encrypted.cfg" 217 | value: c3luYzogIjVtIgpkZWFkbGluZTogIjNoIgo= 218 | -------------------------------------------------------------------------------- /templates/1.0.0/templates/_pod.tpl: -------------------------------------------------------------------------------- 1 | {{/* pod helper templates */}} 2 | 3 | 4 | {{- define "podspec" -}} 5 | {{- $controller := index . 0 -}} 6 | {{- $name := index . 1 -}} 7 | 8 | {{- with $controller.pod }} 9 | restartPolicy: {{ .restart | quote }} 10 | dnsPolicy: {{ .dns | quote }} 11 | hostname: {{ .hostname | quote }} 12 | subdomain: {{ .subdomain | quote }} 13 | terminationGracePeriodSeconds: {{ .termination }} 14 | serviceAccountName: {{ .serviceAccountName | quote }} 15 | {{- with .priorityClassName }} 16 | priorityClassName: {{ . | quote }} 17 | {{- end }} 18 | {{- with .host }} 19 | hostNetwork: {{ .network }} 20 | hostPID: {{ .pid }} 21 | hostIPC: {{ .ipc }} 22 | {{- end }} 23 | {{- with .hostAliases }} 24 | hostAliases: 25 | {{- range . }} 26 | - ip: {{ .ip | quote }} 27 | hostnames: 28 | {{- range .hostnames }} 29 | - {{ . | quote }} 30 | {{- end }} 31 | {{- end }} 32 | {{- end }} 33 | {{- with .securityContext }} 34 | securityContext: 35 | runAsNonRoot: {{ .runAsNonRoot }} 36 | {{- end }} 37 | {{- end }} 38 | {{- with $controller.schedule }} 39 | {{- template "schedule" $controller.schedule }} 40 | {{- end }} 41 | {{- with $controller.volumes }} 42 | volumes: 43 | {{- template "volumes" (list $controller.volumes $name) }} 44 | {{- end }} 45 | {{- with $controller.initContainers }} 46 | initContainers: 47 | {{- template "containers" (list $controller.initContainers "i") }} 48 | {{- end }} 49 | {{- with $controller.containers }} 50 | containers: 51 | {{- template "containers" (list $controller.containers "c") }} 52 | {{- end }} 53 | {{- end -}} 54 | 55 | 56 | 57 | 58 | {{/* containers generates all containers for a pod */}} 59 | {{- define "containers" -}} 60 | {{- $containers := index . 0 -}} 61 | {{- $prefix := index . 1 -}} 62 | 63 | {{- range $index, $container := $containers -}} 64 | {{- with $container }} 65 | - name: {{ .name | default (printf "%s%d" $prefix $index) | quote }} 66 | image: {{ .image | quote }} 67 | imagePullPolicy: {{ .imagePullPolicy | quote }} 68 | tty: {{ .tty }} 69 | command: 70 | {{- range .command }} 71 | - {{ . | quote }} 72 | {{- end }} 73 | args: 74 | {{- range .args }} 75 | - {{ . | quote }} 76 | {{- end }} 77 | workingDir: {{ .workingDir | quote }} 78 | {{- with .securityContext }} 79 | securityContext: 80 | privileged: {{ .privileged }} 81 | {{- with .capabilities }} 82 | capabilities: 83 | add: 84 | {{- range .add }} 85 | - {{ . | quote }} 86 | {{- end }} 87 | drop: 88 | {{- range .drop }} 89 | - {{ . | quote }} 90 | {{- end }} 91 | {{- end }} 92 | {{- end }} 93 | ports: 94 | {{- range .ports }} 95 | - name: {{ (printf "%s-%.0f" .protocol .port) | lower | quote }} 96 | {{- if eq .protocol "UDP" }} 97 | protocol: "UDP" 98 | {{- else }} 99 | protocol: "TCP" 100 | {{- end }} 101 | containerPort: {{ .port }} 102 | hostPort: {{ .hostPort }} 103 | {{- end }} 104 | envFrom: 105 | {{- include "envfile" .envFrom | indent 2 }} 106 | env: 107 | {{- include "downwardenv" .downwardPrefix | indent 2 }} 108 | {{- include "env" .env | indent 2 }} 109 | resources: 110 | {{- include "resources" .resources | indent 4 }} 111 | volumeMounts: 112 | {{- range .mounts}} 113 | - name: {{ .name | quote }} 114 | readOnly: {{ .readonly }} 115 | mountPath: {{ .path | quote }} 116 | subPath: {{ .subpath | quote }} 117 | mountPropagation: {{ .propagation | quote }} 118 | {{- end }} 119 | {{- if .probe }} 120 | {{- if .probe.liveness }} 121 | livenessProbe: 122 | {{- include "probe" .probe.liveness | indent 4}} 123 | {{- end }} 124 | {{- if .probe.readiness }} 125 | readinessProbe: 126 | {{- include "probe" .probe.readiness | indent 4}} 127 | {{- end }} 128 | {{- end }} 129 | {{- if .lifecycle }} 130 | lifecycle: 131 | {{- if .lifecycle.postStart }} 132 | postStart: 133 | {{- include "handler" .lifecycle.postStart | indent 6}} 134 | {{- end }} 135 | {{- if .lifecycle.preStop }} 136 | preStop: 137 | {{- include "handler" .lifecycle.preStop | indent 6}} 138 | {{- end }} 139 | {{- end }} 140 | {{- end -}} 141 | {{- end -}} 142 | {{- end -}} 143 | 144 | 145 | 146 | {{- define "envfile" -}} 147 | {{- range . }} 148 | - prefix: {{ .prefix | quote }} 149 | {{ if eq .type "Config" -}} 150 | configMapRef: 151 | {{- else }} 152 | secretRef: 153 | {{- end }} 154 | optional: {{ .optional }} 155 | name: {{ .name | quote }} 156 | {{- end -}} 157 | {{- end -}} 158 | 159 | 160 | {{- define "env" -}} 161 | {{- range . }} 162 | - name: {{ .name | quote }} 163 | value: {{ .value | quote }} 164 | {{- with .from }} 165 | valueFrom: 166 | {{ if eq .type "ResourceFieldRef" -}} 167 | resourceFieldRef: 168 | resource: {{ .resource | quote }} 169 | {{- else if eq .type "Secret" -}} 170 | secretKeyRef: 171 | name: {{ .name | quote }} 172 | key: {{ .key | quote }} 173 | optional: {{ .optional }} 174 | {{- else -}} 175 | configMapKeyRef: 176 | name: {{ .name | quote }} 177 | key: {{ .key | quote }} 178 | optional: {{ .optional }} 179 | {{- end -}} 180 | {{- end -}} 181 | {{- end -}} 182 | {{- end -}} 183 | 184 | 185 | {{- define "downwardenv" -}} 186 | {{- $prefix := . | default "" }} 187 | - name: {{ printf "%sPOD_NAMESPACE" $prefix | quote }} 188 | valueFrom: 189 | fieldRef: 190 | fieldPath: metadata.namespace 191 | - name: {{ printf "%sPOD_NAME" $prefix | quote }} 192 | valueFrom: 193 | fieldRef: 194 | fieldPath: metadata.name 195 | - name: {{ printf "%sPOD_IP" $prefix | quote }} 196 | valueFrom: 197 | fieldRef: 198 | fieldPath: status.podIP 199 | - name: {{ printf "%sNODE_NAME" $prefix | quote }} 200 | valueFrom: 201 | fieldRef: 202 | fieldPath: spec.nodeName 203 | {{- end -}} 204 | 205 | {{- define "resources" -}} 206 | {{- with .requests }} 207 | requests: 208 | {{- range $k, $v := . }} 209 | {{- if eq $k "gpu" }} 210 | "nvidia.com/gpu": {{ $v | quote }} 211 | {{- else }} 212 | {{ $k | quote }}: {{ $v | quote }} 213 | {{- end}} 214 | {{- end}} 215 | {{- end }} 216 | {{- with .limits }} 217 | limits: 218 | {{- range $k, $v := . }} 219 | {{- if eq $k "gpu" }} 220 | "nvidia.com/gpu": {{ $v | quote }} 221 | {{- else }} 222 | {{ $k | quote }}: {{ $v | quote }} 223 | {{- end}} 224 | {{- end}} 225 | {{- end }} 226 | {{- end -}} 227 | 228 | 229 | 230 | 231 | {{- define "probe" }} 232 | initialDelaySeconds: {{ .delay }} 233 | timeoutSeconds: {{ .timeout }} 234 | periodSeconds: {{ .period }} 235 | {{- if .threshold }} 236 | successThreshold: {{ .threshold.success }} 237 | failureThreshold: {{ .threshold.failure }} 238 | {{- end }} 239 | {{- template "handler" .handler }} 240 | {{- end -}} 241 | 242 | {{- define "handler" -}} 243 | {{- if eq .type "EXEC" }} 244 | exec: 245 | command: 246 | {{- range .method.command }} 247 | - {{ . | quote }} 248 | {{- end }} 249 | {{- end }} 250 | {{- if eq .type "HTTP" }} 251 | httpGet: 252 | scheme: {{ .method.scheme | quote }} 253 | host: {{ .method.host | quote }} 254 | port: {{ .method.port }} 255 | path: {{ .method.path | quote }} 256 | httpHeaders: 257 | {{- range .method.headers }} 258 | - name: {{ .name | quote }} 259 | value: {{ .value | quote }} 260 | {{- end }} 261 | {{- end }} 262 | {{- if eq .type "TCP" }} 263 | tcpSocket: 264 | port: {{ .method.port }} 265 | {{- end }} 266 | {{- end -}} 267 | 268 | -------------------------------------------------------------------------------- /stable/application/BookInfo/0.0.1/config.json: -------------------------------------------------------------------------------- 1 | {"name":"Bookinfo","description":"BookInfo 是一个简易的在线书店应用,展示了\n如 ISBN,页数等书籍信息及用户评论。\n","data":"{\"vertexes\":[{\"metadata\":{\"index\":1,\"name\":\"\",\"alias\":\"productpage\",\"memos\":{\"style\":{\"left\":660,\"top\":182}}},\"spec\":{\"description\":\"The productpage microservice calls the details and reviews microservices to populate the page.\",\"config\":{\"metadata\":{\"position\":{\"cluster\":\"\",\"partition\":\"\"},\"alias\":\"productpage\",\"name\":\"\",\"description\":\"The productpage microservice calls the details and reviews microservices to populate the page.\",\"version\":\"\",\"space\":\"\"},\"controllers\":[{\"type\":\"Deployment\",\"controller\":{\"replica\":1,\"strategy\":{\"disabled\":\"enabled\",\"type\":\"RollingUpdate\",\"unavailable\":0,\"surge\":1,\"ready\":0},\"name\":\"\",\"domain\":\"\"},\"pod\":{\"dns\":\"ClusterFirst\",\"termination\":30,\"network\":false,\"host\":{\"network\":false,\"pid\":false,\"ipc\":false},\"isPrivilege\":false,\"securityContext\":{\"runAsNonRoot\":false}},\"schedule\":{\"labels\":[{}]},\"services\":[{\"type\":\"ClusterIP\",\"ports\":[{\"protocol\":\"HTTP\",\"targetPort\":9080}],\"name\":\"productpage\"}],\"monitor\":{\"type\":\"exporter\",\"__isMonitor\":false,\"prometheus\":{\"exporter\":\"\",\"port\":\"\",\"path\":\"\",\"container\":{\"env\":[]}}},\"containers\":[{\"__isEnvCustom\":false,\"env\":[],\"__isEnvFrom\":false,\"envFrom\":[{\"name\":\"\"}],\"image\":\"IMAGE_REPOSITORY/library/examples-bookinfo-productpage-v1:1.8.0\",\"imagePullPolicy\":\"Always\",\"command\":\"\",\"__isMountFile\":false,\"mountFile\":[],\"__isLog\":false,\"fileLog\":[],\"__liveness\":false,\"__readiness\":false,\"probe\":{\"liveness\":{\"delay\":0,\"timeout\":1,\"period\":10,\"threshold\":{\"success\":1,\"failure\":3},\"handler\":{\"type\":\"HTTP\",\"method\":{\"scheme\":\"HTTP\",\"host\":\"\",\"port\":\"\",\"path\":\"\",\"openHeader\":false,\"headers\":[]}}},\"readiness\":{\"delay\":0,\"timeout\":1,\"period\":10,\"threshold\":{\"success\":1,\"failure\":3},\"handler\":{\"type\":\"HTTP\",\"method\":{\"scheme\":\"HTTP\",\"host\":\"\",\"port\":\"\",\"path\":\"\",\"openHeader\":false,\"headers\":[]}}}},\"mounts\":[{\"name\":\"volume-0\"}],\"resources\":{\"requests\":{\"cpu\":\"0.1\",\"memory\":\"128Mi\"},\"limits\":{\"cpu\":\"0.2\",\"memory\":\"256Mi\"}}}],\"volumes\":[{\"name\":\"volume-0\",\"source\":{\"class\":\"\",\"target\":\"\"},\"storage\":{\"request\":\"\",\"limit\":\"\"},\"type\":\"Static\"}],\"initContainers\":[]}]}}},{\"metadata\":{\"index\":2,\"name\":\"\",\"alias\":\"details\",\"memos\":{\"style\":{\"left\":362,\"top\":63}}},\"spec\":{\"description\":\"The details microservice contains book information.\",\"config\":{\"metadata\":{\"position\":{\"cluster\":\"\",\"partition\":\"\"},\"alias\":\"details\",\"name\":\"\",\"description\":\"The details microservice contains book information.\",\"version\":\"\",\"space\":\"\"},\"controllers\":[{\"type\":\"Deployment\",\"controller\":{\"replica\":1,\"strategy\":{\"disabled\":\"enabled\",\"type\":\"RollingUpdate\",\"unavailable\":0,\"surge\":1,\"ready\":0},\"name\":\"\",\"domain\":\"\"},\"pod\":{\"dns\":\"ClusterFirst\",\"termination\":30,\"network\":false,\"host\":{\"network\":false,\"pid\":false,\"ipc\":false},\"isPrivilege\":false,\"securityContext\":{\"runAsNonRoot\":false}},\"schedule\":{\"labels\":[{}]},\"services\":[{\"type\":\"ClusterIP\",\"ports\":[{\"protocol\":\"HTTP\",\"targetPort\":9080}],\"name\":\"details\"}],\"monitor\":{\"type\":\"exporter\",\"__isMonitor\":false,\"prometheus\":{\"exporter\":\"\",\"port\":\"\",\"path\":\"\",\"container\":{\"env\":[]}}},\"containers\":[{\"__isEnvCustom\":false,\"env\":[],\"__isEnvFrom\":false,\"envFrom\":[{\"name\":\"\"}],\"image\":\"IMAGE_REPOSITORY/library/examples-bookinfo-details-v1:1.8.0\",\"imagePullPolicy\":\"Always\",\"command\":\"\",\"__isMountFile\":false,\"mountFile\":[],\"__isLog\":false,\"fileLog\":[],\"__liveness\":false,\"__readiness\":false,\"probe\":{\"liveness\":{\"delay\":0,\"timeout\":1,\"period\":10,\"threshold\":{\"success\":1,\"failure\":3},\"handler\":{\"type\":\"HTTP\",\"method\":{\"scheme\":\"HTTP\",\"host\":\"\",\"port\":\"\",\"path\":\"\",\"openHeader\":false,\"headers\":[]}}},\"readiness\":{\"delay\":0,\"timeout\":1,\"period\":10,\"threshold\":{\"success\":1,\"failure\":3},\"handler\":{\"type\":\"HTTP\",\"method\":{\"scheme\":\"HTTP\",\"host\":\"\",\"port\":\"\",\"path\":\"\",\"openHeader\":false,\"headers\":[]}}}},\"mounts\":[{\"name\":\"volume-0\"}],\"resources\":{\"requests\":{\"cpu\":\"0.1\",\"memory\":\"128Mi\"},\"limits\":{\"cpu\":\"0.2\",\"memory\":\"256Mi\"}}}],\"volumes\":[{\"name\":\"volume-0\",\"source\":{\"class\":\"\",\"target\":\"\"},\"storage\":{\"request\":\"\",\"limit\":\"\"},\"type\":\"Static\"}],\"initContainers\":[]}]}}},{\"metadata\":{\"index\":3,\"name\":\"\",\"alias\":\"reviews\",\"memos\":{\"style\":{\"left\":363,\"top\":309}}},\"spec\":{\"description\":\"The reviews microservice contains book reviews. It also calls the ratings microservice.\",\"config\":{\"metadata\":{\"position\":{\"cluster\":\"\",\"partition\":\"\"},\"alias\":\"reviews\",\"name\":\"\",\"description\":\"The reviews microservice contains book reviews. It also calls the ratings microservice.\",\"version\":\"\",\"space\":\"\"},\"controllers\":[{\"type\":\"Deployment\",\"controller\":{\"replica\":1,\"strategy\":{\"disabled\":\"enabled\",\"type\":\"RollingUpdate\",\"unavailable\":0,\"surge\":1,\"ready\":0},\"name\":\"\",\"domain\":\"\"},\"pod\":{\"dns\":\"ClusterFirst\",\"termination\":30,\"network\":false,\"host\":{\"network\":false,\"pid\":false,\"ipc\":false},\"isPrivilege\":false,\"securityContext\":{\"runAsNonRoot\":false}},\"schedule\":{\"labels\":[]},\"services\":[{\"type\":\"ClusterIP\",\"ports\":[{\"protocol\":\"HTTP\",\"targetPort\":9080}],\"name\":\"reviews\"}],\"monitor\":{\"type\":\"exporter\",\"__isMonitor\":false,\"prometheus\":{\"exporter\":\"\",\"port\":\"\",\"path\":\"\",\"container\":{\"env\":[]}}},\"containers\":[{\"__isEnvCustom\":false,\"env\":[],\"__isEnvFrom\":false,\"envFrom\":[{\"name\":\"\"}],\"image\":\"IMAGE_REPOSITORY/library/examples-bookinfo-reviews-v1:1.8.0\",\"imagePullPolicy\":\"Always\",\"command\":\"\",\"__isMountFile\":false,\"mountFile\":[],\"__isLog\":false,\"fileLog\":[],\"__liveness\":false,\"__readiness\":false,\"probe\":{\"liveness\":{\"delay\":0,\"timeout\":1,\"period\":10,\"threshold\":{\"success\":1,\"failure\":3},\"handler\":{\"type\":\"HTTP\",\"method\":{\"scheme\":\"HTTP\",\"host\":\"\",\"port\":\"\",\"path\":\"\",\"openHeader\":false,\"headers\":[]}}},\"readiness\":{\"delay\":0,\"timeout\":1,\"period\":10,\"threshold\":{\"success\":1,\"failure\":3},\"handler\":{\"type\":\"HTTP\",\"method\":{\"scheme\":\"HTTP\",\"host\":\"\",\"port\":\"\",\"path\":\"\",\"openHeader\":false,\"headers\":[]}}}},\"mounts\":[{\"name\":\"volume-0\"}],\"resources\":{\"requests\":{\"cpu\":\"0.1\",\"memory\":\"128Mi\"},\"limits\":{\"cpu\":\"0.2\",\"memory\":\"256Mi\"}}}],\"volumes\":[{\"name\":\"volume-0\",\"source\":{\"class\":\"\",\"target\":\"\"},\"storage\":{\"request\":\"\",\"limit\":\"\"},\"type\":\"Static\"}],\"initContainers\":[]}]}}},{\"metadata\":{\"index\":4,\"name\":\"\",\"alias\":\"ratings\",\"memos\":{\"style\":{\"left\":38,\"top\":162}}},\"spec\":{\"description\":\"The ratings microservice contains book ranking information that accompanies a book review.\",\"config\":{\"metadata\":{\"position\":{\"cluster\":\"\",\"partition\":\"\"},\"alias\":\"ratings\",\"name\":\"\",\"description\":\"The ratings microservice contains book ranking information that accompanies a book review.\",\"version\":\"\",\"space\":\"\"},\"controllers\":[{\"type\":\"Deployment\",\"controller\":{\"replica\":1,\"strategy\":{\"disabled\":\"enabled\",\"type\":\"RollingUpdate\",\"unavailable\":0,\"surge\":1,\"ready\":0},\"name\":\"\",\"domain\":\"\"},\"pod\":{\"dns\":\"ClusterFirst\",\"termination\":30,\"network\":false,\"host\":{\"network\":false,\"pid\":false,\"ipc\":false},\"isPrivilege\":false,\"securityContext\":{\"runAsNonRoot\":false}},\"schedule\":{\"labels\":[]},\"services\":[{\"type\":\"ClusterIP\",\"ports\":[{\"protocol\":\"HTTP\",\"targetPort\":9080}],\"name\":\"ratings\"}],\"monitor\":{\"type\":\"exporter\",\"__isMonitor\":false,\"prometheus\":{\"exporter\":\"\",\"port\":\"\",\"path\":\"\",\"container\":{\"env\":[]}}},\"containers\":[{\"__isEnvCustom\":false,\"env\":[],\"__isEnvFrom\":false,\"envFrom\":[{\"name\":\"\"}],\"image\":\"IMAGE_REPOSITORY/library/examples-bookinfo-ratings-v1:1.8.0\",\"imagePullPolicy\":\"Always\",\"command\":\"\",\"__isMountFile\":false,\"mountFile\":[],\"__isLog\":false,\"fileLog\":[],\"__liveness\":false,\"__readiness\":false,\"probe\":{\"liveness\":{\"delay\":0,\"timeout\":1,\"period\":10,\"threshold\":{\"success\":1,\"failure\":3},\"handler\":{\"type\":\"HTTP\",\"method\":{\"scheme\":\"HTTP\",\"host\":\"\",\"port\":\"\",\"path\":\"\",\"openHeader\":false,\"headers\":[]}}},\"readiness\":{\"delay\":0,\"timeout\":1,\"period\":10,\"threshold\":{\"success\":1,\"failure\":3},\"handler\":{\"type\":\"HTTP\",\"method\":{\"scheme\":\"HTTP\",\"host\":\"\",\"port\":\"\",\"path\":\"\",\"openHeader\":false,\"headers\":[]}}}},\"mounts\":[{\"name\":\"volume-0\"}],\"resources\":{\"requests\":{\"cpu\":\"0.1\",\"memory\":\"128Mi\"},\"limits\":{\"cpu\":\"0.2\",\"memory\":\"256Mi\"}}}],\"volumes\":[{\"name\":\"volume-0\",\"source\":{\"class\":\"\",\"target\":\"\"},\"storage\":{\"request\":\"\",\"limit\":\"\"},\"type\":\"Static\"}],\"initContainers\":[]}]}}}],\"edges\":[{\"from\":4,\"to\":2},{\"from\":4,\"to\":3},{\"from\":2,\"to\":1},{\"from\":3,\"to\":1}]}","annotations":{"serverCount":"4"},"labels":{},"version":"0.0.1"} 2 | 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | **Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* 4 | 5 | - [Chart 模版配置规范定义(v1.0.0)](#chart-%E6%A8%A1%E7%89%88%E9%85%8D%E7%BD%AE%E8%A7%84%E8%8C%83%E5%AE%9A%E4%B9%89v100) 6 | - [概述](#%E6%A6%82%E8%BF%B0) 7 | - [基础结构描述](#%E5%9F%BA%E7%A1%80%E7%BB%93%E6%9E%84%E6%8F%8F%E8%BF%B0) 8 | - [配置控制器定义](#%E9%85%8D%E7%BD%AE%E6%8E%A7%E5%88%B6%E5%99%A8%E5%AE%9A%E4%B9%89) 9 | - [类型:controller](#%E7%B1%BB%E5%9E%8Bcontroller) 10 | - [controller:Deployment](#controllerdeployment) 11 | - [controller:StatefulSet](#controllerstatefulset) 12 | - [controller:DaemonSet](#controllerdaemonset) 13 | - [controller:Job](#controllerjob) 14 | - [controller:CronJob](#controllercronjob) 15 | - [类型:schedule](#%E7%B1%BB%E5%9E%8Bschedule) 16 | - [类型:pod](#%E7%B1%BB%E5%9E%8Bpod) 17 | - [类型:initContainer,container](#%E7%B1%BB%E5%9E%8Binitcontainercontainer) 18 | - [probe:liveness,readiness](#probelivenessreadiness) 19 | - [handler:liveness,readiness,postStart,preStop](#handlerlivenessreadinesspoststartprestop) 20 | - [method:EXEC](#methodexec) 21 | - [method:HTTP](#methodhttp) 22 | - [method:TCP](#methodtcp) 23 | - [类型:volume](#%E7%B1%BB%E5%9E%8Bvolume) 24 | - [source:Dynamic,Dedicated](#sourcedynamicdedicated) 25 | - [source:Static](#sourcestatic) 26 | - [source:Scratch](#sourcescratch) 27 | - [source:Config,Secret](#sourceconfigsecret) 28 | - [source:HostPath](#sourcehostpath) 29 | - [source:Glusterfs](#sourceglusterfs) 30 | - [类型:service](#%E7%B1%BB%E5%9E%8Bservice) 31 | - [类型:config](#%E7%B1%BB%E5%9E%8Bconfig) 32 | - [类型:secret](#%E7%B1%BB%E5%9E%8Bsecret) 33 | - [一个配置文件的例子](#%E4%B8%80%E4%B8%AA%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%E7%9A%84%E4%BE%8B%E5%AD%90) 34 | 35 | 36 | 37 | # Chart 模版配置规范定义(v1.0.0) 38 | 39 | ### 概述 40 | 规范主要用于定义 Chart 配置文件 values.yaml 的逻辑结构和类型。 41 | 我们将一个 Chart 包含的内容定义为一个应用,一个应用通常包含 Pod Controller,Service,Config,Volume 四块主要内容: 42 | - Pod Controller:Deployment,StatefulSet,DaemonSet,Job,CronJob 43 | - Service:Service 44 | - Config:ConfigMap,Secret 45 | - Volume:PVC,ConfigMap,Secret,EmptyDir 46 | 47 | 上述的对应关系并没有包含所有的 Kubernetes 资源,即我们认为其他资源是与应用是弱/无耦合的。 48 | 并且其中 ConfigMap,Secret 也不是由 Chart 主动创建的,而是应当在应用创建之前就应该在集群中存在,并由应用引用,产生单向依赖。 49 | 50 | ### 基础结构描述 51 | 配置文件使用 yaml 格式,并且在实际使用中转换为 json 格式。 52 | 标准配置文件结构如下: 53 | 54 | ```yaml 55 | # 顶级配置 key ,固定为 _config 56 | _config: 57 | # 在配置文件中,所有以 _ 开头的字段用于存储特殊信息。 58 | # 模板元数据,表示当前配置所属的 Chart 信息,此处数据用于存储模版最原始的信息 59 | _metadata: 60 | name: string # Chart 创建时的名称,不随 Chart 更新而更新 61 | version: semvar # Chart 创建时的版本号,不随 Chart 更新而更新 62 | description: string # Chart 创建时的描述,不随 Chart 更新而更新 63 | template: # Chart 模板信息,为模板自动升级提供信息 64 | type: string # Chart 模板类型 65 | version: semvar # Chart 模板版本号 66 | appVersion: string # Chart 创建 workload 时的版本号,会添加到 pod 的 label 中,目前多用于灰度发布。 67 | # 配置控制器组,配置控制器组可以包含多个配置控制器 68 | # 此处的配置控制器与上面所描述的 Pod Controller 不同,此处的配置控制器具有如下等价关系: 69 | # 配置控制器 = 1个 Pod Controller 配置 + 70 | # 1个 调度 配置 + 71 | # 1个 容器组 配置 + 72 | # 0个或多个 初始化容器 配置 + 73 | # 1个或多个 基本容器 配置 + 74 | # 0个或多个 数据卷 配置 + 75 | # 0个或多个 服务 配置 76 | controllers: 77 | - type: string # 指定控制器的类型,可以是 Deployment,StatefulSet,DaemonSet,Job,CronJob 78 | controller: # 控制器信息,对应特定 type 的控制器信息 79 | ... 80 | schedule: # 调度信息,用于控制容器组的调度 81 | ... 82 | pod: # 容器组信息,指定当前控制器下的所有容器(包括 initializers 和 containers)共享的设置内容 83 | ... 84 | initContainers: # 初始化容器数组,可用于放置仅用于初始化阶段的容器,比如初始化数据 85 | - ... 86 | containers: # 基本容器数组,用于放置真正执行工作的容器 87 | - ... 88 | volumes: # 数据卷描述信息数组,这部分数据卷可以被多个容器共享访问 89 | - ... 90 | services: # 服务信息数组,当前控制器内的容器需要暴露服务时,在这里添加服务。一个控制器可有多个服务 91 | - ... 92 | configs: # 配置信息数组 93 | - ... 94 | secrets: # 加密配置信息数组 95 | - ... 96 | chartX: 97 | # 子模版 chartX 的配置,其结构与上面的 _config 相同 98 | _config: 99 | ... 100 | ``` 101 | `_metadata`仅仅用于描述模板的基本信息。 102 | - name,version,description 用于描述 Chart 的原始信息。用于从配置直接创建 Chart。 103 | - template 用于描述 Chart 的模板信息。主要用于实现 Chart 的创建和升级。template 发生功能变更后,可依据模板名称和版本号进行升级。 104 | 105 | ### 配置控制器定义 106 | 107 | 字段类型定义: 108 | 109 | ``` 110 | int: 整数 111 | uint: 自然数 112 | pint: 正整数 113 | float: 实数 114 | string: 字符串 115 | bool: 布尔值,只能是 true 或 false 116 | ``` 117 | 默认值声明方式: 118 | 119 | ``` 120 | 类型(默认值) 121 | int(-1) 122 | uint(0) 123 | pint(1) 124 | float(3.14) 125 | string("default value") 126 | bool(true) 127 | ``` 128 | 所有有默认值的字段都是 Optional 的。 129 | 130 | #### 类型:controller 131 | 132 | 所有类型的 controller 共有字段如下: 133 | 134 | ```yaml 135 | annotations: # 控制器附加信息,仅用于保存控制器额外信息 136 | - key: string # 键 137 | value: string # 值 138 | ``` 139 | key 必须符合如下要求: 140 | 141 | ``` 142 | 1. `前缀/键`或者`键`,比如 `caicloud.io/apple`和`apple` 143 | 2. 前缀是域名形式,必须符合 DNS_SUBDOMAIN,即`(([A-Za-z0-9][-A-Za-z0-9]*)?[A-Za-z0-9]\.)*([A-Za-z0-9][-A-Za-z0-9]*)?[A-Za-z0-9]` 144 | 3. 键必须符合 ([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9] 145 | ``` 146 | 147 | ##### controller:Deployment 148 | ```yaml 149 | name: string("") # 实例前缀名,控制器名称 150 | replica: uint(1) # 实例数量 151 | strategy: # 实例滚动更新策略,两个选项不能同时为0 152 | type: string("RollingUpdate") # 更新策略,只能为 RollingUpdate(滚动更新) 或者 Recreate(重新创建) 153 | unavailable: uint(0) # 最大不可用数量 154 | surge: uint(1) # 最大超量 155 | ready: uint(0) # 实例从 Available 到 Ready 的最短时间 156 | ``` 157 | 一个实例在运行时等价于一个容器组,可以通过 replica 指定需要的实例数量,即可在集群中同时跑多个实例。 158 | 当实例的配置需要更新时,根据更新策略决定如何重启实例。unavailable 表明当前控制器可以先关闭多少个运行中的实例。surge 表示当前控制器可以在 replica 的基础上多创建多少个新的实例。即在滚动更新过程中,实例的数量可能在[max(replica-unavailable,0),replica+surge]区间。 159 | 160 | ##### controller:StatefulSet 161 | ```yaml 162 | replica: uint(1) # 实例数量 163 | name: string("") # 实例前缀名,控制器名称 164 | domain: string("") # 实例域名 165 | strategy: # 实例滚动更新策略 166 | type: string("RollingUpdate") # 更新策略,只能为 RollingUpdate(滚动更新) 或者 OnDelete(删除时更新) 167 | rollingUpdate: # 滚动更新配置,只有当 RollingUpdate 时才可以此选项 168 | partition: uint(0) # 分段更新序号 169 | podManagementPolicy: string("OrderedReady") # Pod 管理策略, 只能为 OrderedReady 或 Parallel 170 | ``` 171 | 指定 name 和 domain 后,可通过 name-序号.domain 的形式访问每个实例。 172 | 比如 replica = 2, name = "web", domain = "cluster", 那么同一个分区内可使用 web-0.cluster,web-1.cluster 访问两个实例,同时能够直接使用 cluster 访问任意一个实例(RoundRobin)。 173 | 由于前缀名称和域名具有分区范围内的唯一性,因此同一个分区内的应用不能具有相同的 name 和 domain。同时由于 domain 能够被用于访问任意一个实例,因此也不能与同一分区下的 services 冲突。 174 | 175 | ##### controller:DaemonSet 176 | ```yaml 177 | name: string("") # 实例前缀名,控制器名称 178 | strategy: # 实例滚动更新策略,两个选项不能同时为0 179 | unavailable: pint(1) # 最大不可用数量 180 | ready: uint(0) # 实例从 Available 到 Ready 的最短时间 181 | ``` 182 | 183 | ##### controller:Job 184 | ```yaml 185 | name: string("") # 实例前缀名,控制器名称 186 | parallelism: pint(1) # 最大并行实例数量 187 | backoffLimit: pint(1) # 失败重试次数 188 | completions: pint(1) # 总共需要完成的实例数量 189 | active: uint(0) # 单个实例执行的最长时间,0表示不限制 190 | ``` 191 | 一个任务可以同时执行多个实例,通过 parallelism 和 completions 可以控制任务是串行执行还是并行执行或是控制并行执行。 192 | - 串行:completions = n, parallelism = 1 即可让 n 个实例串行执行,只有前一个完成后下一个才会执行 193 | - 并行:completions = n, parallelism >= n 即可让 n 个实例同时并行执行 194 | - 控制并行:completions = n, parallelism = k, k < n 即可让 n 个实例同时只有 k 个在执行。其中一个实例完成才能让下一个实例开始执行 195 | 196 | ##### controller:CronJob 197 | ```yaml 198 | name: string("") # 实例前缀名,控制器名称 199 | rule: string # 定时规则,比如 "*/1 * * * *" 200 | deadline: uint(0) # 任务启动超时时间 201 | policy: string("Allow") # 任务并发策略,Allow,Forbid,Replace 202 | suspend: bool(false) # 是否暂停当前定时任务 203 | history: # 任务执行历史保留选项 204 | success: uint(0) # 执行成功的任务保留数量 205 | fail: uint(0) # 执行失败的任务保留数量 206 | parallelism: pint(1) # 最大并行实例数量 207 | backoffLimit: pint(1) # 失败重试次数 208 | completions: pint(1) # 总共需要完成的实例数量 209 | active: uint(0) # 单个实例执行的最长时间,0表示不限制 210 | ``` 211 | 定时任务规则格式参考:https://en.wikipedia.org/wiki/Cron 212 | 定时任务启动超时时间: 213 | 举个例子,定时任务设置在每天 8:00:00 执行一次,然后这个字段设置为 10 秒,那么在 8:00:00 - 8:00:10 这个期间内,如果发生了某个特殊的事情,比如 kubernetes 的 定时器 在 7:59:59 - 8:00:11 这个时间段内一直是崩溃的,那么这个定时任务的这一次触发就会被错过,然后就会在定时任务的失败任务数量上加1。 214 | 定时任务使用一个 rule 来控制任务的执行。当一个任务未尚未完成,定时器又触发的时候通过 policy 来控制任务的执行方式: 215 | - Allow:上次触发的任务和本次触发的任务一起执行 216 | - Forbid:如果上次的任务尚未完成,那么跳过本次任务的执行 217 | - Replace:取消上次的任务,并开始执行本次的任务 218 | 219 | #### 类型:schedule 220 | ```yaml 221 | scheduler: string("") # 调度器名称,可选项为 空字符串,为空表示使用默认调度器 222 | labels: # 控制器及 容器组 标签 223 | string: string 224 | affinity: # 亲和性设置 225 | pod: 226 | type: string("Required") # 类型可以为 Required 或 Prefered 227 | terms: 228 | - weight: pint # 权重,只有类型为 Prefered 时可以设置该字段,[1-100] 229 | topologyKey: string("kubernetes.io/hostname") # 拓补域 230 | namespaces: # 指定分区,不指定表示仅在当前分区 231 | - string 232 | selector: # 选择器,用于设置匹配的标签 233 | labels: # 直接指定标签值 234 | string: string 235 | expressions: # 通过表达式查找标签 236 | - key: string 237 | operator: string # 操作符 In,NotIn,Exists,DoesNotExist 238 | values: # 标签值列表 239 | - string 240 | node: 241 | type: string("Required") # 类型可以为 Required 或 Prefered 242 | terms: 243 | - weight: 10 # 权重,只有类型为 Prefered 时可以设置该字段,[1-100] 244 | expressions: # 通过表达式查找标签,表达式为 AND 表达式 245 | - key: string # 这里的 key 不会自动加上前缀 246 | operator: string # 操作符 In,NotIn,Exists,DoesNotExist,Gt,Lt 247 | values: 248 | - string 249 | antiaffinity: 250 | pod: # 反亲和性设置与亲和性设置相同 251 | ... 252 | 253 | tolerations: # 节点容忍设置 254 | - key: string("key") # key 值 255 | operator: string("Equal") # 与 taint value 值的关系,可以为 Equal,Exists 默认为 Equal 256 | value: string("value") # value 值 257 | effect: string("NoSchedule") # 与 taint value 不匹配的之后的调度策略,可以为 NoSchedule PreferNoSchedule NoExecute 258 | tolerationSeconds: uint(60) # 在 effect 为 NoExecute 时,如果不能忍受 taint, pod 在被驱逐之前可以继续在这个节点运行的时间。 259 | ``` 260 | topologyKey 具有如下值: 261 | 262 | ``` 263 | kubernetes.io/hostname 264 | failure-domain.beta.kubernetes.io/zone 265 | failure-domain.beta.kubernetes.io/region 266 | ``` 267 | 268 | 拓补域用于定义一个节点集合。目前常用的拓补域的 key 有如上三种。拓补域与 Pod 的 亲和性/反亲和性 相关。 269 | 一个拓补域至少有一个节点,所有的 亲和性/反亲和性 的权重计算都是在一个域中进行。 270 | 比如有多个域,当一个 Pod 在调度时,调度器会根据 亲和性/反亲和性 的设置,在多个域中寻找一个权重最高的域,然后将 Pod 调度到该域中的一个节点上。 271 | `kubernetes.io/hostname`与其他两个稍有不同。这个 key 在每个节点上都有不同的值,也就是说,集群里的每个节点都构成了只有一个节点的域。 272 | 273 | 容忍策略 NoExecute 尚未实现。 274 | 275 | 276 | #### 类型:pod 277 | ```yaml 278 | restart: string("Always") # 重启策略,可以为 Always,OnFailure,Never 279 | dns: string("ClusterFirst") # DNS 策略,可以为 Default,ClusterFirstWithHostNet,ClusterFirst 280 | hostname: string("") # 主机名 281 | subdomain: string("") # 子域名 282 | termination: uint(30) # 优雅退出时间 283 | serviceAccountName: string("") # ServiceAccount 284 | priorityClassName: string("") # PriorityClassName 285 | host: 286 | network: bool(false) # 与主机共享 network namespace 287 | pid: bool(false) # 与主机共享 pid namespace 288 | ipc: bool(false) # 与主机共享 ipc namespace 289 | hostAliases: # 向容器组的 /etc/hosts 文件添加条目 290 | - ip: string # IP 地址 291 | hostnames: # 主机名列表 292 | - string 293 | securityContext: 294 | runAsNonRoot: bool(false) # 是否以非 root 用户运行 295 | annotations: # 容器组附加信息,仅用于保存容器组额外信息 296 | - key: string # 键 297 | value: string # 值 298 | 299 | ``` 300 | 在 controller 类型为 Deployment 时,restart 只能为 Always。 301 | 主机名和子域名构成 Pod 的访问域名:hostname.subdomain.namespace.svc.clusterdomain。 302 | 容器组的 annotations 用于存放用于扩展容器组能力的额外信息。可以被其他组件读取和识别,实现其他功能。 303 | key 的规范参考 [controller 的 annotations](#类型controller) 304 | 305 | 306 | #### 类型:initContainer,container 307 | ```yaml 308 | name: string("") # 容器名称 309 | image: string # 镜像地址 310 | imagePullPolicy: string(Always) # 镜像拉取策略,可以设置为 Always,IfNotPresent 311 | tty: bool(false) # 是否使用 tty 312 | command: # 即 Docker EntryPoint 313 | - string 314 | args: # 即 Docker CMD 315 | - string 316 | workingDir: string("") # 工作目录 317 | securityContext: 318 | privileged: bool(false) # 是否启动特权模式 319 | capabilities: # POISX CAP 320 | add: # 添加 POISX CAP 321 | - string 322 | drop: # 移除 POISX CAP 323 | - string 324 | ports: # 容器端口 325 | - port: pint(80) # 端口 326 | hostPort: pint(0) # 暴露到主机端口 327 | protocol: string("HTTP") # 端口协议,可以是 HTTP,HTTPS,TCP,UDP 328 | envFrom: # env from,来自 Config 或 Secret 329 | - prefix: string("") # 所有来自 目标 的 key 都会加这个前缀 330 | type: string("Config") # 配置来源,可以是 Config 或 Secret 331 | name: string # Config 或 Secret 的名称 332 | optional: bool(false) # 是否可选,即目标不存在也就忽略而不是报错 333 | downwardPrefix: string("") # 默认环境变量前缀 334 | env: # env 335 | - name: string # 环境变量名称 336 | value: string # 环境变量值 337 | from: # value 和 from 只能二选其一 338 | type: string("Config") # 来源类型 339 | name: string # Config 或 Secret 的名称 340 | key: string # data 的 key 341 | resource: string # type 为 ResourceFieldRef 时用的值 342 | optional: bool(false) # 是否可选,即目标不存在也就忽略而不是报错 343 | resources: # 资源限制 344 | requests: # 请求的资源下限 345 | cpu: string("100m") # CPU 资源 346 | memory: string("100Mi") # 内存资源 347 | storage: string("") # 存储资源 348 | gpu: string("") # GPU 资源,Deprecated。建议使用 nvidia.com/gpu 349 | nvidia.com/gpu: string("") # NVIDIA GPU 资源 350 | caicloud.io/local-storage: "0" # 本地存储资源,只是作为标记、影响调度,并无实际意义 351 | limits: # 请求的资源上限 352 | cpu: string("100m") # CPU 资源 353 | memory: string("100Mi") # 内存资源 354 | storage: string("") # 存储资源 355 | gpu: string("") # GPU 资源,Deprecated。建议使用 nvidia.com/gpu 356 | nvidia.com/gpu: string("") # NVIDIA GPU 资源 357 | caicloud.io/local-storage: "0" # 本地存储资源,只是作为标记、影响调度,并无实际意义 358 | mounts: # 挂载数据卷位置 359 | - name: string # 数据卷名称 360 | readonly: bool(false) # 是否只读 361 | path: string # 挂载路径 362 | subpath: string("") # 挂载的数据卷子路径 363 | propagation: string("None") # 挂载传播类型,可选项为 None,HostToContainer,Bidirectional 364 | probe: # 健康检查 365 | liveness: # 存活检查(参考 probe 设置) 366 | ... 367 | readiness: # 可读检查(参考 probe 设置) 368 | ... 369 | lifecycle: # 生命周期(参考 handler 设置) 370 | postStart: # 启动后调用,调用失败则重启容器 371 | ... 372 | preStop: # 停止前调用,调用后无论成功失败都会终止容器 373 | ... 374 | ``` 375 | initContainer 不支持 readiness probe 和 lifecycle,因此在 initContainer 中不能设置这几项。 376 | initContainer 是串行执行的,一个成功后才能执行下一个。 377 | 默认的环境变量包括: 378 | 379 | - `POD_NAMESPACE` 380 | - `POD_NAME` 381 | - `POD_IP` 382 | - `NODE_NAME` 383 | 384 | 可以通过 downwardPrefix 为上述环境变量增加前缀。比如 downwardPrefix 为 `ENV_` 时:`POD_NAMESPACE` 变为 `ENV_POD_NAMESPACE`。 385 | 386 | ##### probe:liveness,readiness 387 | ```yaml 388 | handler: # 调用 handler 检查方式 389 | ... 390 | delay: uint(0) # 从容器启动到发送健康检查请求的时间间隔(秒) 391 | timeout: pint(1) # 单次请求的超时时间(秒) 392 | period: pint(10) # 请求时间间隔(秒) 393 | threshold: 394 | success: pint(1) # 连续多少次请求成功则认为健康 395 | failure: pint(3) # 连续多少次请求失败则认为不健康 396 | ``` 397 | 398 | ##### handler:liveness,readiness,postStart,preStop 399 | ```yaml 400 | type: string(HTTP) # handler 类型,可以为 HTTP,EXEC,TCP 401 | method: # handler 方法 402 | ... 403 | ``` 404 | 405 | ###### method:EXEC 406 | ```yaml 407 | command: # 执行命令 408 | - string 409 | ``` 410 | 411 | ###### method:HTTP 412 | ```yaml 413 | scheme: string(HTTP) # HTTP 或 HTTPS 414 | host: string("") # Host 字段,默认是 pod ip, 如果只是想使用域名,请填在 headers 里面 415 | port: pint # 容器端口 416 | path: string # HTTP Path 417 | headers: # 请求头 418 | - name: string # Header 名称 419 | value: string # Header 值 420 | ``` 421 | 对于 `host` 这个字段,在 kubernetes 官网的[解释](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)里面说明,大部分情况下是用不上的,有一种情况是,如果你的 container 监听了 `127.0.0.1` 并且 pod 使用了 hostNetwork,则这个 `host` 需要修改成 `127.0.0.1` 。在其他通用的使用场景中,你的 container 里面提供了多个虚拟域名(如 nginx 反向代理),那么你应该在 `headers` 里面设置 `Host` 的值,而不是使用 `host` 。 422 | 423 | ###### method:TCP 424 | ```yaml 425 | port: pint # TCP 端口 426 | ``` 427 | 428 | 429 | #### 类型:volume 430 | ```yaml 431 | name: string # 数据卷名称,在容器中被引用 432 | type: string("Scratch") # 可选项为 Dedicated,Dynamic,Static,Scratch,Config,Secret,HostPath。Dedicated 仅在控制器为 StatefulSet 时可用 433 | source: # source 的设置与 type 有关 434 | ... 435 | storage: # 存储需求 436 | request: string("5Gi") # 请求的最小存储容量 437 | limit: string("10Gi") # 请求的最大存储容量 438 | ``` 439 | 440 | ##### source:Dynamic,Dedicated 441 | ```yaml 442 | class: string # 存储方案名称 443 | modes: 444 | - string("ReadWriteOnce") # 数据卷读写模式,可以为 ReadWriteOnce,ReadOnlyMany,ReadWriteMany 445 | ``` 446 | Dynamic 和 Dedicated 两种类型的数据卷实际上都是使用存储方案来实现,即通过创建 PVC 并关联 storage class。 447 | 但是 Dynamic 只用于创建单一的 PVC,如果多个容器引用同一个 Dynamic,那么实际上多个副本是共享数据卷的(多副本时 mode 不能为 ReadWriteOnce)。 448 | Dedicated 类型仅用于 StatefulSet 类型的控制器。StatefulSet 会根据 Dedicated 的设置动态创建多个 PVC,并且每个 Pod 会绑定不同的 PVC,即每个 Pod 的数据卷是独立的。 449 | 这两种类型的数据卷在部署后,volume 中的所有字段值都不能进行更改。 450 | 451 | ##### source:Static 452 | ```yaml 453 | target: string # 已创建的数据卷名称 454 | readonly: bool(false) # 是否以只读形式挂载 455 | ``` 456 | Static 类型的数据卷只能用于使用已经创建好数据卷(PVC)。 457 | 458 | ##### source:Scratch 459 | ```yaml 460 | medium: string("") # 存储介质,可以为 空字符串 或 Memory 461 | ``` 462 | Scratch 表示使用临时数据卷 EmptyDir。 463 | 464 | ##### source:Config,Secret 465 | ```yaml 466 | target: string # 已创建的 Config 或 Secret 467 | items: 468 | - key: string # 配置文件 data 中的 key 469 | path: string # 设置 key 对应的值在数据卷中的绝对路径 470 | mode: string("0644") # 文件读写模式,如果这里为空则使用默认文件读写模式 471 | default: string("0644") # 默认文件读写模式 472 | optional: bool(false) # 是否允许指定的 Config 或 Secret 不存在 473 | ``` 474 | Config 和 Secret 表示使用 配置 或 秘钥 作为数据卷。能够指定 配置 和 秘钥 的多个 key 作为文件使用。 475 | 476 | ##### source:HostPath 477 | ```yaml 478 | path: string # 本地文件路径 479 | ``` 480 | 481 | ##### source:Glusterfs 482 | ```yaml 483 | endpoints: string # glusterfs endpoints 484 | path: string # glusterfs volume path 485 | readonly: bool(false) # 是否以只读形式挂载 486 | ``` 487 | 488 | #### 类型:service 489 | ```yaml 490 | name: string # 服务名称 491 | type: string(ClusterIP) # 服务类型,可以是 ClusterIP,NodePort 492 | ports: 493 | - protocol: string(HTTP) # 端口协议,可以是 HTTP,HTTPS,TCP,UDP 494 | targetPort: pint # 容器端口 495 | port: pint # 服务端口 496 | nodePort: uint(0) # 节点端口,[30000,32767] 497 | annotations: # 服务附加信息,仅用于保存服务额外信息 498 | - key: string # 键 499 | value: string # 值 500 | selector: # 服务会将流量路由到标签匹配的 Pod 501 | string: string # 直接指定标签值 502 | sessionAffinity: ClientIP # 会话保持类型 仅支持 ClientIP 和 None 503 | affinityTimeout: 10800 # 会话保持超时时间 单位秒 默认 10800 范围是 (0, 86400] 504 | ``` 505 | 服务可以以两种形式暴露给外部: 506 | - ClusterIP:使用该形式暴露的服务,其它应用可以通过服务名访问当前服务 507 | - NodePort:使用该形式暴露的服务,其它应用可以通过节点 IP 访问当前服务 508 | 509 | 服务类型为 NodePort 时,才可以设置 ports 中的 nodePort 字段。 510 | 服务在部署后,服务名称不可变更。 511 | 512 | #### 类型:config 513 | ```yaml 514 | name: string # 配置名称 515 | data: 516 | - key: string # 键 517 | value: string # 值 518 | ``` 519 | 520 | #### 类型:secret 521 | ```yaml 522 | name: string # 加密配置名称 523 | type: string(Opaque) # 加密配置类型 524 | data: 525 | - key: string # 键 526 | value: string # 值,必须是原始值经过 base64 编码后的字符串 527 | ``` 528 | 529 | 加密配置的类型包括: 530 | 531 | - Opaque:默认加密配置类型,key 可以是任意有效的字符串 532 | - kubernetes.io/service-account-token: ServiceAccount,key 包括 533 | - kubernetes.io/service-account.name 534 | - kubernetes.io/service-account.uid 535 | - token 536 | - kubernetes.kubeconfig 537 | - ca.crt 538 | - namespace 539 | - kubernetes.io/dockercfg: Docker config,key 包括 540 | - .dockercfg 541 | - kubernetes.io/dockerconfigjson: Docker config json,key 包括 542 | - .dockerconfigjson 543 | - kubernetes.io/basic-auth: Basic auth,key 包括 544 | - username 545 | - password 546 | - kubernetes.io/ssh-auth: SSH auth,key 包括 547 | - ssh-privatekey 548 | - kubernetes.io/tls: TLS 证书密钥(PEM),key 包括 549 | - tls.crt 550 | - tls.key 551 | 552 | 553 | ### 一个配置文件的例子 554 | ```yaml 555 | _config: 556 | _metadata: 557 | name: template 558 | version: 1.0.0 559 | description: "A basic template for application" 560 | creationTime: "2017-07-14 12:00:00" 561 | source: "/library/template/1.0.0" 562 | class: Default 563 | template: 564 | type: "template.caicloud.io/application" 565 | version: 1.0.0 566 | controllers: 567 | - type: StatefulSet 568 | controller: 569 | replica: 3 570 | name: "mysqlcluster" 571 | domain: "mysql" 572 | schedule: 573 | labels: 574 | cpu: heavy 575 | io: heavy 576 | affinity: 577 | node: 578 | type: Prefered 579 | terms: 580 | - weight: 10 581 | expressions: 582 | - key: cpu 583 | operator: NotIn 584 | values: 585 | - heavy 586 | - midium 587 | pod: 588 | type: Required 589 | terms: 590 | - selector: 591 | labels: 592 | cpu: heavy 593 | antiaffinity: 594 | pod: 595 | type: Prefered 596 | terms: 597 | - weight: 10 598 | selector: 599 | expressions: 600 | - key: cpu 601 | operator: In 602 | values: 603 | - heavy 604 | - midium 605 | pod: 606 | host: 607 | network: true 608 | initContainers: 609 | - image: mysql-init:v1.0.0 610 | mounts: 611 | - name: db-volume 612 | path: /var/lib/mysql 613 | resources: 614 | requests: 615 | cpu: 100m 616 | memory: 100Mi 617 | limits: 618 | cpu: 100m 619 | memory: 100Mi 620 | containers: 621 | - image: mysql:v5.6 622 | ports: 623 | - protocol: TCP 624 | port: 3306 625 | mounts: 626 | - name: db-volume 627 | path: /var/lib/mysql 628 | - name: shared-volume 629 | path: /var/lib/logs 630 | envFrom: 631 | - type: Config 632 | name: someconfigmap 633 | prefix: XXXX_ 634 | optional: false 635 | downwardPrefix: MY_ENV 636 | env: 637 | - name: XXSS_ 638 | value: "sd" 639 | resources: 640 | requests: 641 | cpu: 100m 642 | memory: 100Mi 643 | limits: 644 | cpu: 100m 645 | memory: 100Mi 646 | probe: 647 | liveness: 648 | handler: 649 | type: HTTP 650 | method: 651 | port: 80 652 | path: /liveness 653 | delay: 10 654 | readiness: 655 | handler: 656 | type: EXEC 657 | method: 658 | command: 659 | - curl 660 | - http://localhost 661 | delay: 15 662 | volumes: 663 | - name: db-volume 664 | type: Dedicated 665 | source: 666 | class: hdd 667 | modes: 668 | - ReadWriteOnce 669 | storage: 670 | request: 5Gi 671 | propagation: None 672 | - name: shared-volume 673 | type: Dynamic 674 | source: 675 | class: ssd 676 | modes: 677 | - ReadWriteMany 678 | storage: 679 | request: 5Gi 680 | limit: 100Gi 681 | services: 682 | - name: mysql1 683 | type: ClusterIP 684 | ports: 685 | - protocol: HTTP 686 | targetPort: 80 687 | port: 80 688 | sessionAffinity: ClientIP 689 | affinityTimeout: 10800 690 | - name: mysql2 691 | type: NodePort 692 | ports: 693 | - protocol: HTTPS 694 | targetPort: 443 695 | port: 443 696 | nodePort: 31222 697 | - type: Deployment 698 | controller: 699 | replica: 1 700 | name: simplelog 701 | containers: 702 | - image: cargo.caicloudprivatetest.com/caicloud/simplelog 703 | mounts: 704 | - name: cfgvolume 705 | path: /etc/simplelog 706 | resources: 707 | requests: 708 | cpu: 100m 709 | memory: 100Mi 710 | limits: 711 | cpu: 100m 712 | memory: 100Mi 713 | services: 714 | - name: log1 715 | type: ClusterIP 716 | ports: 717 | - protocol: HTTP 718 | targetPort: 80 719 | port: 80 720 | volumes: 721 | name: cfgvolume 722 | type: Config 723 | source: 724 | target: simplecfg 725 | items: 726 | - key: "config.yaml" 727 | path: "config.yaml" 728 | configs: 729 | - name: simplecfg 730 | data: 731 | - key: "config.yaml" 732 | value: | 733 | sync: "5m" 734 | deadline: "3h" 735 | secrets: 736 | - name: simplesecret 737 | data: 738 | - key: "encrypted.cfg" 739 | value: c3luYzogIjVtIgpkZWFkbGluZTogIjNoIgo= 740 | subchart: 741 | _config: 742 | 略 743 | ``` 744 | --------------------------------------------------------------------------------