artemiscloud / activemq-artemis-operator Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
Describe the bug
Kubernetes port forwarding to either web console (8161) or core (61616) does not work due to web server of broker bound to pod host name instead of 0.0.0.0
To Reproduce
Steps to reproduce the behavior:
kubectl port-forward pod/ex-aao-ss-0 8161:8161 -n myproject
Handling connection for 8161 E0823 16:45:23.498827 30440 portforward.go:400] an error occurred forwarding 8161 -> 8161: error forwarding port 8161 to pod 8e8a1bc1d45bab4643532b6035fa3a54bffadff672ab1c58c7786dd35b185274, uid : exit status 1: 2021/08/23 20:45:12 socat[15739] E connect(17, AF=2 127.0.0.1:8161, 16): Connection refused
Platform (please complete the following information):
Expected behavior
Optional, use if not obvious. A clear and concise description of what you expected to happen.
Screenshots
Optional, add screenshots to help explain your problem.
Additional context
Optional. Add any other context about the problem here.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
Optional. A clear and concise description of any alternative solutions or features you've considered.
Additional context
Optional. Add any other context or screenshots about the feature request here.
Is your feature request related to a problem? Please describe.
Currently users can not configure logging properties and that may not suit specific needs.
Such as when a broker continues to log large amount of warning messages over a period of
time and causes PV to fill up.
Describe the solution you'd like
Users can change the broker logging configuration by providing their own in a configmap or secret. The name of the configmap
or secret must have the suffix -logging-config. There must be one entry in the configmap or secret. The key of the entry
must be logging.properties and the value must of the full content of the logging configuration. (The broker is using slf4j with
log4j2 binding so the content should be log4j2's configuration in Java's properties file format).
Then you need to give the name of the configmap or secret in the broker custom resource. For example
for configmap
apiVersion: broker.amq.io/v1beta1
kind: ActiveMQArtemis
metadata:
name: broker
namespace: activemq-artemis-operator
spec:
spec:
deploymentPlan:
size: 1
image: placeholder
extraMounts:
configMaps:
- "my-logging-config"
for secret
apiVersion: broker.amq.io/v1beta1
kind: ActiveMQArtemis
metadata:
name: broker
namespace: activemq-artemis-operator
spec:
spec:
deploymentPlan:
size: 1
image: placeholder
extraMounts:
secrets:
- "my-logging-config"
Describe alternatives you've considered
Optional. A clear and concise description of any alternative solutions or features you've considered.
Additional context
Optional. Add any other context or screenshots about the feature request here.
Is your feature request related to a problem? Please describe.
Provide a way for the user to use their own init container to config broker
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
Optional. A clear and concise description of any alternative solutions or features you've considered.
Additional context
Optional. Add any other context or screenshots about the feature request here.
Describe the bug
The crd has some fields either inconsistent with the corresponding Artemis go types or wrong. as follows:
redeliveryDelayMultiplier:
type: number
redeliveryCollisionAvoidanceFactor:
type: number
The above 2 should be integers
pageMaxSize:
type: integer
should be string as it allows user to use letters to indicate sizes (like M, G etc)
The storgae/size in crd is not defined as usual. should be as a object type with size property.
To Reproduce
Platform (please complete the following information):
Expected behavior
Screenshots
Additional context
Describe the bug
Currently only one broker CR is supported in a namespace.
Multiple brokerCRs are not working.
To Reproduce
Platform (please complete the following information):
Expected behavior
Optional, use if not obvious. A clear and concise description of what you expected to happen.
Screenshots
Optional, add screenshots to help explain your problem.
Additional context
Optional. Add any other context about the problem here.
Is your feature request related to a problem? Please describe.
I need to make sure pods for an Artemis cluster are running on different nodes so a single node failure doesn't take the whole cluster down.
Describe the solution you'd like
I would like the ability to configure pod anti-affinity (and possibly affinity and tolerations as well) in the CR for the cluster. The anti-affinity configuration should probably have two settings:
kubernetes.io/hostname
).Affinity and toleration configuration could use the normal Pod structures for those configurations.
Describe the bug
Disable auto creation of addresses via the address settings prevents address & queue creation via the Operators CRD.
To Reproduce
Steps to reproduce the behavior:
apiVersion: broker.amq.io/v2alpha4
kind: ActiveMQArtemis
metadata:
name: ex-aao
spec:
deploymentPlan:
size: 1
image: quay.io/artemiscloud/activemq-artemis-broker-kubernetes:0.2.0
persistenceEnabled: false
addressSettings:
addressSetting:
- autoCreateAddresses: false
match: '#'
applyRule: merge_all
apiVersion: broker.amq.io/v2alpha2
kind: ActiveMQArtemisAddress
metadata:
name: ex-aaoaddress
spec:
addressName: myAddress0
queueName: myQueue0
routingType: anycast
Under the hood the creation fails with the following error
java.lang.IllegalStateException : AMQ229203: Address Does Not Exist: myAddress0
The error doesn't get logged because of wrong error handling - see artemiscloud/activemq-artemis-management#3
The error message can be reproduced when trying to create the queue via the Jolokia / JMX Operation in the hawt.io console.
Platform (please complete the following information):
Expected behavior
The Operator should provide the possibility to create Addresses and Queues even though the auto creation (for consuming applications) is disabled. Therefore, it might be better to be able to define an Address and a Queue (which references an Address) in its own CRD instead of using the CRD 'ActiveMQArtemisAddress' for both of them (actually it's only for creating a Queue)
Additional context
The goal is to be able to disable all the auto creation features of ActiveMQ Artemis (Addresses & Queues) and explicitly define them via the operator.
Is your feature request related to a problem? Please describe.
Currently, the operator only supports the OLM "OwnNamespace" mode and therefore needs to be installed / deployed in each namespace where someone wants to deploy an ActiveMQ Artemis broker. This is quite an operational overhead.
Describe the solution you'd like
It should be possible to install the operator in the OLM modes AllNamespaces
& MultiNamespace
to get rid of managing multiple operator instances in the same cluster.
Additional context
e.g.
- name: NAMESPACES
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: 'metadata.annotations[''olm.targetNamespaces'']'
- name: OPERATOR_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: 'metadata.annotations[''olm.operatorNamespace'']'
k8sutil.GetOperatorNamespace()
))Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
Optional. A clear and concise description of any alternative solutions or features you've considered.
Additional context
Optional. Add any other context or screenshots about the feature request here.
I created the AMQ image using attached subset of AMQ multistage docker file
Dockerfile.txt.
Created the container and went to the container shell & tried to execute go test ./pkg/controller/... -v -count=1 -list Test*
resulting in failure as shown below
bash-4.2$ go test ./pkg/controller/... -v -count=1 -list Test*
# github.com/artemiscloud/activemq-artemis-operator/pkg/controller/broker/v2alpha2/activemqartemis [github.com/artemiscloud/activemq-artemis-operator/pkg/controller/broker/v2alpha2/activemqartemis.test]
pkg/controller/broker/v2alpha2/activemqartemis/mocks_test.go:151:119: undefined: environments.MakeEnvVarArrayForCR
pkg/controller/broker/v2alpha2/activemqartemis/mocks_test.go:159:9: undefined: pods.NewPodTemplateSpecForCR
? github.com/artemiscloud/activemq-artemis-operator/pkg/controller [no test files]
? github.com/artemiscloud/activemq-artemis-operator/pkg/controller/broker/v2alpha1/activemqartemisscaledown [no test files]
FAIL github.com/artemiscloud/activemq-artemis-operator/pkg/controller/broker/v2alpha2/activemqartemis [build failed]
? github.com/artemiscloud/activemq-artemis-operator/pkg/controller/broker/v2alpha2/activemqartemisaddress [no test files]
FAIL
I would like to know the validation steps for the container.
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Platform (please complete the following information):
Expected behavior
Optional, use if not obvious. A clear and concise description of what you expected to happen.
Screenshots
Optional, add screenshots to help explain your problem.
Additional context
Optional. Add any other context about the problem here.
Is your feature request related to a problem? Please describe.
Currently the broker CRD doesn't provide a way to configure users/roles.
Describe the solution you'd like
Added options in broker CRD to allow configure users/roles.
Describe alternatives you've considered
Optional. A clear and concise description of any alternative solutions or features you've considered.
Additional context
Optional. Add any other context or screenshots about the feature request here.
Describe the bug
go.mod mentions v3.9.0 openshift/api version.
this tag doenst' exist in openshift/api: openshift/api#647
To Reproduce
Platform (please complete the following information):
not relevant
Expected behavior
Is your feature request related to a problem? Please describe.
I have multiple kubernetes namespaces (dev, stating, uat, prod,...); each need a cluster of few Artemis brokers. I follow the Artemis operator installation guide but I have to deploy the one operator along with service account, role, role binding for each namespace. Since the CRD (artemis, artemisaddress, artemisscaledown, artemissecurity) are installed at global level (not to any namespace) why can't I have a single operator for all namespaces ? This would reduce the number of pods needed and make deployment of Artemis cluster simpler.
Describe the solution you'd like
Deploy 1 artemis operator and have it watch deployment of activemqartemis kind on all other namespaces
Describe alternatives you've considered
If this is not possible due to permission or the resource isolation of kubernetes namespace then perhaps provides a helm chart to install the operator and its dependencies so that deployment can be automates
Additional context
Optional. Add any other context or screenshots about the feature request here.
Is your feature request related to a problem? Please describe.
Currently user must include their address-settings in the cr on first deployment.
if address settings need to change it has to redeploy with the new cr.
Describe the solution you'd like
The user should be able to modify the address-settings in the original cr and use
"oc apply" to update it.
Describe alternatives you've considered
Additional context
Describe the bug
If address-setting property configDeleteAddresses is set to "OFF" in AddressSettings CR
This generates attached broker.xml which is not valid, it will be translated wrongly as "False"
The root cause is that yacfg's yaml loader always translated certain string values as boolean
see https://yaml.org/type/bool.html
So values like 'ON', 'OFF' etc will get changed into boolean True and False.
Also the empty string will be translated into None if the item is a string in yaml
To Reproduce
Steps to reproduce the behavior:
1.Create a CR with the above address setting value.
2. Deploy the cr
Platform (please complete the following information):
Expected behavior
Optional, use if not obvious. A clear and concise description of what you expected to happen.
Screenshots
Optional, add screenshots to help explain your problem.
Additional context
Optional. Add any other context about the problem here.
Is your feature request related to a problem? Please describe.
In some use cases where user has a PV that needs a specific service account and runAsUser ID to access,
the broker need to be configured with such account and user. However the broker CRD currently doesn't support those
options.
Describe the solution you'd like
Added 'serviceAccountName' and 'runAsUser' properties to CRD that allow user to configure the broker
pod.
Describe alternatives you've considered
Optional. A clear and concise description of any alternative solutions or features you've considered.
Additional context
Optional. Add any other context or screenshots about the feature request here.
Describe the bug
When I try to apply security configuration using the example ActiveMQArtemisSecurity CR YAML deploy/crs/broker_activemqartemissecurity_cr.yaml
which is included in the distribution, nothing happens on my deployed Artemis broker. I don't see any user created in the properties file, and I can't authenticate as user 'bob'.
Am I missing something in my setup / CR?
To Reproduce
Steps to reproduce the behavior:
curl -OL https://github.com/artemiscloud/activemq-artemis-operator/archive/refs/tags/v0.20.0.tar.gz
)apiVersion: broker.amq.io/v2alpha5
kind: ActiveMQArtemis
metadata:
name: mybroker
spec:
deploymentPlan:
size: 1
image: placeholder
requireLogin: true
apiVersion: broker.amq.io/v1alpha1
kind: ActiveMQArtemisSecurity
metadata:
name: broker-security-config
spec:
applyToCrNames:
- "*"
loginModules:
propertiesLoginModules:
- name: 'prop-module'
users:
- name: bob
password: mysecret
roles:
- root
securityDomains:
brokerDomain:
name: 'activemq'
loginModules:
- name: 'prop-module'
flag: 'sufficient'
/ # java -jar /a/a.jar --artemis-core --user gkyW8Hrs --pass 7KBeh41j --broker tcp://mybroker-hdls-svc:61616 --put "foobar" sandwiches
Message sent
Operation completed in 153ms (excluding connect)
/ # java -jar /a/a.jar --artemis-core --user bob --pass mysecret --broker tcp://mybroker-hdls-svc:61616 --put "foobar" sandwiches
javax.jms.JMSSecurityException: AMQ229031: Unable to validate user from /10.128.2.83:57868. Username: bob; SSL certificate subject DN: unavailable
Only the admin user exists in the users properties file:
$ cat /home/jboss/amq-broker/etc/artemis-users.properties
...
gkyW8Hrs = ENC(1024:8D873D1EDFB8ABACBC1A8229AC6A691B2856427B385167AC5DA636A8B0D0CF7C:50DE2FF97B69C8B8D127356F8F1090730F8F805DAA288E804E199788394EF0C9363671038857CB7F83ACE9022ACE2119792B9FCFB72CA68D026A5458B2D4C7CF)
Platform (please complete the following information):
The Broker pod is running this image:
$ oc describe pod mybroker-ss-0 | grep Image
Image: quay.io/artemiscloud/activemq-artemis-broker-init:0.2.7
Image ID: quay.io/artemiscloud/activemq-artemis-broker-init@sha256:878acaa33b89ff72892e4305e688bf1da7196e84a79981f27b5ced62e3208fc5
Image: quay.io/artemiscloud/activemq-artemis-broker-kubernetes:0.2.5
Image ID: quay.io/artemiscloud/activemq-artemis-broker-kubernetes@sha256:101abbc3c2c2da662fddd508573a447aaac90155971b383374bc3bbfc6b755ff
The Operator is running this image:
$ oc describe pod activemq-artemis-operator-77777444fc-t75gm | grep Image
Image: quay.io/artemiscloud/activemq-artemis-operator:0.20.0
Image ID: quay.io/artemiscloud/activemq-artemis-operator@sha256:86181b1b5a2dc9dc9089f4ba6b28c1e971cb7d02dbf7c09e4e93b6b9d5462135
Expected behavior
The Security controller should create users, and apply some sort of security config on the broker.
I should be able to log in as the user in the SecuritySettings CR.
I see this in the controller logs, when the Security controller is reconciling:
2021-09-27T16:02:47.112Z INFO controller_v1alpha1activemqartemissecurity Reconciling ActiveMQArtemisSecurity {"Request.Namespace": "sso-app-demo", "Request.Name": "broker-security"}
2021-09-27T16:02:47.112Z INFO controller_v1alpha1activemqartemissecurity Fetched instance {"Request.Namespace": "sso-app-demo", "Request.Name": "broker-security", "the instance": {"kind":"ActiveMQArtemisSecurity","apiVersion":"broker.amq.io/v1alpha1","metadata":{"name":"broker-security","namespace":"sso-app-demo","selfLink":"/apis/broker.amq.io/v1alpha1/namespaces/sso-app-demo/activemqartemissecurities/broker-security","uid":"362f5aae-d42f-4caf-8d20-656e6744641d","resourceVersion":"293655","generation":1,"creationTimestamp":"2021-09-27T16:02:47Z","annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"broker.amq.io/v1alpha1\",\"kind\":\"ActiveMQArtemisSecurity\",\"metadata\":{\"annotations\":{},\"name\":\"broker-security\",\"namespace\":\"sso-app-demo\"},\"spec\":{\"loginModules\":{\"propertiesLoginModules\":[{\"name\":\"prop-module\",\"users\":[{\"name\":\"bob\",\"password\":\"mysecret\",\"roles\":[\"root\"]}]}]},\"securityDomains\":{\"brokerDomain\":{\"loginModules\":[{\"flag...
2021-09-27T16:02:47.112Z INFO controller_v2alpha5activemqartemis A config handler has been added {"new handler": {"SecurityCR":{"kind":"ActiveMQArtemisSecurity","apiVersion":"broker.amq.io/v1alpha1","metadata":{"name":"broker-security","namespace":"sso-app-demo","selfLink":"/apis/broker.amq.io/v1alpha1/namespaces/sso-app-demo/activemqartemissecurities/broker-security","uid":"362f5aae-d42f-4caf-8d20-656e6744641d","resourceVersion":"293655","generation":1,"creationTimestamp":"2021-09-27T16:02:47Z","annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"broker.amq.io/v1alpha1\",\"kind\":\"ActiveMQArtemisSecurity\",\"metadata\":{\"annotations\":{},\"name\":\"broker-security\",\"namespace\":\"sso-app-demo\"},\"spec\":{\"loginModules\":{\"propertiesLoginModules\":[{\"name\":\"prop-module\",\"users\":[{\"name\":\"bob\",\"password\":\"mysecret\",\"roles\":[\"root\"]}]}]},\"securityDomains\":{\"brokerDomain\":{\"loginModules\":[{\"flag\":\"sufficient\",\"name\":\"prop-module\"}],\"name\...
2021-09-27T16:02:47.113Z DEBUG kubebuilder.controller Successfully Reconciled {"controller": "v1alpha1activemqartemissecurity-controller", "request": "sso-app-demo/broker-security"}
Judging by the logs above, it seems to miss executing this func entirely (I would expect to see some line like "Reconciling security" in the logs):
Is this a bug? Or is there something else that I need to add to the Broker CR, or the Operator, to get this particular function to run (the bit that does the reconciling)?
Thanks!
Describe the bug
When user deploys an address CR to create a queue the operator shows successful
even if the queue failed to be created on broker (for example when the user
sets the auto-create-addresses to false).
To Reproduce
Steps to reproduce the behavior:
Platform (please complete the following information):
Expected behavior
Optional, use if not obvious. A clear and concise description of what you expected to happen.
Screenshots
Optional, add screenshots to help explain your problem.
Additional context
Optional. Add any other context about the problem here.
Is your feature request related to a problem? Please describe.
Some use cases (e.g. pulling an image from a private registry) require to execute the ActiveMQ Broker Pod in the context of a different ServiceAccount then the default one.
Describe the solution you'd like
It should be possible to reference a ServiceAccount in the ActiveMQArtemis
deploymentPlan spec.
apiVersion: broker.amq.io/v2alpha4
kind: ActiveMQArtemis
metadata:
name: example
spec:
deploymentPlan:
size: 1
image: my-private-registry.com/artemiscloud/activemq-artemis-broker-kubernetes:0.2.0
serviceAccount: myaccount
It's not the responsibility of the ActiveMQ Artemis to create the referenced ServiceAccount
Describe alternatives you've considered
Using mutating webhooks to modify the created Pods. But it would be much nicer to have this possibility built-in.
Describe the bug
This is an option that's avail on the image itself but not on the operator.
Expected behavior
Ability to enable AMQ_ENABLE_METRICS_PLUGIN from the operator yaml
Additional context
Optional. Add any other context about the problem here.
Describe the bug
enableMetricsPlugin change doesn't trigger a restart of brokers in statefulset
To Reproduce
Steps to reproduce the behavior:
Platform (please complete the following information):
Expected behavior
Optional, use if not obvious. A clear and concise description of what you expected to happen.
Screenshots
Optional, add screenshots to help explain your problem.
Additional context
Optional. Add any other context about the problem here.
Describe the bug
As kubernetes doesn't recognize Route resources the operator gets failure when
reading RouteList from it. It gives the following error:
2020-11-02T14:04:01.196Z ERROR controller_v2alpha3activemqartemis Failed to list deployed objects. {"error": "no matches for kind "Route" in version "route.openshift.io/v1""}
To Reproduce
Steps to reproduce the behavior:
Platform (please complete the following information):
Expected behavior
there should be no such error in the logs
Screenshots
Optional, add screenshots to help explain your problem.
Additional context
Optional. Add any other context about the problem here.
Is your feature request related to a problem? Please describe.
the init container image used to config broker currently hard coded.
(e.g. registry.redhat.io/amq7/amq-broker-init-rhel7:0.2). That's not very convenient for
users who want to test it on other locations (like quay.io). It has to be changed in the source
code and recompile operator.
Describe the solution you'd like
Provide a parameter that allow user to config the init image url.
Describe alternatives you've considered
Additional context
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
Optional. A clear and concise description of any alternative solutions or features you've considered.
Additional context
Optional. Add any other context or screenshots about the feature request here.
Is your feature request related to a problem? Please describe.
The timeoutSeconds for readiness and liveness probes cannot be configured in broker CR.
Describe the solution you'd like
Adding new configuration parameters to the CRD so users can configure the timeouts for the probes.
Describe alternatives you've considered
Optional. A clear and concise description of any alternative solutions or features you've considered.
Additional context
Optional. Add any other context or screenshots about the feature request here.
Describe the bug
Deployment in crasloopback state due missing field in openAPIV3Schema.
To Reproduce
Steps to reproduce the behavior:
Describe the bug
If user specifies an image in the broker cr and deployed the image is not used and the operator automatically determined to use latest broker image as if the Image field is 'placeholder'
To Reproduce
Steps to reproduce the behavior:
Create a CR with specified image, e.g.
...
spec:
deploymentPlan:
size: 1
image: quay.io/hgao/amq-openshift-image:v1.0
deployed it and check the pod using
oc/kubectl get pod ex-aao-ss-0 -o yaml
The container image will not be the one you specified.
Platform (please complete the following information):
Expected behavior
Optional, use if not obvious. A clear and concise description of what you expected to happen.
Screenshots
Optional, add screenshots to help explain your problem.
Additional context
Optional. Add any other context about the problem here.
Describe the bug
Once operator deploys a broker statefulset the security configuration cannot be updated by applying a security CR.
To Reproduce
Steps to reproduce the behavior:
Platform (please complete the following information):
Expected behavior
Optional, use if not obvious. A clear and concise description of what you expected to happen.
Screenshots
Optional, add screenshots to help explain your problem.
Additional context
Optional. Add any other context about the problem here.
Is your feature request related to a problem? Please describe.
At the moment the activemq-artemis-broker-image depends on cekit modules to do the work of configuring the broker create command and subsequent broker configuration used.
A more flexible and future proof solution can be found by using init containers.
Describe the solution you'd like
A new project activemq-artemis-broker-init has been started within the organization to facilitate this. In particular it depends on a templating mechanism, currently entitled YamlConfiger, which uses python jinja to produce the required files for the ActiveMQ Artemis etc directory based on a provided template.
The operator should be configured to utilize this new init container image when it is ready for use.
Describe the bug
When you put an invalid value in storage that will cause operator to crash
To Reproduce
Steps to reproduce the behavior:
apiVersion: broker.amq.io/v2alpha4
kind: ActiveMQArtemis
metadata:
name: ex-aao
spec:
deploymentPlan:
size: 1
image: placeholder
persistenceEnabled: true
storage:
size: 2Gx
Platform (please complete the following information):
Expected behavior
Optional, use if not obvious. A clear and concise description of what you expected to happen.
Screenshots
Optional, add screenshots to help explain your problem.
Additional context
Optional. Add any other context about the problem here.
Is your feature request related to a problem? Please describe.
With the move to generating broker configuration via the YamlConfiger tool a way to get the users desired configuration from the custom resource and into an appropriate template is required.
Describe the solution you'd like
An independently buildable cr2jinja tool can be added to the operator's tools directory like the previously added csv-gen tool. This tool can then be built independently yet depend on other aspects of the operator codebase such as the CRD's and associated go side structs.
Describe alternatives you've considered
Originally the thought here was that this would be internal to the operator itself and the functionality would not be exposed externally. However it is also desired to make the tool generally useful in concert with the YamlConfiger tool for configuring ActiveMQ Artemis brokers in general, whether running within kubernetes or not. Being able to be built and executed independently will allow for usage independent of deployment on kubernetes.
Describe the bug
Currently when we bump the crds the client api code cannot be generated by operator-sdk
the code-gen util seems broken. Fix it and add proper doc.
To Reproduce
Steps to reproduce the behavior:
Platform (please complete the following information):
Expected behavior
Optional, use if not obvious. A clear and concise description of what you expected to happen.
Screenshots
Optional, add screenshots to help explain your problem.
Additional context
Optional. Add any other context about the problem here.
Is your feature request related to a problem? Please describe.
Currently user cannot create an address with no queues using the address CR. Also the queue creation doesn't have a way to specify queue configurations (like filter string, durable, routingType etc)
Describe the solution you'd like
We can extend the address CRD to allow for the address-only creation and more queue creation configuration.
Describe alternatives you've considered
Optional. A clear and concise description of any alternative solutions or features you've considered.
Additional context
Optional. Add any other context or screenshots about the feature request here.
Describe the bug
When the username and password are not specified in the AMQ CR, then the password is randomly generated.
This password gets changed when the operator is restarted or upgraded.
To Reproduce
Steps to reproduce the behavior:
Platform (please complete the following information):
Expected behavior
Optional, use if not obvious. A clear and concise description of what you expected to happen.
Screenshots
Optional, add screenshots to help explain your problem.
Additional context
Optional. Add any other context about the problem here.
Describe the bug
I tried to set the redistributionDelay to a different value than 0 (default in cluster mode) but got parsing error when deploying:
java.lang.IllegalStateException: Invalid configuration at org.apache.activemq.artemis.utils.XMLUtil.validate(XMLUtil.java:365) at org.apache.activemq.artemis.core.config.FileDeploymentManager.readConfiguration(FileDeploymentManager.java:80) at org.apache.activemq.artemis.integration.FileBroker.createComponents(FileBroker.java:118) at org.apache.activemq.artemis.cli.commands.Run.execute(Run.java:113) at org.apache.activemq.artemis.cli.Artemis.internalExecute(Artemis.java:155) at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:103) at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:130) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.activemq.artemis.boot.Artemis.execute(Artemis.java:134) at org.apache.activemq.artemis.boot.Artemis.main(Artemis.java:50) Caused by: org.xml.sax.SAXParseException; cvc-complex-type.2.4.a: Invalid content was found starting with element 'redistribution-delay'. One of '{"urn:activemq:core":dead-letter-address, "urn:activemq:core":auto-create-dead-letter-resources, "urn:activemq:core":dead-letter-queue-prefix, "urn:activemq:core":dead-letter-queue-suffix, "urn:activemq:core":expiry-address, "urn:activemq:core":auto-create-expiry-resources, "urn:activemq:core":expiry-queue-prefix, "urn:activemq:core":expiry-queue-suffix, "urn:activemq:core":expiry-delay, "urn:activemq:core":min-expiry-delay, "urn:activemq:core":max-expiry-delay, "urn:activemq:core":redelivery-delay, "urn:activemq:core":redelivery-delay-multiplier, "urn:activemq:core":redelivery-collision-avoidance-factor, "urn:activemq:core":max-redelivery-delay, "urn:activemq:core":max-delivery-attempts, "urn:activemq:core":max-size-bytes, "urn:activemq:core":max-size-bytes-reject-threshold, "urn:activemq:core":page-size-bytes, "urn:activemq:core":page-max-cache-size, "urn:activemq:core":address-full-policy, "urn:activemq:core":message-counter-history-day-limit, "urn:activemq:core":last-value-queue, "urn:activemq:core":default-last-value-queue, "urn:activemq:core":default-last-value-key, "urn:activemq:core":default-non-destructive, "urn:activemq:core":default-exclusive-queue, "urn:activemq:core":default-group-rebalance, "urn:activemq:core":default-group-rebalance-pause-dispatch, "urn:activemq:core":default-group-buckets, "urn:activemq:core":default-group-first-key, "urn:activemq:core":default-consumers-before-dispatch, "urn:activemq:core":default-delay-before-dispatch, "urn:activemq:core":send-to-dla-on-no-route, "urn:activemq:core":slow-consumer-threshold, "urn:activemq:core":slow-consumer-threshold-measurement-unit, "urn:activemq:core":slow-consumer-policy, "urn:activemq:core":slow-consumer-check-period, "urn:activemq:core":auto-create-jms-queues, "urn:activemq:core":auto-delete-jms-queues, "urn:activemq:core":auto-create-jms-topics, "urn:activemq:core":auto-delete-jms-topics, "urn:activemq:core":auto-create-queues, "urn:activemq:core":auto-delete-queues, "urn:activemq:core":auto-delete-created-queues, "urn:activemq:core":auto-delete-queues-delay, "urn:activemq:core":auto-delete-queues-message-count, "urn:activemq:core":config-delete-queues, "urn:activemq:core":auto-create-addresses, "urn:activemq:core":auto-delete-addresses, "urn:activemq:core":auto-delete-addresses-delay, "urn:activemq:core":config-delete-addresses, "urn:activemq:core":config-delete-diverts, "urn:activemq:core":management-browse-page-size, "urn:activemq:core":management-message-attribute-size-limit, "urn:activemq:core":default-purge-on-no-consumers, "urn:activemq:core":default-max-consumers, "urn:activemq:core":default-queue-routing-type, "urn:activemq:core":default-address-routing-type, "urn:activemq:core":default-consumer-window-size, "urn:activemq:core":default-ring-size, "urn:activemq:core":retroactive-message-count, "urn:activemq:core":enable-metrics, "urn:activemq:core":enable-ingress-timestamp}' is expected.
To Reproduce
Steps to reproduce the behavior:
Platform (please complete the following information):
Expected behavior
Optional, use if not obvious. A clear and concise description of what you expected to happen.
Screenshots
Optional, add screenshots to help explain your problem.
Additional context
Optional. Add any other context about the problem here.
Is your feature request related to a problem? Please describe.
With custom init user can use their own configuration methods/resources to config broker. Secrets and configmaps are common for users to store and retrieve configuration values for the broker. Adding this feature would allow users to use these resources in configuration scripts within custom init container.
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
Optional. A clear and concise description of any alternative solutions or features you've considered.
Additional context
Optional. Add any other context or screenshots about the feature request here.
Describe the bug
Based on artemis documentation: https://activemq.apache.org/components/artemis/documentation/latest/undelivered-messages.html
the collision-avoidance-factor setting must be a float between 0 and 1. But when configuring it as such(e.g. 0.3) in the CR and deploy it fails with following error:
The ActiveMQArtemis "ex-aao" is invalid: spec.addressSettings.addressSetting.redeliveryCollisionAvoidanceFactor: Invalid value: "string": spec.addressSettings.addressSetting.redeliveryCollisionAvoidanceFactor in body must be of type number: "string"
To Reproduce
Platform (please complete the following information):
Expected behavior
Optional, use if not obvious. A clear and concise description of what you expected to happen.
Screenshots
Optional, add screenshots to help explain your problem.
Additional context
Optional. Add any other context about the problem here.
How to produce the error :
make build
stack trace:
INFO[0000] Running deepcopy code-generation for Custom Resource group versions: [broker:[v2alpha1 v2alpha2], clientset:[versioned], ]
INFO[0002] Code-generation complete.
# github.com/artemiscloud/activemq-artemis-operator/pkg/client/clientset/versioned/typed/broker/v2alpha1/fake
pkg/client/clientset/versioned/typed/broker/v2alpha1/fake/fake_activemqartemis.go:132:44: not enough arguments in call to testing.NewPatchSubresourceAction
have (schema.GroupVersionResource, string, string, []byte, []string...)
want (schema.GroupVersionResource, string, string, types.PatchType, []byte, ...string)
pkg/client/clientset/versioned/typed/broker/v2alpha1/fake/fake_activemqartemisaddress.go:132:44: not enough arguments in call to testing.NewPatchSubresourceAction
have (schema.GroupVersionResource, string, string, []byte, []string...)
want (schema.GroupVersionResource, string, string, types.PatchType, []byte, ...string)
pkg/client/clientset/versioned/typed/broker/v2alpha1/fake/fake_activemqartemisscaledown.go:134:44: not enough arguments in call to testing.NewPatchSubresourceAction
have (schema.GroupVersionResource, string, string, []byte, []string...)
want (schema.GroupVersionResource, string, string, types.PatchType, []byte, ...string)
pkg/client/clientset/versioned/typed/broker/v2alpha1/fake/fake_broker_client.go:30:35: cannot use &FakeActiveMQArtemises literal (type *FakeActiveMQArtemises) as type "github.com/artemiscloud/activemq-artemis-operator/pkg/client/clientset/versioned/typed/broker/v2alpha1".ActiveMQArtemisInterface in return argument:
*FakeActiveMQArtemises does not implement "github.com/artemiscloud/activemq-artemis-operator/pkg/client/clientset/versioned/typed/broker/v2alpha1".ActiveMQArtemisInterface (wrong type for Create method)
have Create(*"github.com/artemiscloud/activemq-artemis-operator/pkg/apis/broker/v2alpha1".ActiveMQArtemis) (*"github.com/artemiscloud/activemq-artemis-operator/pkg/apis/broker/v2alpha1".ActiveMQArtemis, error)
want Create(*v2alpha2.ActiveMQArtemis) (*v2alpha2.ActiveMQArtemis, error)
# github.com/artemiscloud/activemq-artemis-operator/pkg/client/clientset/versioned/typed/broker/v2alpha2/fake
pkg/client/clientset/versioned/typed/broker/v2alpha2/fake/fake_activemqartemis.go:132:44: not enough arguments in call to testing.NewPatchSubresourceAction
have (schema.GroupVersionResource, string, string, []byte, []string...)
want (schema.GroupVersionResource, string, string, types.PatchType, []byte, ...string)
# github.com/artemiscloud/activemq-artemis-operator/pkg/client/informers/externalversions/broker/v2alpha1
pkg/client/informers/externalversions/broker/v2alpha1/activemqartemisscaledown.go:64:5: not enough arguments to return
pkg/client/informers/externalversions/broker/v2alpha1/activemqartemisscaledown.go:64:35: client.BrokerV2alpha1().ActiveMQArtemisScaledowns undefined (type "github.com/artemiscloud/activemq-artemis-operator/pkg/client/clientset/versioned/typed/broker/v2alpha1".BrokerV2alpha1Interface has no field or method ActiveMQArtemisScaledowns)
pkg/client/informers/externalversions/broker/v2alpha1/activemqartemisscaledown.go:70:5: not enough arguments to return
pkg/client/informers/externalversions/broker/v2alpha1/activemqartemisscaledown.go:70:35: client.BrokerV2alpha1().ActiveMQArtemisScaledowns undefined (type "github.com/artemiscloud/activemq-artemis-operator/pkg/client/clientset/versioned/typed/broker/v2alpha1".BrokerV2alpha1Interface has no field or method ActiveMQArtemisScaledowns)
# github.com/artemiscloud/activemq-artemis-operator/pkg/resources/environments
pkg/resources/environments/environment.go:152:3: github.com/artemiscloud/activemq-artemis-operator/vendor/k8s.io/api/core/v1.EnvVar composite literal uses unkeyed fields
pkg/resources/environments/environment.go:157:3: github.com/artemiscloud/activemq-artemis-operator/vendor/k8s.io/api/core/v1.EnvVar composite literal uses unkeyed fields
pkg/resources/environments/environment.go:162:3: github.com/artemiscloud/activemq-artemis-operator/vendor/k8s.io/api/core/v1.EnvVar composite literal uses unkeyed fields
pkg/resources/environments/environment.go:167:3: github.com/artemiscloud/activemq-artemis-operator/vendor/k8s.io/api/core/v1.EnvVar composite literal uses unkeyed fields
pkg/resources/environments/environment.go:172:3: github.com/artemiscloud/activemq-artemis-operator/vendor/k8s.io/api/core/v1.EnvVar composite literal uses unkeyed fields
pkg/resources/environments/environment.go:177:3: github.com/artemiscloud/activemq-artemis-operator/vendor/k8s.io/api/core/v1.EnvVar composite literal uses unkeyed fields
pkg/resources/environments/environment.go:182:3: github.com/artemiscloud/activemq-artemis-operator/vendor/k8s.io/api/core/v1.EnvVar composite literal uses unkeyed fields
pkg/resources/environments/environment.go:187:3: github.com/artemiscloud/activemq-artemis-operator/vendor/k8s.io/api/core/v1.EnvVar composite literal uses unkeyed fields
pkg/resources/environments/environment.go:192:3: github.com/artemiscloud/activemq-artemis-operator/vendor/k8s.io/api/core/v1.EnvVar composite literal uses unkeyed fields
pkg/resources/environments/environment.go:197:3: github.com/artemiscloud/activemq-artemis-operator/vendor/k8s.io/api/core/v1.EnvVar composite literal uses unkeyed fields
pkg/resources/environments/environment.go:202:3: github.com/artemiscloud/activemq-artemis-operator/vendor/k8s.io/api/core/v1.EnvVar composite literal uses unkeyed fields
pkg/resources/environments/environment.go:207:3: github.com/artemiscloud/activemq-artemis-operator/vendor/k8s.io/api/core/v1.EnvVar composite literal uses unkeyed fields
pkg/resources/environments/environment.go:212:3: github.com/artemiscloud/activemq-artemis-operator/vendor/k8s.io/api/core/v1.EnvVar composite literal uses unkeyed fields
pkg/resources/environments/environment.go:217:3: github.com/artemiscloud/activemq-artemis-operator/vendor/k8s.io/api/core/v1.EnvVar composite literal uses unkeyed fields
pkg/resources/environments/environment.go:230:3: github.com/artemiscloud/activemq-artemis-operator/vendor/k8s.io/api/core/v1.EnvVar composite literal uses unkeyed fields
pkg/resources/environments/environment.go:235:3: github.com/artemiscloud/activemq-artemis-operator/vendor/k8s.io/api/core/v1.EnvVar composite literal uses unkeyed fields
pkg/resources/environments/environment.go:301:3: github.com/artemiscloud/activemq-artemis-operator/vendor/k8s.io/api/core/v1.EnvVar composite literal uses unkeyed fields
pkg/resources/environments/environment.go:306:3: github.com/artemiscloud/activemq-artemis-operator/vendor/k8s.io/api/core/v1.EnvVar composite literal uses unkeyed fields
pkg/resources/environments/environment.go:311:3: github.com/artemiscloud/activemq-artemis-operator/vendor/k8s.io/api/core/v1.EnvVar composite literal uses unkeyed fields
pkg/resources/environments/environment.go:354:16: github.com/artemiscloud/activemq-artemis-operator/vendor/k8s.io/api/core/v1.EnvVar composite literal uses unkeyed fields
pkg/resources/environments/environment.go:383:16: github.com/artemiscloud/activemq-artemis-operator/vendor/k8s.io/api/core/v1.EnvVar composite literal uses unkeyed fields
pkg/resources/environments/environment.go:410:33: github.com/artemiscloud/activemq-artemis-operator/vendor/k8s.io/api/core/v1.EnvVar composite literal uses unkeyed fields
# github.com/artemiscloud/activemq-artemis-operator/pkg/controller/broker/v2alpha2/activemqartemisaddress
pkg/controller/broker/v2alpha2/activemqartemisaddress/address_observer.go:104:23: github.com/artemiscloud/activemq-artemis-operator/vendor/k8s.io/apimachinery/pkg/types.NamespacedName composite literal uses unkeyed fields
pkg/controller/broker/v2alpha2/activemqartemisaddress/address_observer.go:148:24: github.com/artemiscloud/activemq-artemis-operator/vendor/k8s.io/apimachinery/pkg/types.NamespacedName composite literal uses unkeyed fields
pkg/controller/broker/v2alpha2/activemqartemisaddress/address_observer.go:152:41: github.com/artemiscloud/activemq-artemis-operator/vendor/k8s.io/apimachinery/pkg/types.NamespacedName composite literal uses unkeyed fields
pkg/controller/broker/v2alpha2/activemqartemisaddress/address_observer.go:78:2: unreachable code
# github.com/artemiscloud/activemq-artemis-operator/pkg/controller/broker/v2alpha2/activemqartemis
pkg/controller/broker/v2alpha2/activemqartemis/activemqartemis_reconciler.go:794:24: github.com/artemiscloud/activemq-artemis-operator/vendor/k8s.io/api/core/v1.EnvVar composite literal uses unkeyed fields
pkg/controller/broker/v2alpha2/activemqartemis/activemqartemis_reconciler.go:837:23: github.com/artemiscloud/activemq-artemis-operator/vendor/k8s.io/api/core/v1.EnvVar composite literal uses unkeyed fields
pkg/controller/broker/v2alpha2/activemqartemis/activemqartemis_reconciler.go:847:30: github.com/artemiscloud/activemq-artemis-operator/vendor/k8s.io/api/core/v1.EnvVar composite literal uses unkeyed fields
pkg/controller/broker/v2alpha2/activemqartemis/activemqartemis_reconciler.go:1333:40: github.com/artemiscloud/activemq-artemis-operator/vendor/k8s.io/apimachinery/pkg/types.NamespacedName composite literal uses unkeyed fields
pkg/controller/broker/v2alpha2/activemqartemis/mocks_test.go
./scripts/catalog-source.sh: line 15: deploy/catalog_resources/redhat/catalog-source.yaml: No such file or directory
# github.com/artemiscloud/activemq-artemis-operator/pkg/client/clientset/versioned/typed/broker/v2alpha1/fake
pkg/client/clientset/versioned/typed/broker/v2alpha1/fake/fake_activemqartemis.go:132:44: not enough arguments in call to testing.NewPatchSubresourceAction
have (schema.GroupVersionResource, string, string, []byte, []string...)
want (schema.GroupVersionResource, string, string, types.PatchType, []byte, ...string)
pkg/client/clientset/versioned/typed/broker/v2alpha1/fake/fake_activemqartemisaddress.go:132:44: not enough arguments in call to testing.NewPatchSubresourceAction
have (schema.GroupVersionResource, string, string, []byte, []string...)
want (schema.GroupVersionResource, string, string, types.PatchType, []byte, ...string)
pkg/client/clientset/versioned/typed/broker/v2alpha1/fake/fake_activemqartemisscaledown.go:134:44: not enough arguments in call to testing.NewPatchSubresourceAction
have (schema.GroupVersionResource, string, string, []byte, []string...)
want (schema.GroupVersionResource, string, string, types.PatchType, []byte, ...string)
pkg/client/clientset/versioned/typed/broker/v2alpha1/fake/fake_broker_client.go:30:35: cannot use &FakeActiveMQArtemises literal (type *FakeActiveMQArtemises) as type "github.com/artemiscloud/activemq-artemis-operator/pkg/client/clientset/versioned/typed/broker/v2alpha1".ActiveMQArtemisInterface in return argument:
*FakeActiveMQArtemises does not implement "github.com/artemiscloud/activemq-artemis-operator/pkg/client/clientset/versioned/typed/broker/v2alpha1".ActiveMQArtemisInterface (wrong type for Create method)
have Create(*"github.com/artemiscloud/activemq-artemis-operator/pkg/apis/broker/v2alpha1".ActiveMQArtemis) (*"github.com/artemiscloud/activemq-artemis-operator/pkg/apis/broker/v2alpha1".ActiveMQArtemis, error)
want Create(*v2alpha2.ActiveMQArtemis) (*v2alpha2.ActiveMQArtemis, error)
# github.com/artemiscloud/activemq-artemis-operator/pkg/client/clientset/versioned/typed/broker/v2alpha2/fake
pkg/client/clientset/versioned/typed/broker/v2alpha2/fake/fake_activemqartemis.go:132:44: not enough arguments in call to testing.NewPatchSubresourceAction
have (schema.GroupVersionResource, string, string, []byte, []string...)
want (schema.GroupVersionResource, string, string, types.PatchType, []byte, ...string)
# github.com/artemiscloud/activemq-artemis-operator/pkg/client/informers/externalversions/broker/v2alpha1
pkg/client/informers/externalversions/broker/v2alpha1/activemqartemisscaledown.go:64:5: not enough arguments to return
pkg/client/informers/externalversions/broker/v2alpha1/activemqartemisscaledown.go:64:35: client.BrokerV2alpha1().ActiveMQArtemisScaledowns undefined (type "github.com/artemiscloud/activemq-artemis-operator/pkg/client/clientset/versioned/typed/broker/v2alpha1".BrokerV2alpha1Interface has no field or method ActiveMQArtemisScaledowns)
pkg/client/informers/externalversions/broker/v2alpha1/activemqartemisscaledown.go:70:5: not enough arguments to return
pkg/client/informers/externalversions/broker/v2alpha1/activemqartemisscaledown.go:70:35: client.BrokerV2alpha1().ActiveMQArtemisScaledowns undefined (type "github.com/artemiscloud/activemq-artemis-operator/pkg/client/clientset/versioned/typed/broker/v2alpha1".BrokerV2alpha1Interface has no field or method ActiveMQArtemisScaledowns)
? github.com/artemiscloud/activemq-artemis-operator/cmd/manager [no test files]
Describe the bug
I am trying to enable persistence volume for the broker cr. I have set the below values to true as per documentation but the pod does not come up. The pv/pvc creation is successful and also attached to the container but the pod is not responding(stuck in 0/1 Running status)
persistenceEnabled: true
messageMigration: true
Platform (please complete the following information):
Expected behavior
The persistent volume should be attached and the pod should run normally.
NAME READY STATUS RESTARTS AGE
activemq-artemis-operator-6c99865dfb-h967n 1/1 Running 0 17h
ex-aao-ss-0 0/1 Running 0 17m
Complete Log File Attached
MQ_Error_Log.txt
Describe the bug
If we expose the console on kubernetes (using ingress) with sslEnabled: true. It doesn't work.
To Reproduce
Steps to reproduce the behavior:
Platform (please complete the following information):
Expected behavior
Optional, use if not obvious. A clear and concise description of what you expected to happen.
Screenshots
Optional, add screenshots to help explain your problem.
Additional context
Optional. Add any other context about the problem here.
When we use here in cluster and 13 days ago we had a update, automatic update. This error below.
E0524 13:49:58.692629 1 runtime.go:69] Observed a panic: runtime.boundsError{x:0, y:0, signed:true, code:0x0} (runtime error: index out of range [0] with length 0)
/remote-source/app/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:76
/remote-source/app/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:65
/remote-source/app/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:51
/opt/rh/go-toolset-1.13/root/usr/lib/go-toolset-1.13-golang/src/runtime/panic.go:679
/opt/rh/go-toolset-1.13/root/usr/lib/go-toolset-1.13-golang/src/runtime/panic.go:75
/remote-source/app/pkg/controller/broker/v2alpha4/activemqartemis/activemqartemis_reconciler.go:1190
/remote-source/app/pkg/controller/broker/v2alpha4/activemqartemis/activemqartemis_reconciler.go:241
/remote-source/app/pkg/controller/broker/v2alpha4/activemqartemis/activemqartemis_reconciler.go:113
/remote-source/app/pkg/controller/broker/v2alpha4/activemqartemis/creatingk8sresources_state.go:137
/remote-source/app/pkg/utils/fsm/fsm.go:84
/remote-source/app/pkg/controller/broker/v2alpha4/activemqartemis/activemqartemis_fsm.go:128
/remote-source/app/pkg/controller/broker/v2alpha4/activemqartemis/activemqartemis_controller.go:155
/remote-source/app/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:215
/remote-source/app/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:158
/remote-source/app/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133
/remote-source/app/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:134
/remote-source/app/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88
/opt/rh/go-toolset-1.13/root/usr/lib/go-toolset-1.13-golang/src/runtime/asm_amd64.s:1357
panic: runtime error: index out of range [0] with length 0 [recovered]
panic: runtime error: index out of range [0] with length 0
goroutine 790 [running]:
k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0)
/remote-source/app/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:58 +0x105
panic(0x153be00, 0xc000fd6c20)
/opt/rh/go-toolset-1.13/root/usr/lib/go-toolset-1.13-golang/src/runtime/panic.go:679 +0x1b2
github.com/artemiscloud/activemq-artemis-operator/pkg/controller/broker/v2alpha4/activemqartemis.initImageSyncCausedUpdateOn(0xc0000a4500, 0xc000490000, 0x0)
/remote-source/app/pkg/controller/broker/v2alpha4/activemqartemis/activemqartemis_reconciler.go:1190 +0x363
github.com/artemiscloud/activemq-artemis-operator/pkg/controller/broker/v2alpha4/activemqartemis.(*ActiveMQArtemisReconciler).ProcessDeploymentPlan(0x22b428c, 0xc0000a4500, 0x1856b80, 0xc0006ce690, 0xc000153650, 0xc000490000, 0xc00031fc01, 0xc000490000)
/remote-source/app/pkg/controller/broker/v2alpha4/activemqartemis/activemqartemis_reconciler.go:241 +0x6f
github.com/artemiscloud/activemq-artemis-operator/pkg/controller/broker/v2alpha4/activemqartemis.(*ActiveMQArtemisReconciler).Process(0x22b428c, 0xc00031fbd0, 0x1856b80, 0xc0006ce690, 0xc000153650, 0x1, 0x2a)
/remote-source/app/pkg/controller/broker/v2alpha4/activemqartemis/activemqartemis_reconciler.go:113 +0x234
github.com/artemiscloud/activemq-artemis-operator/pkg/controller/broker/v2alpha4/activemqartemis.(*CreatingK8sResourcesState).Enter(0xc00031fcc0, 0xffffffffffffffff, 0x0, 0x0)
/remote-source/app/pkg/controller/broker/v2alpha4/activemqartemis/creatingk8sresources_state.go:137 +0x1b1
github.com/artemiscloud/activemq-artemis-operator/pkg/utils/fsm.(*Machine).Enter(0xc00031fc20, 0x0, 0xc00031fbd0, 0xc000380580)
/remote-source/app/pkg/utils/fsm/fsm.go:84 +0x76
github.com/artemiscloud/activemq-artemis-operator/pkg/controller/broker/v2alpha4/activemqartemis.(*ActiveMQArtemisFSM).Enter(0xc00031fb80, 0x0, 0xc000223c00, 0xc000380688)
/remote-source/app/pkg/controller/broker/v2alpha4/activemqartemis/activemqartemis_fsm.go:128 +0x50
github.com/artemiscloud/activemq-artemis-operator/pkg/controller/broker/v2alpha4/activemqartemis.(*ReconcileActiveMQArtemis).Reconcile(0xc00052bcb0, 0xc0004e0fc0, 0xe, 0xc0004e0fb0, 0x6, 0x5, 0x400, 0xc0004b2000, 0xd)
/remote-source/app/pkg/controller/broker/v2alpha4/activemqartemis/activemqartemis_controller.go:155 +0xb4d
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc0006a45a0, 0x44c000)
/remote-source/app/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:215 +0x20a
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func1()
/remote-source/app/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:158 +0x36
k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1(0xc000727710)
/remote-source/app/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133 +0x5e
k8s.io/apimachinery/pkg/util/wait.JitterUntil(0xc000727710, 0x3b9aca00, 0x0, 0x1, 0xc0007c41e0)
/remote-source/app/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:134 +0xf8
k8s.io/apimachinery/pkg/util/wait.Until(0xc000727710, 0x3b9aca00, 0xc0007c41e0)
/remote-source/app/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88 +0x4d
created by sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start
/remote-source/app/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:157 +0x32e
Describe the bug
User can't use address CR to create empty addresses, only queues can be created
To Reproduce
Steps to reproduce the behavior:
Platform (please complete the following information):
Expected behavior
Optional, use if not obvious. A clear and concise description of what you expected to happen.
Screenshots
Optional, add screenshots to help explain your problem.
Additional context
Optional. Add any other context about the problem here.
Describe the bug
When deploying a basic broker CR the statefulset is not create because the init image field is empty
Error message is like "Pod "myapp1-ss-0" is invalid: spec.initContainers[0].image: Required value"
To Reproduce
Steps to reproduce the behavior:
Platform (please complete the following information):
Expected behavior
Optional, use if not obvious. A clear and concise description of what you expected to happen.
Screenshots
Optional, add screenshots to help explain your problem.
Additional context
Optional. Add any other context about the problem here.
Is your feature request related to a problem? Please describe.
As the operator sdk has become more mature, more features have been added such as better metrics. With the move to the CNCF convergence and standardization is also taking place within Kubernetes.
Describe the solution you'd like
As each version bump changes how things work a little it may be the case that a big bang 0.8.2 -> 1.0 upgrade is not feasible. What might be required is to move in a more stepwise fashion through the versions to end up with the underpinnings provided by operator sdk 1.0.
Is your feature request related to a problem? Please describe.
Integrating the PVC of ActiveMQ Artemis with some storage providers sometimes requires to be able to define the SecurityContext which should be used for the Pod.
Describe the solution you'd like
It should be possible to define an optional SecurityContext in the ActiveMQArtemis
deploymentPlan spec.
apiVersion: broker.amq.io/v2alpha4
kind: ActiveMQArtemis
metadata:
name: example
spec:
deploymentPlan:
size: 1
image: quay.io/artemiscloud/activemq-artemis-broker-kubernetes:0.2.0
securityContext:
runAsUser: 1000
runAsGroup: 3000
fsGroup: 2000
The Operator should configure the StatefulSet to use the SecurityContext in the PodTemplate.
Describe alternatives you've considered
Using mutating webhooks to modify the created Pods. But it would be much nicer to have this possibility built-in.
Describe the bug
After the commit of PR#2 to 'migrate from dep to go mod and upgrade the version of sdk v0.8.2' the following error is seen in the logs:
{"level":"info","ts":1597843133.2972333,"logger":"cmd","msg":"failed to create or get service for metrics: services \"activemq-artemis-operator\" is forbidden: cannot set blockOwnerDeletion if an ownerReference refers to a resource you can't set finalizers on: no RBAC policy matched, <nil>"}
To Reproduce
Steps to reproduce the behavior:
Platform (please complete the following information):
Describe the bug
If a broker deployment already exists when the operator is scaled to 0 and scaled back to one, i.e. restarted, the following error is seen in the logs:
"
{"level":"error","ts":1601023311.010058,"logger":"controller_v2alpha3activemqartemis","msg":"Failed to create resource","ActiveMQArtemis Name":"ex-aao","kind":"ex-aao-credentials-secret","requested":{"apiVersion":"v1","kind":"Secret","namespace":"entmqbr-2885-0","name":"ex-aao-credentials-secret"},"error":"secrets "ex-aao-credentials-secret" already exists"
"
To Reproduce
Steps to reproduce the behavior:
The above occurred on master at commit 26743dab69a40ef21ec6b605d81a4502560c832f after the addition of v2alpha3, however had been observed prior to the addition of v2alpha3 in the past.
Platform (please complete the following information):
Expected behavior
Operator should not report an error if the credential secret is already in existence as the use case is valid.
Additional context
Full stacktrace:
{"level":"error","ts":1601023311.010058,"logger":"controller_v2alpha3activemqartemis","msg":"Failed to create resource","ActiveMQArtemis Name":"ex-aao","kind":"ex-aao-credentials-secret","requested":{"apiVersion":"v1","kind":"Secret","namespace":"entmqbr-2885-0","name":"ex-aao-credentials-secret"},"error":"secrets "ex-aao-credentials-secret" already exists","stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error\n\t/tmp/go/pkg/mod/github.com/go-logr/[email protected]/zapr.go:128\ngithub.com/artemiscloud/activemq-artemis-operator/pkg/controller/broker/v2alpha3/activemqartemis.(*ActiveMQArtemisReconciler).ProcessUpgrade\n\t/tmp/go/src/github.com/artemiscloud/activemq-artemis-operator/pkg/controller/broker/v2alpha3/activemqartemis/activemqartemis_reconciler.go:1015\ngithub.com/artemiscloud/activemq-artemis-operator/pkg/controller/broker/v2alpha3/activemqartemis.(*ActiveMQArtemisReconciler).Process\n\t/tmp/go/src/github.com/artemiscloud/activemq-artemis-operator/pkg/controller/broker/v2alpha3/activemqartemis/activemqartemis_reconciler.go:120\ngithub.com/artemiscloud/activemq-artemis-operator/pkg/controller/broker/v2alpha3/activemqartemis.(*CreatingK8sResourcesState).enterFromInvalidState\n\t/tmp/go/src/github.com/artemiscloud/activemq-artemis-operator/pkg/controller/broker/v2alpha3/activemqartemis/creatingk8sresources_state.go:148\ngithub.com/artemiscloud/activemq-artemis-operator/pkg/controller/broker/v2alpha3/activemqartemis.(*CreatingK8sResourcesState).Enter\n\t/tmp/go/src/github.com/artemiscloud/activemq-artemis-operator/pkg/controller/broker/v2alpha3/activemqartemis/creatingk8sresources_state.go:163\ngithub.com/artemiscloud/activemq-artemis-operator/pkg/utils/fsm.(*Machine).Enter\n\t/tmp/go/src/github.com/artemiscloud/activemq-artemis-operator/pkg/utils/fsm/fsm.go:84\ngithub.com/artemiscloud/activemq-artemis-operator/pkg/controller/broker/v2alpha3/activemqartemis.(*ActiveMQArtemisFSM).Enter\n\t/tmp/go/src/github.com/artemiscloud/activemq-artemis-operator/pkg/controller/broker/v2alpha3/activemqartemis/activemqartemis_fsm.go:124\ngithub.com/artemiscloud/activemq-artemis-operator/pkg/controller/broker/v2alpha3/activemqartemis.(*ReconcileActiveMQArtemis).Reconcile\n\t/tmp/go/src/github.com/artemiscloud/activemq-artemis-operator/pkg/controller/broker/v2alpha3/activemqartemis/activemqartemis_controller.go:154\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/tmp/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:215\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func1\n\t/tmp/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:158\nk8s.io/apimachinery/pkg/util/wait.JitterUntil.func1\n\t/tmp/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:133\nk8s.io/apimachinery/pkg/util/wait.JitterUntil\n\t/tmp/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:134\nk8s.io/apimachinery/pkg/util/wait.Until\n\t/tmp/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:88"}
Is your feature request related to a problem? Please describe.
Currently the broker is clustered by default, even if only one broker pod is deployed.
In some use-case where clustering is not needed there is no way to turn it off.
Describe the solution you'd like
Added a "Clustered" option to the broker CRD so that users can turn clustering off
Describe alternatives you've considered
Optional. A clear and concise description of any alternative solutions or features you've considered.
Additional context
Optional. Add any other context or screenshots about the feature request here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.