Git Product home page Git Product logo

infra-operator's Introduction

infra-operator

// TODO(user): Add simple overview of use/purpose

Description

// TODO(user): An in-depth paragraph about your project and overview of use

Getting Started

You’ll need a Kubernetes cluster to run against. You can use KIND to get a local cluster for testing, or run against a remote cluster. Note: Your controller will automatically use the current context in your kubeconfig file (i.e. whatever cluster kubectl cluster-info shows).

Running on the cluster

  1. Install Instances of Custom Resources:
kubectl apply -f config/samples/
  1. Build and push your image to the location specified by IMG:
make docker-build docker-push IMG=<some-registry>/infra-operator:tag
  1. Deploy the controller to the cluster with the image specified by IMG:
make deploy IMG=<some-registry>/infra-operator:tag

Uninstall CRDs

To delete the CRDs from the cluster:

make uninstall

Undeploy controller

UnDeploy the controller to the cluster:

make undeploy

Contributing

// TODO(user): Add detailed information on how you would like others to contribute to this project

How it works

This project aims to follow the Kubernetes Operator pattern

It uses Controllers which provides a reconcile function responsible for synchronizing resources untile the desired state is reached on the cluster

Test It Out

  1. Install the CRDs into the cluster:
make install
  1. Run your controller (this will run in the foreground, so switch to a new terminal if you want to leave it running):
make run

NOTE: You can also run this in one step by running: make install run

Modifying the API definitions

If you are editing the API definitions, generate the manifests such as CRs or CRDs using:

make manifests

NOTE: Run make --help for more information on all potential make targets

More information can be found via the Kubebuilder Documentation

License

Copyright 2023.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

infra-operator's People

Contributors

abays avatar bshephar avatar bshewale avatar cjeanner avatar dciabrin avatar dprince avatar fao89 avatar fmount avatar frenzyfriday avatar gibizer avatar hjensas avatar jeckersb avatar jpodivin avatar kajinamit avatar mrkisaolamb avatar olliewalsh avatar openshift-ci[bot] avatar openshift-merge-bot[bot] avatar openshift-merge-robot avatar pablintino avatar pinikomarov avatar rabi avatar rebtoor avatar sandeepyadav93 avatar stuggi avatar testwill avatar vhariria avatar viroel avatar yazug avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

infra-operator's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

gomod
apis/go.mod
  • github.com/go-logr/logr v1.4.1
  • github.com/onsi/ginkgo/v2 v2.17.2
  • github.com/onsi/gomega v1.33.0
  • github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240429052447-09a614506ca6@09a614506ca6
  • k8s.io/api v0.28.9
  • k8s.io/apimachinery v0.28.9
  • k8s.io/client-go v0.28.9
  • k8s.io/utils v0.0.0-20240423183400-0849a56e8f22@0849a56e8f22
  • sigs.k8s.io/controller-runtime v0.16.5
  • github.com/k8snetworkplumbingwg/network-attachment-definition-client v1.4.0
  • go.uber.org/zap v1.27.0
  • k8s.io/apiextensions-apiserver v0.28.9
  • k8s.io/component-base v0.28.9
  • k8s.io/klog/v2 v2.110.1
  • golang.org/x/net v0.24.0
go.mod
  • github.com/go-logr/logr v1.4.1
  • github.com/google/uuid v1.6.0
  • github.com/onsi/ginkgo/v2 v2.17.2
  • github.com/onsi/gomega v1.33.0
  • github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240429052447-09a614506ca6@09a614506ca6
  • github.com/openstack-k8s-operators/lib-common/modules/test v0.3.1-0.20240429052447-09a614506ca6@09a614506ca6
  • github.com/rabbitmq/cluster-operator/v2 v2.6.0
  • go.uber.org/zap v1.27.0
  • k8s.io/api v0.28.9
  • k8s.io/apimachinery v0.28.9
  • k8s.io/client-go v0.28.9
  • k8s.io/utils v0.0.0-20240423183400-0849a56e8f22@0849a56e8f22
  • sigs.k8s.io/controller-runtime v0.16.5
  • github.com/k8snetworkplumbingwg/network-attachment-definition-client v1.4.0
  • k8s.io/apiextensions-apiserver v0.28.9
  • k8s.io/component-base v0.28.9
  • k8s.io/klog/v2 v2.110.1
  • golang.org/x/net v0.24.0
  • github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.20240313124519-961a0ee8bf7f@961a0ee8bf7f

Memcached with tls doesn't have a notls port open

Most openstack services don't support tls because keystonemiddleware doesn't support TLS (it has it's own encryption), also, horizon doesn't support TLS and fails when TLS is enabled

The way memcached currently runs with TLS enabled:

/usr/bin/memcached -p 11211 -u memcached -m 9932 -c 8192 -Z -o ssl_chain_cert=/etc/pki/tls/certs/memcached.crt -o ssl_key=/etc/pki/tls/private/memcached.key -o ssl_ca_cert=/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem -vv

The way it runs in TripleO:

/usr/bin/memcached -p 11212 -u memcached -m 9871 -c 8192 -vv -l 127.0.0.1,192.168.122.100,notls:192.168.122.100:11211,notls:127.0.0.1:11211 -U 0 -X -t 8 -Z -o ssl_chain_cert=/etc/pki/tls/certs/memcached.crt -o ssl_key=/etc/pki/tls/private/memcached.key -o ssl_verify_mode=1

infra-operator-controller-manager CrashLoopBackOff panic: runtime error: invalid memory address or nil pointer dereference

in openstack-operator the infra-operator-controller-manager crash when baremetal deploy start

2024-03-12T18:22:03Z    INFO    Observed a panic in reconciler: runtime error: invalid memory address or nil pointer dereference        {"controller": "ipset", "controllerGroup": "network.openstack.org", "controllerKind": "IPSet", "IPSet": {"name":"edpm-compute-01","namespace":"openstack"}, "namespace": "openstack", "name": "edpm-compute-01", "reconcileID": "5d768fc0-07ab-445a-ad16-22597016b542"}
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x17d32a9]

goroutine 331 [running]:
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile.func1()
        /opt/app-root/src/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:116 +0x1fa
panic({0x19ccdc0, 0x2b8ea00})
        /usr/lib/golang/src/runtime/panic.go:884 +0x213
github.com/openstack-k8s-operators/infra-operator/controllers/network.(*IPSetReconciler).ensureReservation(0xc00030dd10, {0x1eb4410, 0xc002a30240}, 0xc002a0c2c0, 0xc0028ff7c0, 0xc00050c2c0, 0xc000479ab0)
        /remote-source/controllers/network/ipset_controller.go:441 +0x949
github.com/openstack-k8s-operators/infra-operator/controllers/network.(*IPSetReconciler).reconcileNormal(0xc00030dd10, {0x1eb4410, 0xc002a30240}, 0xc002a0c2c0, 0xc002a0c2c0?)
        /remote-source/controllers/network/ipset_controller.go:254 +0x2a9
github.com/openstack-k8s-operators/infra-operator/controllers/network.(*IPSetReconciler).Reconcile(0xc00030dd10, {0x1eb4410, 0xc002a30240}, {{{0xc000c108f6?, 0x5?}, {0xc000c10900?, 0xc000e5fd48?}}})
        /remote-source/controllers/network/ipset_controller.go:147 +0x64f
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile(0x1eb6a80?, {0x1eb4410?, 0xc002a30240?}, {{{0xc000c108f6?, 0xb?}, {0xc000c10900?, 0x0?}}})
        /opt/app-root/src/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:119 +0xc8
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler(0xc0003fea00, {0x1eb4368, 0xc0001faa50}, {0x1a784e0?, 0xc0006402c0?})
        /opt/app-root/src/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:316 +0x3ca
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc0003fea00, {0x1eb4368, 0xc0001faa50})
        /opt/app-root/src/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:266 +0x1d9
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2()
        /opt/app-root/src/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:227 +0x85
created by sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2
        /opt/app-root/src/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:223 +0x587

IPset

oc get ipset edpm-compute-01 -o yaml
apiVersion: network.openstack.org/v1beta1
kind: IPSet
metadata:
  creationTimestamp: "2024-03-12T18:20:24Z"
  finalizers:
  - IPSet
  generation: 1
  name: edpm-compute-01
  namespace: openstack
  ownerReferences:
  - apiVersion: dataplane.openstack.org/v1beta1
    blockOwnerDeletion: true
    controller: true
    kind: OpenStackDataPlaneNodeSet
    name: openstack-edpm-ipam
    uid: b3a9ac56-ca72-42d5-9307-975e63b5add1
  resourceVersion: "19506379"
  uid: 2d02c16d-c3a0-47ef-8d0e-fa10cc998b2b
spec:
  immutable: false
  networks:
  - defaultRoute: true
    name: CtlPlane
    subnetName: subnet1
  - name: InternalApi
    subnetName: subnet1
  - name: Storage
    subnetName: subnet1
  - name: Tenant
    subnetName: subnet1
  - name: StorageMgmt
    subnetName: subnet1
status:
  conditions:
  - lastTransitionTime: "2024-03-12T18:20:43Z"
    message: Setup started
    reason: Init
    status: Unknown
    type: Ready
  - lastTransitionTime: "2024-03-12T18:20:24Z"
    message: Input data complete
    reason: Ready
    status: "True"
    type: InputReady
  - lastTransitionTime: "2024-03-12T18:20:24Z"
    message: Reservation create not started
    reason: Init
    status: Unknown
    type: ReservationReady

Reserveration

apiVersion: network.openstack.org/v1beta1
kind: Reservation
metadata:
  creationTimestamp: "2024-03-12T18:20:24Z"
  finalizers:
  - IPSet
  generation: 1
  labels:
    ipam.network.openstack.org/CtlPlane: subnet1
  name: edpm-compute-01
  namespace: openstack
  ownerReferences:
  - apiVersion: network.openstack.org/v1beta1
    blockOwnerDeletion: true
    controller: true
    kind: IPSet
    name: edpm-compute-01
    uid: 2d02c16d-c3a0-47ef-8d0e-fa10cc998b2b
  resourceVersion: "19505890"
  uid: a0b1b05a-6040-4933-83ce-e5c51888b873
spec:
  ipSetRef:
    name: edpm-compute-01
    namespace: openstack
    uid: 2d02c16d-c3a0-47ef-8d0e-fa10cc998b2b
  reservation:
    CtlPlane:
      address: 192.168.122.100
      network: CtlPlane
      subnet: subnet1

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: Cannot find preset's package (github>openstack-k8s-operators/renovate-config)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.