@razee/remoteresource
Version:
RazeeDeploy: component to download and manage files
311 lines (309 loc) • 12.8 kB
YAML
apiVersion: v1
kind: List
metadata:
name: remoteresource-controller-list
annotations:
version: "{{{TRAVIS_COMMIT}}}"
type: array
items:
- apiVersion: apps/v1
kind: Deployment
metadata:
name: remoteresource-controller
annotations:
razee.io/git-repo: "{{{GIT_REMOTE}}}"
razee.io/commit-sha: "{{{TRAVIS_COMMIT}}}"
labels:
razee/watch-resource: "lite"
spec:
replicas: 1
selector:
matchLabels:
app: remoteresource-controller
strategy:
type: RollingUpdate
template:
metadata:
labels:
app: remoteresource-controller
razee/watch-resource: "lite"
name: remoteresource-controller
spec:
serviceAccountName: razeedeploy-sa
securityContext:
runAsUser: {{{NODE_USER_ID}}}
runAsGroup: {{{NODE_GROUP_ID}}}
fsGroup: {{{NODE_GROUP_ID}}}
containers:
- image: "quay.io/razee/remoteresource:{{{TRAVIS_TAG}}}"
resources:
limits:
memory: 300Mi
cpu: 200m
requests:
memory: 75Mi
cpu: 50m
env:
- name: USER_AGENT_NAME
value: razee-io/remoteresource
- name: USER_AGENT_VERSION
value: "{{{TRAVIS_TAG}}}"
- name: RR_RECONCILE_BY_DEFAULT
valueFrom:
configMapKeyRef:
name: razeedeploy-overrides
key: RR_RECONCILE_BY_DEFAULT
optional: true
- name: CRD_WATCH_TIMEOUT_SECONDS
valueFrom:
configMapKeyRef:
name: razeedeploy-overrides
key: CRD_WATCH_TIMEOUT_SECONDS
optional: true
imagePullPolicy: IfNotPresent
name: remoteresource-controller
livenessProbe:
exec:
command:
- sh/liveness.sh
initialDelaySeconds: 30
periodSeconds: 150
timeoutSeconds: 30
failureThreshold: 1
volumeMounts:
- mountPath: /home/node/download-cache
name: cache-volume
- mountPath: /home/node/config
name: razeedeploy-config
volumes:
- name: cache-volume
emptyDir: {}
- name: razeedeploy-config
configMap:
name: razeedeploy-config
defaultMode: 400
optional: true
- apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
# name must match the spec fields below, and be in the form: <plural>.<group>
name: remoteresources.deploy.razee.io
annotations:
razee.io/git-repo: "{{{GIT_REMOTE}}}"
razee.io/commit-sha: "{{{TRAVIS_COMMIT}}}"
labels:
deploy.razee.io/Reconcile: "false"
spec:
# group name to use for REST API: /apis/<group>/<version>
group: deploy.razee.io
# either Namespaced or Cluster
scope: Namespaced
names:
# plural name to be used in the URL: /apis/<group>/<version>/<plural>
plural: remoteresources
# singular name to be used as an alias on the CLI and for display
singular: remoteresource
# kind is normally the CamelCased singular type. Your resource manifests use this.
kind: RemoteResource
# shortNames allow shorter string to match your resource on the CLI
shortNames:
- rr
# list of versions supported by this CustomResourceDefinition
versions:
- name: v1alpha2
# Each version can be enabled/disabled by Served flag.
served: true
# One and only one version must be marked as the storage version.
storage: true
subresources:
# status enables the status subresource.
status: {}
schema:
# openAPIV3Schema is the schema for validating custom objects.
openAPIV3Schema:
type: object
required: [spec]
properties:
spec:
type: object
required: [requests]
properties:
clusterAuth:
type: object
properties:
impersonateUser:
type: string
backendService:
type: string
enum: [generic, s3, git]
auth:
type: object
oneOf:
- required: [hmac]
- required: [iam]
properties:
hmac:
type: object
allOf:
- oneOf:
- required: [accessKeyId]
- required: [accessKeyIdRef]
- oneOf:
- required: [secretAccessKey]
- required: [secretAccessKeyRef]
properties:
accessKeyId:
type: string
accessKeyIdRef:
type: object
required: [valueFrom]
properties:
valueFrom:
type: object
required: [secretKeyRef]
properties:
secretKeyRef:
type: object
required: [name, key]
properties:
name:
type: string
namespace:
type: string
key:
type: string
secretAccessKey:
type: string
secretAccessKeyRef:
type: object
required: [valueFrom]
properties:
valueFrom:
type: object
required: [secretKeyRef]
properties:
secretKeyRef:
type: object
required: [name, key]
properties:
name:
type: string
namespace:
type: string
key:
type: string
iam:
type: object
allOf:
- required: [url, grantType]
- oneOf:
- required: [apiKey]
- required: [apiKeyRef]
properties:
grantType:
type: string
url:
type: string
format: uri
apiKey:
type: string
apiKeyRef:
type: object
required: [valueFrom]
properties:
valueFrom:
type: object
required: [secretKeyRef]
properties:
secretKeyRef:
type: object
required: [name, key]
properties:
name:
type: string
namespace:
type: string
key:
type: string
requests:
type: array
items:
type: object
required: [options]
properties:
optional:
type: boolean
options:
type: object
oneOf:
- required: [url]
- required: [uri]
- required: [git]
properties:
url:
type: string
format: uri
uri:
type: string
format: uri
git:
type: object
required: [provider, repo, filePath]
oneOf:
- required: [ref]
- required: [release]
properties:
provider:
type: string
enum: [github, gitlab]
repo:
type: string
ref:
type: string
filePath:
type: string
release:
type: string
headers:
type: object
x-kubernetes-preserve-unknown-fields: true
headersFrom:
type: array
items:
type: object
oneOf:
- required: [configMapRef]
- required: [secretMapRef]
- required: [genericMapRef]
properties:
configMapRef:
type: object
required: [name]
properties:
name:
type: string
namespace:
type: string
secretMapRef:
type: object
required: [name]
properties:
name:
type: string
namespace:
type: string
genericMapRef:
type: object
required: [apiVersion, kind, name]
properties:
apiVersion:
type: string
kind:
type: string
name:
type: string
namespace:
type: string
status:
type: object
x-kubernetes-preserve-unknown-fields: true