Skip to content

Commit

Permalink
[Community] Renaming Nexus Operator Package (add new) (operator-frame…
Browse files Browse the repository at this point in the history
…work#1707)

Signed-off-by: Ricardo Zanini <ricardozanini@gmail.com>
  • Loading branch information
ricardozanini authored and dmesser committed Jun 22, 2020
1 parent ddd435d commit 27da819
Show file tree
Hide file tree
Showing 3 changed files with 513 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,230 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: nexus.apps.m88i.io
spec:
group: apps.m88i.io
names:
kind: Nexus
listKind: NexusList
plural: nexus
singular: nexus
scope: Namespaced
validation:
openAPIV3Schema:
description: Nexus custom resource to deploy the Nexus Server
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: NexusSpec defines the desired state of Nexus
properties:
image:
description: 'Full image tag name for this specific deployment Default:
docker.io/sonatype/nexus3:latest'
type: string
networking:
description: Networking definition
properties:
expose:
description: Set to `true` to expose the Nexus application. Default
to false.
type: boolean
exposeAs:
description: 'Type of networking exposure: NodePort, Route or Ingress.
Default to Route on OpenShift and Ingress on Kubernetes.'
enum:
- NodePort
- Route
- Ingress
type: string
host:
description: Host where the Nexus service is exposed. This attribute
is required if the service is exposed via Ingress.
type: string
nodePort:
description: NodePort defined in the exposed service. Required if
exposed via NodePort.
format: int32
type: integer
tls:
description: TLS/SSL-related configuration
properties:
mandatory:
description: When exposing via Route, set to `true` to only
allow encrypted traffic using TLS (disables HTTP in favor
of HTTPS). Defaults to false.
type: boolean
secretName:
description: When exposing via Ingress, inform the name of the
TLS secret containing certificate and private key for TLS
encryption. It must be present in the same namespace as the
Operator.
type: string
type: object
type: object
persistence:
description: Persistence definition
properties:
persistent:
description: Flag to indicate if this instance will be persistent
or not
type: boolean
storageClass:
description: StorageClass used by the managed PVC.
type: string
volumeSize:
description: 'If persistent, the size of the Volume. Defaults: 10Gi'
type: string
required:
- persistent
type: object
replicas:
description: 'Number of pods replicas desired Default: 1'
format: int32
maximum: 100
minimum: 1
type: integer
resources:
description: Defined Resources for the Nexus instance
properties:
limits:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: 'Limits describes the maximum amount of compute resources
allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
type: object
requests:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: 'Requests describes the minimum amount of compute resources
required. If Requests is omitted for a container, it defaults
to Limits if that is explicitly specified, otherwise to an implementation-defined
value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
type: object
type: object
serviceAccountName:
description: ServiceAccountName is the name of the ServiceAccount used
to run the Pods. If left blank, a default ServiceAccount is created
with the same name as the Nexus CR.
type: string
useRedHatImage:
description: 'If you have access to Red Hat Container Catalog, turn
this to true to use the certified image provided by Sonatype Default:
false'
type: boolean
required:
- persistence
- replicas
- useRedHatImage
type: object
status:
description: NexusStatus defines the observed state of Nexus
properties:
deploymentStatus:
description: Condition status for the Nexus deployment
properties:
availableReplicas:
description: Total number of available pods (ready for at least
minReadySeconds) targeted by this deployment.
format: int32
type: integer
collisionCount:
description: Count of hash collisions for the Deployment. The Deployment
controller uses this field as a collision avoidance mechanism
when it needs to create the name for the newest ReplicaSet.
format: int32
type: integer
conditions:
description: Represents the latest available observations of a deployment's
current state.
items:
description: DeploymentCondition describes the state of a deployment
at a certain point.
properties:
lastTransitionTime:
description: Last time the condition transitioned from one
status to another.
format: date-time
type: string
lastUpdateTime:
description: The last time this condition was updated.
format: date-time
type: string
message:
description: A human readable message indicating details about
the transition.
type: string
reason:
description: The reason for the condition's last transition.
type: string
status:
description: Status of the condition, one of True, False,
Unknown.
type: string
type:
description: Type of deployment condition.
type: string
required:
- status
- type
type: object
type: array
observedGeneration:
description: The generation observed by the deployment controller.
format: int64
type: integer
readyReplicas:
description: Total number of ready pods targeted by this deployment.
format: int32
type: integer
replicas:
description: Total number of non-terminated pods targeted by this
deployment (their labels match the selector).
format: int32
type: integer
unavailableReplicas:
description: Total number of unavailable pods targeted by this deployment.
This is the total number of pods that are still required for the
deployment to have 100% available capacity. They may either be
pods that are running but not yet available or pods that still
have not been created.
format: int32
type: integer
updatedReplicas:
description: Total number of non-terminated pods targeted by this
deployment that have the desired template spec.
format: int32
type: integer
type: object
nexusRoute:
description: Route for external service access
type: string
nexusStatus:
description: Will be "OK" when all objects are created successfully
type: string
type: object
type: object
version: v1alpha1
versions:
- name: v1alpha1
served: true
storage: true

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
channels:
- currentCSV: nexus-operator.v0.2.0
name: alpha
defaultChannel: alpha
packageName: nexus-operator-m88i

0 comments on commit 27da819

Please sign in to comment.