Skip to content

Commit

Permalink
[v2] Merge July 27th main into v2 feature branch (#789)
Browse files Browse the repository at this point in the history
* [Automation] Update elastic stack version to 8.4.0-40cff009 for testing (#557)

Co-authored-by: apmmachine <[email protected]>

* [Automation] Update elastic stack version to 8.4.0-5e6770b1 for testing (#564)

Co-authored-by: apmmachine <[email protected]>

* Fix regression and use comma separated values (#560)

Fix regression from #509

* Change in Jenkinsfile will trigger k8s run (#568)

* [Automation] Update elastic stack version to 8.4.0-da5a1c6d for testing (#573)

Co-authored-by: apmmachine <[email protected]>

* Add `@metadata.input_id` and `@metadata.stream_id` when injecting streams (#527)

These 2 value are going to be used in the shipper to identify where an
event came from in order to apply processors accordingly.

Also, added test cases for the processor to verify the change and updated test cases with the new processor.

* Add filemod times to contents of diagnostics collect command (#570)

* Add filemod times to contents of diagnostics collect command

Add filemod times to the files and directories in the zip archive.
Log files (and sub dirs) will use the modtime returned by the fileinfo
for the source. Others will use the timestamp from when the zip is
created.

* Fix linter

* [Automation] Update elastic stack version to 8.4.0-b13123ee for testing (#581)

Co-authored-by: apmmachine <[email protected]>

* Fix Agent upgrade 8.2->8.3 (#578)

* Fix Agent upgrade 8.2->8.3
* Improve the upgrade encryption handling. Add .yml files cleanup.
* Rollback ActionUpgrade to action_id, add MarkerActionUpgrade adapter struct for marker serialization compatibility

* Update containerd (#577)

* [Automation] Update elastic stack version to 8.4.0-4fe26f2a for testing (#591)

Co-authored-by: apmmachine <[email protected]>

* Set explicit ExitTimeOut for MacOS agent launchd plist (#594)

* Set explicit ExitTimeOut for MacOS agent launchd plist

* [Automation] Update elastic stack version to 8.4.0-2e32a640 for testing (#599)

Co-authored-by: apmmachine <[email protected]>

* ci: enable build notifications as GitHub issues (#595)

* status identifies failing component, fleet gateway may report degraded, liveness endpoint added (#569)

* Add liveness endpoint

Add /liveness route to metrics server. This route will report the status
from pkg/core/status. fleet-gateway will now report a degraded state if
a checkin fails. This may not propogate to fleet-server as a failed
checkin means communications between the agent and the server are not
working. It may also lead to the server reporting degraded for up to 30s
(fleet-server polling time) when teh agent is able to successfully
connect.

* linter fix

* add nolint direcrtive

* Linter fix

* Review feedback, add doc strings

* Rename noop controller file to _test file

* [Automation] Update elastic stack version to 8.4.0-722a7d79 for testing (#607)

Co-authored-by: apmmachine <[email protected]>

* ci: enable flaky test detector (#605)

* [Automation] Update elastic stack version to 8.4.0-210dd487 for testing (#620)

Co-authored-by: apmmachine <[email protected]>

* mergify: remove backport automation for non active branches (#615)

* chore: use elastic-agent profile to run the E2E tests (#610)

* [Automation] Update elastic stack version to 8.4.0-a6aa9f3b for testing (#631)

Co-authored-by: apmmachine <[email protected]>

* add macros pointing to new agent's repo and fix old macro calls (#458)

* Add mount of /etc/machine-id for managed Agent in k8s (#530)

* Set hostPID=true for managed agent in k8s (#528)

* Set hostPID=true for managed agent in k8s

* Add comment on hostPID.

* [Automation] Update elastic stack version to 8.4.0-86cc80f3 for testing (#648)

Co-authored-by: apmmachine <[email protected]>

* Update elastic-agent-libs version: includes restriction on default VerificationMode to `full` (#521)

* update version

* mage fmt update

* update dependency

* update changelog

* redact sensitive information in diagnostics collect command (#566)

* Support Cloudbeat regex input type  (#638)

* support input type with regex

* Update supported.go

* Changing the regex to support backward compatible

* Disable flaky test download test (#641)

* [Automation] Update elastic stack version to 8.4.0-3d206b5d for testing (#656)

Co-authored-by: apmmachine <[email protected]>

* [Automation] Update elastic stack version to 8.4.0-3ad82aa8 for testing (#661)

Co-authored-by: apmmachine <[email protected]>

* jjbb: exclude allowed branches, tags and PRs (#658)

cosmetic change in the description and boolean based

* Update elastic-agent-project-board.yml (#649)

* ci: fix labels that clashes with the Orka workers (#659)

* [Automation] Update elastic stack version to 8.4.0-03bd6f3f for testing (#668)

Co-authored-by: apmmachine <[email protected]>

* [Automation] Update elastic stack version to 8.4.0-533f1e30 for testing (#675)

Co-authored-by: apmmachine <[email protected]>

* Osquerybeat: Fix osquerybeat is not running with logstash output (#674)

* [Automation] Update elastic stack version to 8.4.0-d0a4da44 for testing (#684)

Co-authored-by: apmmachine <[email protected]>

* [Automation] Update elastic stack version to 8.4.0-dd98ded4 for testing (#703)

Co-authored-by: apmmachine <[email protected]>

* [Automation] Update elastic stack version to 8.4.0-164d9a10 for testing (#705)

Co-authored-by: apmmachine <[email protected]>

* Add missing license headers (#711)

* [Automation] Update elastic stack version to 8.4.0-00048b66 for testing (#713)

Co-authored-by: apmmachine <[email protected]>

* Allow - in eql variable names (#710)

* fix to allow dashes in variable names in EQL expressions

extend eql to allow the '-' char to appear in variable names, i.e.,
${data.some-var} and additional test cases to eql, the transpiler, and
the k8s provider to verify this works. Note that the bug was caused by
the EQL limitation, the otehr test cases were added when attempting to
find it.

* Regenerate grammer with antlr 4.7.1, add CHANGELOG

* Fix linter issue

* Fix typo

* Fix transpiler to allow : in dynamic variables. (#680)

Fix transpiler regex to allow ':' characters in dynamic variables so
that users can input "${dynamic.lookup|'fallback.here'}".

Co-authored-by: Aleksandr Maus <[email protected]>

* Fix for the filebeat spec file picking up packetbeat inputs (#700)

* Reproduce filebeat picking up packetbeat inputs

* Filebeat: filter inputs as first input transform.

Move input filtering to be the first input transformation that occurs in
the filebeat spec file. Fixes
#427.

* Update changelog.

* [Automation] Update elastic stack version to 8.4.0-3cd57abb for testing (#724)

Co-authored-by: apmmachine <[email protected]>

* [Automation] Update elastic stack version to 8.4.0-a324b98b for testing (#727)

Co-authored-by: apmmachine <[email protected]>

* ci: run on MacOS12 (#696)

* [Automation] Update elastic stack version to 8.4.0-31315ca3 for testing (#732)

Co-authored-by: apmmachine <[email protected]>

* fix typo on package command (#734)

This commit fixes the typo in the package command on the README.md.

* Allow / to be used in variable names (#718)

* Allow the / character to be used in variable names.

Allow / to be used in variable names from dynamic providers and eql
expressions. Ensure that k8s providers can provide variables with
slashes in their names.

* run antlr4

* Fix tests

* Fix Elastic Agent non-fleet broken upgrade between 8.3.x releases (#701)

* Fix Elastic Agent non-fleet broken upgrade between 8.3.x releases

* Migrates vault directory on linux and windows to the top directory of the
  agent, so it can be shared without needing the upgrade handler call,
  like for example with side-by-side install/upgrade from .rpm/.deb
* Extended vault to allow read-only open, useful when the vault at particular location needs to be only read not created.

* Correct the typo in the log messages

* Update lint flagged function comment with 'unused', was flagged with 'deadcode' on the previous run

* Address code review feedback

* Add missing import for linux utz

* Change vault path from Top() to Config(), this a better location, next to fleet.enc based on the install/upgrade testing with .rpm/.deb installs

* Fix the missing state migration for .rpm/.deb upgrade. The post install script now performs the migration and creates the symlink after that.

* Fix typo in the postinstall script

* Update the vault migration code, add the agent configuration match check with the agent secret

* [Automation] Update elastic stack version to 8.4.0-31269fd2 for testing (#746)

Co-authored-by: apmmachine <[email protected]>

* wrap errors and fix some docs typo and convention (#743)

* automate the ironbank docker context generation (#679)

* Update README.md

Adding M1 variable to export to be able to build AMD images

* fix flaky (#730)

* Add filestream ID on standalone kubernetes manifest (#742)

This commit add unique IDs for the filestream inputs used by the
Kubernetes integration in the Elastic-Agent standalone
Kubernetes configuration/manifest file.

* Alter github action to run on different OSs (#769)

Alter the linter action to run on different OSs instead of on linux with
the $GOOS env var.

* [Automation] Update elastic stack version to 8.4.0-d058e92f for testing (#771)

Co-authored-by: apmmachine <[email protected]>

* elastic-agent manifests: add comments; add cloudnative team as a codeowner for the k8s manifests (#708)

* managed elastic-agent: add comments; add cloudnative team as a codeowner for the k8s manifests

Signed-off-by: Tetiana Kravchenko <[email protected]>

* add comments to the standalone elastic-agent, similar to the documentation we have https://www.elastic.co/guide/en/fleet/current/running-on-kubernetes-standalone.html

Signed-off-by: Tetiana Kravchenko <[email protected]>

* Apply suggestions from code review

Co-authored-by: Michael Katsoulis <[email protected]>
Co-authored-by: Andrew Gizas <[email protected]>

* remove comment for FLEET_ENROLLMENT_TOKEN; use Needed everywhere instead of Required

Signed-off-by: Tetiana Kravchenko <[email protected]>

* rephrase regarding accessing kube-state-metrics when used third party tools, like kube-rbac-proxy

Signed-off-by: Tetiana Kravchenko <[email protected]>

* run make check

Signed-off-by: Tetiana Kravchenko <[email protected]>

* keep manifests in sync to pass ci check

Signed-off-by: Tetiana Kravchenko <[email protected]>

* add info on where to find FLEET_URL and FLEET_ENROLLMENT_TOKEN

Signed-off-by: Tetiana Kravchenko <[email protected]>

* add links to elastic-agent documentation

Signed-off-by: Tetiana Kravchenko <[email protected]>

* update comment on FLEET_ENROLLMENT_TOKEN

Signed-off-by: Tetiana Kravchenko <[email protected]>

Co-authored-by: Michael Katsoulis <[email protected]>
Co-authored-by: Andrew Gizas <[email protected]>

* [Elastic-Agent] Added source uri reloading (#686)

* Update will cleanup unneeded artifacts. (#752)

* Update will cleanup unneeded artifacts.

The update process will cleanup unneeded artifacts. When an update
starts all artifacts that do not have the current version number in it's
name will be removed. If artifact retrieval fails, downloaded artifacts
are removed. On a successful upgrade, all contents of the downloads dir
will be removed.

* Clean up linter warnings

* Wrap errors

* cleanup tests

* Fix passed version

* Use os.RemoveAll

* ci: propagate e2e-testing errors (#695)

* [Release] add-backport-next (#784)

* Update go.sum.

* Fix upgrade.

* Fix the upgrade artifact reload.

* Fix lint in coordinator.

Co-authored-by: apmmachine <[email protected]>
Co-authored-by: apmmachine <[email protected]>
Co-authored-by: Pier-Hugues Pellerin <[email protected]>
Co-authored-by: Denis Rechkunov <[email protected]>
Co-authored-by: Michel Laterman <[email protected]>
Co-authored-by: Aleksandr Maus <[email protected]>
Co-authored-by: Victor Martinez <[email protected]>
Co-authored-by: Manuel de la Peña <[email protected]>
Co-authored-by: Anderson Queiroz <[email protected]>
Co-authored-by: Daniel Araujo Almeida <[email protected]>
Co-authored-by: Mariana Dima <[email protected]>
Co-authored-by: ofiriro3 <[email protected]>
Co-authored-by: Julien Lind <[email protected]>
Co-authored-by: Craig MacKenzie <[email protected]>
Co-authored-by: Tiago Queiroz <[email protected]>
Co-authored-by: Pierre HILBERT <[email protected]>
Co-authored-by: Tetiana Kravchenko <[email protected]>
Co-authored-by: Michael Katsoulis <[email protected]>
Co-authored-by: Andrew Gizas <[email protected]>
Co-authored-by: Michal Pristas <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
1 parent ff667df commit 9b68ea4
Show file tree
Hide file tree
Showing 69 changed files with 3,896 additions and 1,558 deletions.
23 changes: 14 additions & 9 deletions .ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pipeline {
dir("${BASE_DIR}"){
setEnvVar('ONLY_DOCS', isGitRegionMatch(patterns: [ '.*\\.(asciidoc|md)' ], shouldMatchAll: true).toString())
setEnvVar('PACKAGING_CHANGES', isGitRegionMatch(patterns: [ '(^dev-tools/packaging/.*|.ci/Jenkinsfile)' ], shouldMatchAll: false).toString())
setEnvVar('K8S_CHANGES', isGitRegionMatch(patterns: [ '(^deploy/kubernetes/.*|^version/docs/version.asciidoc)' ], shouldMatchAll: false).toString())
setEnvVar('K8S_CHANGES', isGitRegionMatch(patterns: [ '(^deploy/kubernetes/.*|^version/docs/version.asciidoc|.ci/Jenkinsfile)' ], shouldMatchAll: false).toString())
}
}
}
Expand Down Expand Up @@ -79,7 +79,7 @@ pipeline {
axes {
axis {
name 'PLATFORM'
values 'ubuntu-20.04 && immutable', 'aarch64', 'windows-2016 && windows-immutable', 'windows-2022 && windows-immutable', 'darwin && orka && x86_64'
values 'ubuntu-20.04 && immutable', 'aws && aarch64', 'windows-2016 && windows-immutable', 'windows-2022 && windows-immutable', 'macos12 && x86_64'
}
}
stages {
Expand Down Expand Up @@ -164,7 +164,7 @@ pipeline {
}
}
environment {
ARCH = "${PLATFORM.equals('aarch64') ? 'arm64' : 'amd64'}"
ARCH = "${PLATFORM.contains('aarch64') ? 'arm64' : 'amd64'}"
DEV = true
EXTERNAL = true
}
Expand All @@ -175,7 +175,7 @@ pipeline {
withMageEnv(){
dir("${BASE_DIR}"){
withPackageEnv("${PLATFORM}") {
cmd(label: 'Go package', script: 'mage package')
cmd(label: 'Go package', script: 'mage package ironbank')
uploadPackagesToGoogleBucket(
credentialsId: env.JOB_GCS_EXT_CREDENTIALS,
repo: env.REPO,
Expand Down Expand Up @@ -219,7 +219,7 @@ pipeline {
axes {
axis {
name 'K8S_VERSION'
values "v1.24.0, v1.23.6, v1.22.9, v1.21.12"
values "v1.24.0", "v1.23.6", "v1.22.9", "v1.21.12"
}
}
stages {
Expand Down Expand Up @@ -251,18 +251,23 @@ pipeline {
}
steps {
// TODO: what's the testMatrixFile to be used if any
runE2E(testMatrixFile: '',
runE2E(testMatrixFile: '.ci/.e2e-tests-for-elastic-agent.yaml',
beatVersion: "${env.BEAT_VERSION}-SNAPSHOT",
elasticAgentVersion: "${env.BEAT_VERSION}-SNAPSHOT",
gitHubCheckName: "e2e-tests",
gitHubCheckRepo: env.REPO,
gitHubCheckSha1: env.GIT_BASE_COMMIT)
gitHubCheckSha1: env.GIT_BASE_COMMIT,
propagate: true,
wait: true)
}
}
}
post {
cleanup {
notifyBuildResult(prComment: true)
notifyBuildResult(prComment: true,
analyzeFlakey: !isTag(), jobName: getFlakyJobName(withBranch: (isPR() ? env.CHANGE_TARGET : env.BRANCH_NAME)),
githubIssue: isBranch() && currentBuild.currentResult != "SUCCESS",
githubLabels: 'Team:Elastic-Agent-Control-Plane')
}
}
}
Expand All @@ -274,7 +279,7 @@ def isCodeCoverageEnabled() {

def withPackageEnv(platform, Closure body) {
if (isUnix()) {
if (platform.contains('macosx')) {
if (isDarwin()) {
withPackageDarwinEnv() {
body()
}
Expand Down
5 changes: 3 additions & 2 deletions .ci/jobs/elastic-agent-mbp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- job:
name: "elastic-agent/elastic-agent-mbp"
display-name: elastic-agent
description: "POC to isolate elastic agent from beats"
description: "Elastic agent"
project-type: multibranch
script-path: .ci/Jenkinsfile
scm:
Expand All @@ -12,6 +12,7 @@
discover-pr-forks-trust: permission
discover-pr-origin: merge-current
discover-tags: true
head-filter-regex: '(main|7\.17|8\.\d+|PR-.*|v\d+\.\d+\.\d+)'
notification-context: 'fleet-ci'
repo: elastic-agent
repo-owner: elastic
Expand Down Expand Up @@ -39,4 +40,4 @@
timeout: 100
timeout: '15'
use-author: true
wipe-workspace: 'True'
wipe-workspace: true
4 changes: 3 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# Team responsable for Fleet Server
# Team responsible for Fleet Server
* @elastic/elastic-agent-control-plane

/deploy/kubernetes @elastic/obs-cloudnative-monitoring
2 changes: 1 addition & 1 deletion .github/workflows/elastic-agent-project-board.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
with:
headers: '{"GraphQL-Features": "projects_next_graphql"}'
query: |
mutation add_to_project($projectid:String!,$contentid:String!) {
mutation add_to_project($projectid:[ID!]!,$contentid:ID!) {
updateIssue(input: {id:$contentid, projectIds:$projectid}) {
clientMutationId
}
Expand Down
14 changes: 2 additions & 12 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,10 @@ jobs:
golangci:
strategy:
matrix:
include:
- GOOS: windows
- GOOS: linux
- GOOS: darwin
os: [ ubuntu-latest, macos-latest, windows-latest ]
name: lint
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- name: Echo details
env:
GOOS: ${{ matrix.GOOS }}
run: echo Go GOOS=$GOOS

- uses: actions/checkout@v2

# Uses Go version from the repository.
Expand All @@ -38,8 +30,6 @@ jobs:
go-version: "${{ steps.goversion.outputs.version }}"

- name: golangci-lint
env:
GOOS: ${{ matrix.GOOS }}
uses: golangci/golangci-lint-action@v2
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,3 @@ pkg/component/fake/fake

# VSCode
/.vscode

31 changes: 9 additions & 22 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,55 +181,42 @@ pull_request_rules:
labels:
- "backport"
title: "[{{ destination_branch }}](backport #{{ number }}) {{ title }}"
- name: backport patches to 8.0 branch
conditions:
- merged
- label=backport-v8.0.0
actions:
backport:
assignees:
- "{{ author }}"
branches:
- "8.0"
labels:
- "backport"
title: "[{{ destination_branch }}](backport #{{ number }}) {{ title }}"
- name: backport patches to 8.1 branch
- name: backport patches to 8.2 branch
conditions:
- merged
- label=backport-v8.1.0
- label=backport-v8.2.0
actions:
backport:
assignees:
- "{{ author }}"
branches:
- "8.1"
- "8.2"
labels:
- "backport"
title: "[{{ destination_branch }}](backport #{{ number }}) {{ title }}"
- name: backport patches to 8.2 branch
- name: backport patches to 8.3 branch
conditions:
- merged
- label=backport-v8.2.0
- label=backport-v8.3.0
actions:
backport:
assignees:
- "{{ author }}"
branches:
- "8.2"
- "8.3"
labels:
- "backport"
title: "[{{ destination_branch }}](backport #{{ number }}) {{ title }}"
- name: backport patches to 8.3 branch
- name: backport patches to 8.4 branch
conditions:
- merged
- label=backport-v8.3.0
- label=backport-v8.4.0
actions:
backport:
assignees:
- "{{ author }}"
branches:
- "8.3"
- "8.4"
labels:
- "backport"
title: "[{{ destination_branch }}](backport #{{ number }}) {{ title }}"
Loading

0 comments on commit 9b68ea4

Please sign in to comment.