Skip to content

Commit

Permalink
Moving dataplane CRs
Browse files Browse the repository at this point in the history
Bringing APIs and controllers from https://github.com/openstack-k8s-operators/dataplane-operator

Dataplane commit:
openstack-k8s-operators/dataplane-operator@270dc7e

Signed-off-by: Fabricio Aguiar <[email protected]>
  • Loading branch information
fao89 committed Apr 20, 2024
1 parent f32d330 commit cb89fd1
Show file tree
Hide file tree
Showing 189 changed files with 21,929 additions and 34 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/kustom.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Kustomize Build
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
paths:
- config/samples/**
jobs:
kustomize:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.20.x
- uses: actions/checkout@v4
with:
# this fetches all branches. Needed because we need gh-pages branch for deploy to work
fetch-depth: 0
- name: download kustomize
run: |
mkdir bin
LINK=https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh
curl -Ss $LINK | bash -s -- 5.0.1 ./bin
- name: kustomize build
run: |
cd config/samples/dataplane
for d in */ ; do
echo "=============== $d ==============="
../../../bin/kustomize build --load-restrictor LoadRestrictionsNone "$d"
done
8 changes: 7 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ RUN if [ ! -f $CACHITO_ENV_FILE ]; then go mod download ; fi
# Build manager
RUN if [ -f $CACHITO_ENV_FILE ] ; then source $CACHITO_ENV_FILE ; fi ; env ${GO_BUILD_EXTRA_ENV_ARGS} go build ${GO_BUILD_EXTRA_ARGS} -a -o ${DEST_ROOT}/manager main.go

RUN cp -r config/services ${DEST_ROOT}/services

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM $OPERATOR_BASE_IMAGE
Expand Down Expand Up @@ -56,13 +58,17 @@ LABEL com.redhat.component="${IMAGE_COMPONENT}" \
io.openshift.tags="${IMAGE_TAGS}"
### DO NOT EDIT LINES ABOVE

ENV USER_UID=$USER_ID
ENV USER_UID=$USER_ID \
OPERATOR_SERVICES=/usr/share/openstack-operator/services/

WORKDIR /

# Install operator binary to WORKDIR
COPY --from=builder ${DEST_ROOT}/manager .

# Install services
COPY --from=builder ${DEST_ROOT}/services ${OPERATOR_SERVICES}

USER $USER_ID

ENV PATH="/:${PATH}"
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ test: manifests generate gowork fmt vet envtest ginkgo ## Run tests.
source hack/export_related_images.sh && \
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) -v debug --bin-dir $(LOCALBIN) use $(ENVTEST_K8S_VERSION) -p path)" \
OPERATOR_TEMPLATES="$(PWD)/templates" \
$(GINKGO) --trace --cover --coverpkg=../../pkg/openstack,../../pkg/openstackclient,../../pkg/util,../../controllers,../../apis/client/v1beta1,../../apis/core/v1beta1 --coverprofile cover.out --covermode=atomic ${PROC_CMD} $(GINKGO_ARGS) ./tests/... ./apis/client/...
$(GINKGO) --trace --cover --coverpkg=../../pkg/openstack,../../pkg/openstackclient,../../pkg/util,../../controllers,../../apis/client/v1beta1,../../apis/core/v1beta1,../../apis/dataplane/v1beta1 --coverprofile cover.out --covermode=atomic ${PROC_CMD} $(GINKGO_ARGS) ./tests/... ./apis/client/...

##@ Build

Expand Down
2 changes: 2 additions & 0 deletions OWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
approvers:
- ci-approvers
- openstack-approvers
- dataplane-approvers

reviewers:
- ci-approvers
- openstack-approvers
- dataplane-approvers
8 changes: 8 additions & 0 deletions OWNERS_ALIASES
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,11 @@ aliases:
- dprince
- olliewalsh
- stuggi
dataplane-approvers:
- fao89
- fultonj
- rebtoor
- slagle
- bshephar
- rabi
- jpodivin
31 changes: 31 additions & 0 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,35 @@ resources:
defaulting: true
validation: true
webhookVersion: v1
- api:
crdVersion: v1
namespaced: true
controller: true
domain: openstack.org
group: dataplane
kind: OpenStackDataPlaneNodeSet
path: github.com/openstack-k8s-operators/openstack-operator/apis/dataplane/v1beta1
version: v1beta1
webhooks:
defaulting: true
validation: true
webhookVersion: v1
- api:
crdVersion: v1
namespaced: true
controller: true
domain: openstack.org
group: dataplane
kind: OpenStackDataPlaneService
path: github.com/openstack-k8s-operators/openstack-operator/apis/dataplane/v1beta1
version: v1beta1
- api:
crdVersion: v1
namespaced: true
controller: true
domain: openstack.org
group: dataplane
kind: OpenStackDataPlaneDeployment
path: github.com/openstack-k8s-operators/openstack-operator/apis/dataplane/v1beta1
version: v1beta1
version: "3"
150 changes: 150 additions & 0 deletions apis/bases/dataplane.openstack.org_openstackdataplanedeployments.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.11.1
creationTimestamp: null
name: openstackdataplanedeployments.dataplane.openstack.org
spec:
group: dataplane.openstack.org
names:
kind: OpenStackDataPlaneDeployment
listKind: OpenStackDataPlaneDeploymentList
plural: openstackdataplanedeployments
shortNames:
- osdpd
- osdpdeployment
- osdpdeployments
singular: openstackdataplanedeployment
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: NodeSets
jsonPath: .spec.nodeSets
name: NodeSets
type: string
- description: Status
jsonPath: .status.conditions[0].status
name: Status
type: string
- description: Message
jsonPath: .status.conditions[0].message
name: Message
type: string
name: v1beta1
schema:
openAPIV3Schema:
properties:
apiVersion:
type: string
kind:
type: string
metadata:
type: object
spec:
properties:
ansibleExtraVars:
x-kubernetes-preserve-unknown-fields: true
ansibleLimit:
type: string
ansibleSkipTags:
type: string
ansibleTags:
type: string
deploymentRequeueTime:
default: 15
minimum: 1
type: integer
nodeSets:
items:
type: string
type: array
servicesOverride:
items:
type: string
type: array
required:
- deploymentRequeueTime
- nodeSets
type: object
x-kubernetes-validations:
- message: OpenStackDataPlaneDeployment Spec is immutable
rule: self == oldSelf
status:
properties:
conditions:
items:
properties:
lastTransitionTime:
format: date-time
type: string
message:
type: string
reason:
type: string
severity:
type: string
status:
type: string
type:
type: string
required:
- lastTransitionTime
- status
- type
type: object
type: array
configMapHashes:
additionalProperties:
type: string
type: object
containerImages:
additionalProperties:
type: string
type: object
deployed:
type: boolean
deployedVersion:
type: string
nodeSetConditions:
additionalProperties:
items:
properties:
lastTransitionTime:
format: date-time
type: string
message:
type: string
reason:
type: string
severity:
type: string
status:
type: string
type:
type: string
required:
- lastTransitionTime
- status
- type
type: object
type: array
type: object
nodeSetHashes:
additionalProperties:
type: string
type: object
observedGeneration:
format: int64
type: integer
secretHashes:
additionalProperties:
type: string
type: object
type: object
type: object
served: true
storage: true
subresources:
status: {}
Loading

0 comments on commit cb89fd1

Please sign in to comment.