模板描述向用户介绍模板的作用,有助于用户在 web 控制台中搜索查找模板。除模板名称以外的其他元数据均为可选,但若有则会非常有用。除常规描述性信息外,元数据还应包含一组标签。实用标签包括与模板相关的语言名称(如 java、php、ruby 等)。
例 10.3. 模板描述元数据
kind: Template
apiVersion: v1
metadata:
name: cakephp-mysql-example
annotations:
openshift.io/display-name: "CakePHP MySQL Example (Ephemeral)"
description: >-
An example CakePHP application with a MySQL database. For more information
about using this template, including OpenShift considerations, see
https://github.com/sclorg/cakephp-ex/blob/master/README.md.
WARNING: Any data stored will be lost upon pod destruction. Only use this
template for testing."
openshift.io/long-description: >-
This template defines resources needed to develop a CakePHP application,
including a build configuration, application deployment configuration, and
database deployment configuration. The database is stored in
non-persistent storage, so this configuration should be used for
experimental purposes only.
tags: "quickstart,php,cakephp"
iconClass: icon-php
openshift.io/provider-display-name: "Red Hat, Inc."
openshift.io/documentation-url: "https://github.com/sclorg/cakephp-ex"
openshift.io/support-url: "https://access.redhat.com"
message: "Your admin credentials are ${ADMIN_USERNAME}:${ADMIN_PASSWORD}"
annotations:openshift.io/display-name:"CakePHP MySQL Example (Ephemeral)"
2
description:>-
An example CakePHP application with a MySQL database. For more information
about using this template, including OpenShift considerations, see
https://github.com/sclorg/cakephp-ex/blob/master/README.md.
WARNING: Any data stored will be lost upon pod destruction. Only use this
template for testing."
3
openshift.io/long-description:>-
This template defines resources needed to develop a CakePHP application,
including a build configuration, application deployment configuration, and
database deployment configuration. The database is stored in
non-persistent storage, so this configuration should be used for
experimental purposes only.
4
tags:"quickstart,php,cakephp"
5
iconClass: icon-php
6
openshift.io/provider-display-name:"Red Hat, Inc."