-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Display the stability status of the Elastic Agent (#17336)
* Display the stability status of the Elastic Agent The Elastic Agent is currently Alpha quality software and is not ready to be used in a production environment, this commit make it obvious in the logs on startup and at enrollment. Note this doesn't use the cfgwarn helpers for two reasons: - We aren't using zap in the Elastic Agent code. - We also need to print on standout. This also add a "warn" package where the messaging can be edited once. Fixes: #17328 * Add a changelog entry
- Loading branch information
Showing
4 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
// or more contributor license agreements. Licensed under the Elastic License; | ||
// you may not use this file except in compliance with the Elastic License. | ||
|
||
package warn | ||
|
||
import ( | ||
"fmt" | ||
"io" | ||
|
||
"github.com/elastic/beats/v7/x-pack/agent/pkg/core/logger" | ||
) | ||
|
||
const message = "The Elastic Agent is currently in Alpha and should not be used in production" | ||
|
||
// LogNotGA warns the users in the log that the Elastic Agent is not GA. | ||
func LogNotGA(log *logger.Logger) { | ||
log.Info(message) | ||
} | ||
|
||
// PrintNotGA writes to the received writer that the Agent is not GA. | ||
func PrintNotGA(output io.Writer) { | ||
fmt.Fprintln(output, message) | ||
} |