registry-console.yaml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. kind: Template
  2. apiVersion: v1
  3. metadata:
  4. name: "registry-console"
  5. annotations:
  6. description: "Template for deploying registry web console. Requires cluster-admin."
  7. tags: infrastructure
  8. labels:
  9. createdBy: "registry-console-template"
  10. objects:
  11. - kind: DeploymentConfig
  12. apiVersion: v1
  13. metadata:
  14. name: "registry-console"
  15. labels:
  16. name: "registry-console"
  17. spec:
  18. triggers:
  19. - type: ConfigChange
  20. replicas: 1
  21. selector:
  22. name: "registry-console"
  23. template:
  24. metadata:
  25. labels:
  26. name: "registry-console"
  27. spec:
  28. nodeSelector:
  29. node-role.kubernetes.io/master: 'true'
  30. containers:
  31. - name: registry-console
  32. image: ${IMAGE_PREFIX}${IMAGE_BASENAME}:${IMAGE_VERSION}
  33. ports:
  34. - containerPort: 9090
  35. protocol: TCP
  36. livenessProbe:
  37. failureThreshold: 3
  38. httpGet:
  39. path: /ping
  40. port: 9090
  41. scheme: HTTP
  42. initialDelaySeconds: 10
  43. periodSeconds: 10
  44. successThreshold: 1
  45. timeoutSeconds: 5
  46. readinessProbe:
  47. failureThreshold: 3
  48. httpGet:
  49. path: /ping
  50. port: 9090
  51. scheme: HTTP
  52. periodSeconds: 10
  53. successThreshold: 1
  54. timeoutSeconds: 5
  55. env:
  56. - name: OPENSHIFT_OAUTH_PROVIDER_URL
  57. value: "${OPENSHIFT_OAUTH_PROVIDER_URL}"
  58. - name: OPENSHIFT_OAUTH_CLIENT_ID
  59. value: "${OPENSHIFT_OAUTH_CLIENT_ID}"
  60. - name: KUBERNETES_INSECURE
  61. value: "false"
  62. - name: COCKPIT_KUBE_INSECURE
  63. value: "false"
  64. - name: REGISTRY_ONLY
  65. value: "true"
  66. - name: REGISTRY_HOST
  67. value: "${REGISTRY_HOST}"
  68. - kind: Service
  69. apiVersion: v1
  70. metadata:
  71. name: "registry-console"
  72. labels:
  73. name: "registry-console"
  74. spec:
  75. type: ClusterIP
  76. ports:
  77. - name: registry-console
  78. protocol: TCP
  79. port: 9000
  80. targetPort: 9090
  81. selector:
  82. name: "registry-console"
  83. - kind: OAuthClient
  84. apiVersion: v1
  85. metadata:
  86. name: "${OPENSHIFT_OAUTH_CLIENT_ID}"
  87. respondWithChallenges: false
  88. secret: "${OPENSHIFT_OAUTH_CLIENT_SECRET}"
  89. redirectURIs:
  90. - "${COCKPIT_KUBE_URL}"
  91. parameters:
  92. - description: 'Specify "registry/repository" prefix for container image; e.g. for "registry.access.redhat.com/openshift3/registry-console:latest", set prefix "registry.access.redhat.com/openshift3/"'
  93. name: IMAGE_PREFIX
  94. value: "registry.access.redhat.com/openshift3/"
  95. - description: 'Specify component name for container image; e.g. for "registry.access.redhat.com/openshift3/registry-console:latest", use base name "registry-console"'
  96. name: IMAGE_BASENAME
  97. value: "registry-console"
  98. - description: 'Specify image version; e.g. for "registry.access.redhat.com/openshift3/registry-console:v3.10", set version "v3.10"'
  99. name: IMAGE_VERSION
  100. value: "v3.10"
  101. - description: "The public URL for the Openshift OAuth Provider, e.g. https://openshift.example.com:8443"
  102. name: OPENSHIFT_OAUTH_PROVIDER_URL
  103. required: true
  104. - description: "The registry console URL. This should be created beforehand using 'oc create route passthrough --service registry-console --port registry-console -n default', e.g. https://registry-console-default.example.com"
  105. name: COCKPIT_KUBE_URL
  106. required: true
  107. - description: "Oauth client secret"
  108. name: OPENSHIFT_OAUTH_CLIENT_SECRET
  109. from: "user[a-zA-Z0-9]{64}"
  110. generate: expression
  111. - description: "Oauth client id"
  112. name: OPENSHIFT_OAUTH_CLIENT_ID
  113. value: "cockpit-oauth-client"
  114. - description: "The integrated registry hostname exposed via route, e.g. registry.example.com"
  115. name: REGISTRY_HOST
  116. required: true