Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
514 changes: 511 additions & 3 deletions deploy/1-create-operator.yaml

Large diffs are not rendered by default.

160 changes: 160 additions & 0 deletions deploy/crds/contrail.juniper.net_contrailmonitorstatuses_crd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: contrailmonitorstatuses.contrail.juniper.net
spec:
group: contrail.juniper.net
names:
kind: ContrailMonitorStatus
listKind: ContrailMonitorStatusList
plural: contrailmonitorstatuses
singular: contrailmonitorstatus
scope: Namespaced
subresources:
status: {}
validation:
openAPIV3Schema:
description: ContrailMonitorStatus is the Schema for the contrailmonitorstatuses
API
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: ContrailMonitorStatusSpec defines the desired state of ContrailMonitorStatus
properties:
commonConfiguration:
description: CommonConfiguration is the common services struct.
properties:
activate:
description: Activate defines if the service will be activated by
Manager.
type: boolean
create:
description: Create defines if the service will be created by Manager.
type: boolean
hostNetwork:
description: Host networking requested for this pod. Use the host's
network namespace. If this option is set, the ports that will
be used must be specified. Default to false.
type: boolean
imagePullSecrets:
description: ImagePullSecrets is an optional list of references
to secrets in the same namespace to use for pulling any of the
images used by this PodSpec.
items:
type: string
type: array
nodeSelector:
additionalProperties:
type: string
description: 'NodeSelector is a selector which must be true for
the pod to fit on a node. Selector which must match a node''s
labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/.'
type: object
replicas:
description: Number of desired pods. This is a pointer to distinguish
between explicit zero and not specified. Defaults to 1.
format: int32
type: integer
tolerations:
description: If specified, the pod's tolerations.
items:
description: The pod this Toleration is attached to tolerates
any taint that matches the triple <key,value,effect> using the
matching operator <operator>.
properties:
effect:
description: Effect indicates the taint effect to match. Empty
means match all taint effects. When specified, allowed values
are NoSchedule, PreferNoSchedule and NoExecute.
type: string
key:
description: Key is the taint key that the toleration applies
to. Empty means match all taint keys. If the key is empty,
operator must be Exists; this combination means to match
all values and all keys.
type: string
operator:
description: Operator represents a key's relationship to the
value. Valid operators are Exists and Equal. Defaults to
Equal. Exists is equivalent to wildcard for value, so that
a pod can tolerate all taints of a particular category.
type: string
tolerationSeconds:
description: TolerationSeconds represents the period of time
the toleration (which must be of effect NoExecute, otherwise
this field is ignored) tolerates the taint. By default,
it is not set, which means tolerate the taint forever (do
not evict). Zero and negative values will be treated as
0 (evict immediately) by the system.
format: int64
type: integer
value:
description: Value is the taint value the toleration matches
to. If the operator is Exists, the value should be empty,
otherwise just a regular string.
type: string
type: object
type: array
type: object
serviceConfiguration:
description: ContrailMonitorStatusConfiguration is the Spec for the
ContrailMonitorStatus API.
properties:
cassandraInstance:
type: string
commandInstance:
type: string
configInstance:
type: string
controlInstance:
type: string
keystoneInstance:
type: string
memcachedInstance:
type: string
postgresInstance:
type: string
provisionmanagerInstance:
type: string
rabbitmqInstance:
type: string
zookeeperInstance:
type: string
type: object
required:
- commonConfiguration
- serviceConfiguration
type: object
status:
description: ContrailMonitorStatusStatus defines the observed state of ContrailMonitorStatus
properties:
config:
items:
description: ModuleStatus defines the observed state of ConfigStatus
properties:
moduleName:
type: string
state:
type: string
required:
- state
type: object
type: array
type: object
type: object
version: v1alpha1
versions:
- name: v1alpha1
served: true
storage: true
165 changes: 165 additions & 0 deletions deploy/crds/contrail.juniper.net_managers_crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,160 @@ spec:
serviceStatus: {}
type: object
type: object
contrailmonitorstatus:
description: ContrailMonitorStatus is the Schema for the contrailmonitorstatuses
API
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: ContrailMonitorStatusSpec defines the desired state
of ContrailMonitorStatus
properties:
commonConfiguration:
description: CommonConfiguration is the common services
struct.
properties:
activate:
description: Activate defines if the service will be
activated by Manager.
type: boolean
create:
description: Create defines if the service will be created
by Manager.
type: boolean
hostNetwork:
description: Host networking requested for this pod.
Use the host's network namespace. If this option is
set, the ports that will be used must be specified.
Default to false.
type: boolean
imagePullSecrets:
description: ImagePullSecrets is an optional list of
references to secrets in the same namespace to use
for pulling any of the images used by this PodSpec.
items:
type: string
type: array
nodeSelector:
additionalProperties:
type: string
description: 'NodeSelector is a selector which must
be true for the pod to fit on a node. Selector which
must match a node''s labels for the pod to be scheduled
on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/.'
type: object
replicas:
description: Number of desired pods. This is a pointer
to distinguish between explicit zero and not specified.
Defaults to 1.
format: int32
type: integer
tolerations:
description: If specified, the pod's tolerations.
items:
description: The pod this Toleration is attached to
tolerates any taint that matches the triple <key,value,effect>
using the matching operator <operator>.
properties:
effect:
description: Effect indicates the taint effect
to match. Empty means match all taint effects.
When specified, allowed values are NoSchedule,
PreferNoSchedule and NoExecute.
type: string
key:
description: Key is the taint key that the toleration
applies to. Empty means match all taint keys.
If the key is empty, operator must be Exists;
this combination means to match all values and
all keys.
type: string
operator:
description: Operator represents a key's relationship
to the value. Valid operators are Exists and
Equal. Defaults to Equal. Exists is equivalent
to wildcard for value, so that a pod can tolerate
all taints of a particular category.
type: string
tolerationSeconds:
description: TolerationSeconds represents the
period of time the toleration (which must be
of effect NoExecute, otherwise this field is
ignored) tolerates the taint. By default, it
is not set, which means tolerate the taint forever
(do not evict). Zero and negative values will
be treated as 0 (evict immediately) by the system.
format: int64
type: integer
value:
description: Value is the taint value the toleration
matches to. If the operator is Exists, the value
should be empty, otherwise just a regular string.
type: string
type: object
type: array
type: object
serviceConfiguration:
description: ContrailMonitorStatusConfiguration is the Spec
for the ContrailMonitorStatus API.
properties:
cassandraInstance:
type: string
commandInstance:
type: string
configInstance:
type: string
controlInstance:
type: string
keystoneInstance:
type: string
memcachedInstance:
type: string
postgresInstance:
type: string
provisionmanagerInstance:
type: string
rabbitmqInstance:
type: string
zookeeperInstance:
type: string
type: object
required:
- commonConfiguration
- serviceConfiguration
type: object
status:
description: ContrailMonitorStatusStatus defines the observed
state of ContrailMonitorStatus
properties:
config:
items:
description: ModuleStatus defines the observed state of
ConfigStatus
properties:
moduleName:
type: string
state:
type: string
required:
- state
type: object
type: array
type: object
type: object
controls:
items:
description: Control is the Schema for the controls API.
Expand Down Expand Up @@ -2343,6 +2497,17 @@ spec:
name:
type: string
type: object
contrailmonitorstatus:
description: ServiceStatus provides information on the current status
of the service.
properties:
active:
type: boolean
created:
type: boolean
name:
type: string
type: object
controls:
items:
description: ServiceStatus provides information on the current status
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: contrail.juniper.net/v1alpha1
kind: ContrailMonitorStatus
metadata:
name: example-contrailmonitorstatus
spec:
# Add fields here
size: 3
20 changes: 20 additions & 0 deletions deploy/openshift/tools/contrail-sc-open/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")

go_library(
name = "go_default_library",
srcs = ["main.go"],
importpath = "github.com/Juniper/contrail-operator/deploy/openshift/tools/contrail-sc-open",
visibility = ["//visibility:private"],
deps = [
"@com_github_aws_aws_sdk_go//aws:go_default_library",
"@com_github_aws_aws_sdk_go//aws/awserr:go_default_library",
"@com_github_aws_aws_sdk_go//aws/session:go_default_library",
"@com_github_aws_aws_sdk_go//service/ec2:go_default_library",
],
)

go_binary(
name = "contrail-sc-open",
embed = [":go_default_library"],
visibility = ["//visibility:public"],
)
Loading