jichengzhi commented on code in PR #113: URL: https://github.com/apache/skywalking-swck/pull/113#discussion_r1564720085
########## operator/apis/operator/v1alpha1/eventexporter_types.go: ########## @@ -0,0 +1,78 @@ +// Licensed to Apache Software Foundation (ASF) under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Apache Software Foundation (ASF) licenses this file to you 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. + +package v1alpha1 + +import ( + appsv1 "k8s.io/api/apps/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// EventExporterSpec defines the desired state of EventExporter +type EventExporterSpec struct { + // Version of EventExporter. + // +kubebuilder:validation:Required + Version string `json:"version,omitempty"` + // Image is the event exporter Docker image to deploy. + Image string `json:"image,omitempty"` + // Replicas is the number of event exporter pods + // +kubebuilder:validation:Required + Replicas int32 `json:"replicas,omitempty"` + // Config of filters and exporters + // +kubebuilder:validation:Optional + Config string `json:"config,omitempty"` +} + +// Important: Run "make" to regenerate code after modifying this file + +// EventExporterStatus defines the observed state of EventExporter +type EventExporterStatus struct { Review Comment: Thx for reply! I wanted to exploit the default config in event exporter even though the [default address](https://github.com/apache/skywalking-kubernetes-event-exporter/blob/9ad39c47eb347f13c0003d1ecd05c843c6d511ea/assets/default-config.yaml#L42) won't work in k8s. Creating a configMap for all possible content is better because it facilitates config update handling (configMap always exist) and makes more sense if config is empty (no exporters >>> 100% failed exporter). I didn't figure this out before. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
