I tried to deploy a simple metrics beat CRD with the following manifest (Taken from the samples).
apiVersion: beat.k8s.elastic.co/v1beta1
kind: Beat
metadata:
name: heartbeat
namespace: elastic-system
spec:
type: heartbeat
version: 7.8.0
elasticsearchRef:
name: observe
namespace: elastic-system
kibanaRef:
name: observe
namespace: elastic-system
config:
heartbeat.monitors:
- type: tcp
schedule: '@every 5s'
hosts: ["observe-es-http.elastic-system.svc:9200"]
- type: tcp
schedule: '@every 5s'
hosts: ["observe-kb-http.elastic-system.svc:5601"]
deployment:
replicas: 1
podTemplate:
spec:
securityContext:
runAsUser: 0
After it is deployed, only the following resources are created:
NAMESPACE NAME READY REASON AGE
elastic-system Beat/heartbeat - 8m23s
elastic-system ├─Secret/heartbeat-beat-es-ca - 8m23s
elastic-system ├─Secret/heartbeat-beat-kb-user - 8m23s
elastic-system └─Secret/heartbeat-beat-user - 8m23s
I see the following error on elastic operator,
`{"log.level":"error","@timestamp":"2020-07-22T21:37:41.732Z","log.logger":"controller-runtime.controller","message":"Reconciler error","service.version":"1.2.0-51ae5fd4","service.type":"eck","ecs.version":"1.4.0","controller":"beat-es-association-controller","request":"elastic-system/heartbeat","error":"Operation cannot be fulfilled on beats.beat.k8s.elastic.co \"heartbeat\": the object has been modified; please apply your changes to the latest version and try again","error.stack_trace":"github.com/go-logr/zapr.(*zapLogger).Error\n\t/go/pkg/mod/github.com/go-logr/zapr@v0.1.0/zapr.go:128\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.5.0/pkg/internal/controller/controller.go:258\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.5.0/pkg/internal/controller/controller.go:232\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.5.0/pkg/internal/controller/controller.go:211\nk8s.io/apimachinery/pkg/util/wait.JitterUntil.func1\n\t/go/pkg/mod/k8s.io/apimachinery@v0.17.2/pkg/util/wait/wait.go:152\nk8s.io/apimachinery/pkg/util/wait.JitterUntil\n\t/go/pkg/mod/k8s.io/apimachinery@v0.17.2/pkg/util/wait/wait.go:153\nk8s.io/apimachinery/pkg/util/wait.Until\n\t/go/pkg/mod/k8s.io/apimachinery@v0.17.2/pkg/util/wait/wait.go:88"}`
`{"log.level":"error","@timestamp":"2020-07-22T21:37:42.219Z","log.logger":"controller-runtime.controller","message":"Reconciler error","service.version":"1.2.0-51ae5fd4","service.type":"eck","ecs.version":"1.4.0","controller":"beat-es-association-controller","request":"elastic-system/heartbeat","error":"Operation cannot be fulfilled on beats.beat.k8s.elastic.co \"heartbeat\": the object has been modified; please apply your changes to the latest version and try again","error.stack_trace":"github.com/go-logr/zapr.(*zapLogger).Error\n\t/go/pkg/mod/github.com/go-logr/zapr@v0.1.0/zapr.go:128\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.5.0/pkg/internal/controller/controller.go:258\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.5.0/pkg/internal/controller/controller.go:232\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.5.0/pkg/internal/controller/controller.go:211\nk8s.io/apimachinery/pkg/util/wait.JitterUntil.func1\n\t/go/pkg/mod/k8s.io/apimachinery@v0.17.2/pkg/util/wait/wait.go:152\nk8s.io/apimachinery/pkg/util/wait.JitterUntil\n\t/go/pkg/mod/k8s.io/apimachinery@v0.17.2/pkg/util/wait/wait.go:153\nk8s.io/apimachinery/pkg/util/wait.Until\n\t/go/pkg/mod/k8s.io/apimachinery@v0.17.2/pkg/util/wait/wait.go:88"}`
My stack looks like this:
NAME HEALTH NODES VERSION PHASE AGE
elasticsearch.elasticsearch.k8s.elastic.co/observe green 6 7.8.0 Ready 50d
NAME HEALTH NODES VERSION AGE
kibana.kibana.k8s.elastic.co/observe green 2 7.8.0 50d
NAME HEALTH NODES VERSION AGE
apmserver.apm.k8s.elastic.co/observe green 2 7.8.0 6d1h
NAME HEALTH AVAILABLE EXPECTED TYPE VERSION AGE
beat.beat.k8s.elastic.co/heartbeat heartbeat 7.8.0 15m
Is there any problem with the manifest or this is a bug?