@@ -201,8 +210,12 @@ const PolicyRunScriptModal = ({
)}
- Selected script will run when hosts fail the policy. Host counts
- will reset when a new script is selected.{" "}
+ Selected script, if{" "}
+
+ compatible
+ {" "}
+ with the host, will run when hosts fail the policy. Host counts will
+ reset when a new script is selected.{" "}
= {
),
"On (manual)": (
-
MDM was turned on manually. End users can turn MDM off.
+
+ MDM was turned on manually (macOS), or hosts were automatically migrated
+ with fleetd (Windows). End users can turn MDM off.
+
),
Off: undefined, // no tooltip specified
Pending: (
diff --git a/frontend/utilities/endpoints.ts b/frontend/utilities/endpoints.ts
index a1acd94ade..312b8b110d 100644
--- a/frontend/utilities/endpoints.ts
+++ b/frontend/utilities/endpoints.ts
@@ -52,7 +52,7 @@ export default {
HOST_UNLOCK: (id: number) => `/${API_VERSION}/fleet/hosts/${id}/unlock`,
HOST_WIPE: (id: number) => `/${API_VERSION}/fleet/hosts/${id}/wipe`,
HOST_RESEND_PROFILE: (hostId: number, profileUUID: string) =>
- `/${API_VERSION}/fleet/hosts/${hostId}/configuration_profiles/resend/${profileUUID}`,
+ `/${API_VERSION}/fleet/hosts/${hostId}/configuration_profiles/${profileUUID}/resend`,
HOST_SOFTWARE: (id: number) => `/${API_VERSION}/fleet/hosts/${id}/software`,
HOST_SOFTWARE_PACKAGE_INSTALL: (hostId: number, softwareId: number) =>
`/${API_VERSION}/fleet/hosts/${hostId}/software/${softwareId}/install`,
diff --git a/go.mod b/go.mod
index e5939b1ae1..d016df2348 100644
--- a/go.mod
+++ b/go.mod
@@ -74,6 +74,7 @@ require (
github.com/mattermost/xml-roundtrip-validator v0.0.0-20201213122252-bcd7e1b9601e
github.com/mattn/go-sqlite3 v1.14.22
github.com/micromdm/micromdm v1.9.0
+ github.com/micromdm/nanolib v0.2.0
github.com/mitchellh/go-ps v1.0.0
github.com/mitchellh/gon v0.2.6-0.20231031204852-2d4f161ccecd
github.com/mna/redisc v1.3.2
@@ -118,7 +119,6 @@ require (
go.elastic.co/apm/module/apmsql/v2 v2.6.2
go.elastic.co/apm/v2 v2.6.2
go.etcd.io/bbolt v1.3.9
- go.mozilla.org/pkcs7 v0.0.0-20210826202110-33d05740a352
go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux v0.56.0
go.opentelemetry.io/otel v1.31.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0
@@ -279,7 +279,6 @@ require (
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/mattn/go-tty v0.0.3 // indirect
- github.com/micromdm/nanolib v0.2.0 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.4.3 // indirect
@@ -323,6 +322,7 @@ require (
github.com/yashtewari/glob-intersection v0.1.0 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
go.elastic.co/fastjson v1.1.0 // indirect
+ go.mozilla.org/pkcs7 v0.0.0-20210826202110-33d05740a352 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
diff --git a/go.sum b/go.sum
index e00f1410fe..1379e90641 100644
--- a/go.sum
+++ b/go.sum
@@ -846,8 +846,6 @@ github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4=
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
-github.com/macadmins/osquery-extension v1.2.1 h1:p7tAAhfEjUjoMQJNb+X7Qc3FraVqGZqMhZ1BYJbrlaw=
-github.com/macadmins/osquery-extension v1.2.1/go.mod h1:q0BnBuYocHBRB+m3AQwdQNETH5a2KzVT3S8TKMHo9Lk=
github.com/macadmins/osquery-extension v1.2.3 h1:PAAQVRBnpOwnzEUROiJbrjDf9RPwcAfJrNAkXUcjS3Y=
github.com/macadmins/osquery-extension v1.2.3/go.mod h1:cNd/9INYpAYJFjfmAEJKgiuHgDkGuFMPu6GVrn7oups=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
diff --git a/handbook/company/pricing-features-table.yml b/handbook/company/pricing-features-table.yml
index 06c85abd52..4425471881 100644
--- a/handbook/company/pricing-features-table.yml
+++ b/handbook/company/pricing-features-table.yml
@@ -150,7 +150,7 @@
productCategories: [Endpoint operations,Device management,Vulnerability management]
pricingTableCategories: [Configuration]
usualDepartment: IT
- tier: Free
+ tier: Premium
jamfProHasFeature: yes
jamfProtectHasFeature: yes
waysToUse:
@@ -377,7 +377,7 @@
# ║╣ ║║║╠╣ ║ ║╠╦╝║ ║╣ ║║║╚═╗╠╩╗ ║╣ ║║║║ ╠╦╝╚╦╝╠═╝ ║ ║║ ║║║║
# ╚═╝╝╚╝╚ ╚═╝╩╚═╚═╝╚═╝ ═╩╝╩╚═╝╩ ╩ ╚═╝╝╚╝╚═╝╩╚═ ╩ ╩ ╩ ╩╚═╝╝╚╝
- industryName: Enforce disk encryption
- description: Encrypt system drives on macOS, Windows, and Linux (coming soon) computers, manage escrowed encryption keys, and report on disk encryption status (FileVault, BitLocker, LUKS).
+ description: Encrypt system drives on macOS, Windows, and Linux, manage escrowed encryption keys, and report on disk encryption status (FileVault, BitLocker, LUKS).
documentationUrl: https://fleetdm.com/docs/using-fleet/mdm-disk-encryption
friendlyName: Ensure hard disks are encrypted
productCategories: [Device management]
diff --git a/handbook/company/testimonials.yml b/handbook/company/testimonials.yml
index a828ac0129..01307197ab 100644
--- a/handbook/company/testimonials.yml
+++ b/handbook/company/testimonials.yml
@@ -185,7 +185,7 @@
quoteLinkUrl: https://www.linkedin.com/in/mrerictan/
quoteAuthorName: Eric Tan
quoteAuthorProfileImageFilename: testimonial-author-eric-tan-99x99@2x.png
- quoteAuthorJobTitle: CIO & Chief Security Officer at Flock Safety
+ quoteAuthorJobTitle: CIO & CSO at Flock Safety
productCategories: [Device management, Endpoint operations]
-
quote: We've been using Fleet for a few years at Stripe and we couldn't be happier. The fact that it's also open-source made it easy for us to try it out, customise it to our needs, and seamlessly integrate it into our existing environment.
diff --git a/handbook/demand/README.md b/handbook/demand/README.md
index 21751984a6..826eedeca5 100644
--- a/handbook/demand/README.md
+++ b/handbook/demand/README.md
@@ -234,9 +234,15 @@ To do this:
6. Repeat this process until all remaining draft orders show "Waiting for Fulfillment"
+### Request swag
+There are many times in which community members, customers, and contributors are in need of some cool Fleet swag. To request swag:
+1. [Create an issue](https://app.zenhub.com/workspaces/g-demand-64e6c8e2d35c7f001a457b7f/issues/gh/fleetdm/confidential/new?issueType=issue) on the #g-demand board.
+2. Provide order details (e.g. expected shirt size, name, and shipping details).
+3. Decide if you'd like to include a personalized message and attach it to the issue.
+
### Fulfill a swag request
-There are many times in which community members, customers, and contributors are in need of some cool Fleet swag. Swag requests are received in the form of issues and will be fulfilled based on availability. To process a swag request:
+Swag requests are received in the form of issues and will be fulfilled based on availability. To process a swag request:
1. Check and communicate availability to the requestor.
2. Use the appropriate shipping method that best serves the company.
3. Attach tracking number to the issue and tag the requestor.
diff --git a/handbook/digital-experience/README.md b/handbook/digital-experience/README.md
index d76516ca43..bdcd9da292 100644
--- a/handbook/digital-experience/README.md
+++ b/handbook/digital-experience/README.md
@@ -673,7 +673,9 @@ It's not enough to just "delete" a recording of a meeting in Gong. Instead, use
### Communicate Fleet's potential energy to stakeholders
On the first business day of every month, the Head of Digital Experience will send an update to the stakeholders of Fleet using the following steps:
-1. Copy the following template into an outgoing email with the subject line: "[Investor update] Fleet, YYYY-MM".
+1. Navigate to the "[🪴🌧️🦉 Investor updates](https://docs.google.com/spreadsheets/d/10T7Q9iuHA4vpfV7qZCm6oMd5U1bLftBSobYD0RR8RkM/edit?gid=0#gid=0)" spreadsheet and confirm the data in each column matches the header of that column (e.g. the "Headcount" column actually has headcount values in it). Do this by confirming the "Remote column" value corresponds to the correct column "letter" in the "Weekly updates" tab of the "[📈 OKRs (quarterly goals) + KPIs (everyday metrics)](https://docs.google.com/spreadsheets/d/1Hso0LxqwrRVINCyW_n436bNHmoqhoLhC8bcbvLPOs9A/edit?gid=0#gid=0)" spreadsheet.
+2. Confirm KPI's are up-to-date. If any KPI's aren't completed, at mention the e-group member responsible and ask that the KPI's be completed ASAP in order to send the investor update.
+3. Copy the following template into an outgoing email with the subject line: "[Investor update] Fleet, YYYY-MM".
```
Hi investors and friends,
@@ -687,8 +689,8 @@ Mike and the Fleet team
```
-2. Address the email to the executive team's Gmail.
-3. Using the [🌧️🦉 Investors + advisors](https://docs.google.com/spreadsheets/d/15knBE2-PrQ1Ad-QcIk0mxCN-xFsATKK9hcifqrm0qFQ/edit#gid=1068113636) spreadsheet, bcc the correct individuals and send the email.
+4. Address the email to the executive team's Gmail.
+5. Using the [🌧️🦉 Investors + advisors](https://docs.google.com/spreadsheets/d/15knBE2-PrQ1Ad-QcIk0mxCN-xFsATKK9hcifqrm0qFQ/edit#gid=1068113636) spreadsheet, bcc the correct individuals and send the email.
### Schedule press release
diff --git a/handbook/digital-experience/digital-experience.rituals.yml b/handbook/digital-experience/digital-experience.rituals.yml
index d7f42066ca..9e33fe31b9 100644
--- a/handbook/digital-experience/digital-experience.rituals.yml
+++ b/handbook/digital-experience/digital-experience.rituals.yml
@@ -183,7 +183,7 @@
frequency: "Monthly"
description: "Via hand or automation, send a monthly update email to all investors that hold 4% equity or greater in Fleet who have opted in to receive emails on the company's progress."
moreInfoUrl: "https://fleetdm.com/handbook/digital-experience#communicate-fleets-potential-energy-to-stakeholders"
- dri: "sampfluger88"
+ dri: "SFriendLee"
autoIssue:
labels: [ "#g-digital-experience" ]
repo: "confidential"
diff --git a/handbook/engineering/README.md b/handbook/engineering/README.md
index 570b3e5017..bde2c51804 100644
--- a/handbook/engineering/README.md
+++ b/handbook/engineering/README.md
@@ -26,18 +26,6 @@ This handbook page details processes specific to working [with](#contact-us) and
The 🚀 Engineering department at Fleet is directly responsible for writing and maintaining the [code](https://github.com/fleetdm/fleet) for Fleet's core product and infrastructure.
-### Record engineering KPIs
-
-We track the success of this process by observing the throughput of issues through the system and identifying where buildups (and therefore bottlenecks) are occurring.
-The metrics are:
-* Number of bugs opened this week
-* Total # bugs open
-* Bugs in each state (inbox, acknowledged, reproduced)
-* Number of bugs closed this week
-
-Each week these are tracked and shared in the weekly KPI sheet by Luke Heath.
-
-
### Write a feature guide
We write [guides](https://fleetdm.com/guides) for all new features. Feature guides are published before the feature is released so that our users understand how the feature is intended to work. A guide is a type of article, so the process for writing a guide and article is the same.
@@ -46,13 +34,14 @@ We write [guides](https://fleetdm.com/guides) for all new features. Feature guid
2. Make a copy of a guide in the `/articles` directory and replace the content with your article. Make sure to maintain the same heading sizes and update the metadata tags at the bottom.
3. Open a new pull request containing your article into `main` and add the pull request to the milestone this feature will be shipped in. The pull request will automatically be assigned to the appropriate reviewer.
+
### Create an engineering-initiated story
Engineering-initiated stories are types of user stories created by engineers to make technical changes to Fleet. Technical changes should improve the user experience or contributor experience. For example, optimizing SQL that improves the response time of an API endpoint improves user experience by reducing latency. A script that generates common boilerplate, or automated tests to cover important business logic, improves the quality of life for contributors, making them happier and more productive, resulting in faster delivery of features to our customers.
It is important to frame engineering-initiated user stories the same way we frame all user stories. Stay focused on how this technical change will drive value for our users.
-To [create an engineering-initiated user story](https://fleetdm.com/handbook/engineering#creating-an-engineering-initiated-story), follow the [user story drafting process](https://fleetdm.com/handbook/company/development-groups#drafting). Once your user story is created using the [new story template](https://github.com/fleetdm/fleet/issues/new?assignees=lukeheath&labels=story,~engineering-initiated&projects=&template=story.md&title=), make sure the `~engineering-initiated` label is added and the engineering output and architecture DRI (@lukeheath) is assigned.
+To [create an engineering-initiated user story](https://fleetdm.com/handbook/engineering#creating-an-engineering-initiated-story), follow the [user story drafting process](https://fleetdm.com/handbook/company/development-groups#drafting). Once your user story is created using the [new story template](https://github.com/fleetdm/fleet/issues/new?assignees=lukeheath&labels=story,~engineering-initiated&projects=&template=story.md&title=), make sure the `~engineering-initiated` label is added, the `:product` label is removed, and the engineering output and architecture DRI (@lukeheath) is assigned.
What happens next? The engineering output and architecture DRI reviews engineering-initiated stories weekly.
@@ -158,7 +147,7 @@ Documentation on completing the release process can be found [here](https://gith
### Deploy a new release to dogfood
-After each Fleet release, the new release is deployed to Fleet's "dogfood" (internal) instance.
+After each Fleet release, the new release is deployed to Fleet's "dogfood" (internal) instance. To avoid interruptions to sales demos using this instance, deploys should occur outside of the business hours of 7am - 5pm Pacific time Monday - Friday. If a deployment is necessary during business hours, coordinate with the Sales department in the #g-sales Slack channel.
How to deploy a new release to dogfood:
@@ -262,33 +251,6 @@ Once the user has installed fleetd, verify the device is correctly enrolled by c
ChromeOS devices are automatically enrolled in dogfood after the IT admin sets up automatic enrollment. This is done in dogfood by following the steps found in the dialog popup when selecting "Add hosts > ChromeOS" from the dogfood Hosts page.
-### Lock a macOS host in dogfood using fleetctl CLI tool
-
-- Download the lock command XML file from Google Drive [here](https://drive.google.com/file/d/1o6vJ1fHilRtBmyKAj0I5URiKn77qe4gS/view?usp=drive_link).
-- Customize any messaging that will appear on the locked device, and modify the pin for unlocking the device by editing the file in text editor.
- - Note you will need to safely store the recovery pin for the device, suggest using 1Password or other secure storage method
-- Run this command with fleetctl CLI tool: `fleetctl mdm run-command --hosts=hostname --payload=Downloads/command-lock-macos-host.xml`
- - Note that `hostname` must be replaced with **Hostname** in Fleet (not the display name)
- - Note that the payload path may change based on where the file is stored once downloaded
- - Note that if you haven't logged into fleetctl recently, will need to follow authentication steps (see [Logging in with SAML (SSO) authentication](https://fleetdm.com/docs/using-fleet/fleetctl-cli#logging-in-with-saml-sso-authentication) ).
-- Device will be locked
-- When device needs to be unlocked, enter the security pin (from XML file) in the input field of the device
-- The device will then open to the regular login screen, asking for password
- - If you do not have the password available, you can choose the option to enter recovery key/disk encryption key (this option might be behind `?` icon).
- - Get disk encryption key from Fleet dogfood (using the action menu from the individual host page).
- - Enter disk encryption key on laptop. This should prompt you to create a new password.
-- You will then be logged into the default device profile, and can complete any needed actions (wipe, recover data).
-
-
-### Review another product group's pull request
-
-Some code paths require pull request review from multiple product groups to confirm there are no
-unintended side effects of the change for another product group. All code paths defined in
-[CODEOWNERS](https://github.com/fleetdm/fleet/blob/main/CODEOWNERS) that are assigned to individual
-engineers across multiple product groups must be approved by one engineer from each product group
-before merging.
-
-
### Review a community pull request
If you're assigned a community pull request for review, it is important to keep things moving for the contributor. The goal is to not go more than one business day without following up with the contributor.
@@ -336,29 +298,9 @@ If a community member opens an issue that we can't reproduce leave a comment ask
### Schedule developer on-call workload
-Engineering managers are asked to be aware of the [on-call rotation](https://docs.google.com/document/d/1FNQdu23wc1S9Yo6x5k04uxT2RwT77CIMzLLeEI2U7JA/edit#) and schedule a light workload for engineers while they are on-call. While it varies week to week considerably, the on-call responsibilities can sometimes take up a substantial portion of the engineer's time.
+Engineering Managers are asked to be aware of the [on-call rotation](https://docs.google.com/document/d/1FNQdu23wc1S9Yo6x5k04uxT2RwT77CIMzLLeEI2U7JA/edit#) and reduce estimate capacity for each sprint accordingly. While it varies week to week considerably, the on-call responsibilities can sometimes take up a substantial portion of the engineer's time.
-We aspire to clear sprint work for the on-call engineer, but due to capacity or other constraints, sometimes the on-call engineer is required for sprint work. When this is the case, the EM will work with the on-call engineer to take over support requests or @oncall assignment completely when necessary.
-
-The remaining time after fulfilling the responsibilities of on-call is free for the engineer to choose their own path. Please choose something relevant to your work or Fleet's goals to focus on. If unsure, speak with your manager.
-
-Some ideas:
-
-- Do training/learning relevant to your work.
-- Improve the Fleet developer experience.
-- Hack on a product idea. Note: Experiments are encouraged, but not all experiments will ship! Check in with the product team before shipping user-visible changes.
-- Create a blog post (or other content) for fleetdm.com.
-- Try out an experimental refactor.
-
-
-### Edit a DNS record
-
-We use Cloudflare to manage the DNS records of fleetdm.com and our other domains. To make DNS changes in Cloudflare:
-1. Log into your Cloudflare account and select the "Fleet" account.
-2. Select the domain you want to change and go to the DNS panel on that domain's dashboard.
-3. To add a record, click the "Add record" button, select the record's type, fill in the required values, and click "Save". If you're making changes to an existing record, you only need to click on the record, update the record's values, and save your changes.
-
-> If you need access to Fleet's Cloudflare account, please ask the [DRI](https://fleetdm.com/handbook/company/why-this-way#why-direct-responsibility) [Luke Heath](https://fleetdm.com/handbook/engineering#team) in Slack for an invitation.
+On-call engineers are available during the business hours of 9am - 5pm Pacific. The [on-call support SLA](https://fleetdm.com/handbook/company/product-groups#developer-on-call-responsibilities) requires a 1-hour response time during business hours to any @oncall mention.
### Assume developer on-call alias
@@ -368,6 +310,15 @@ The on-call developer is responsible for:
- Performing the [on-call responsibilities](https://fleetdm.com/handbook/company/product-groups#developer-on-call-responsibilities).
- [Escalating community questions and issues](https://fleetdm.com/handbook/company/product-groups#escalations).
- Successfully [transferring the on-call persona to the next developer](https://fleetdm.com/handbook/company/product-groups#changing-of-the-guard).
+- Work on an [engineering-initiated story](https://fleetdm.com/handbook/engineering#create-an-engineering-initiated-story).
+
+Some additional ideas:
+
+- Do training/learning relevant to your work.
+- Improve the Fleet contributor experience.
+- Hack on a product idea. Note: Experiments are encouraged, but not all experiments will ship! Check in with the product team before shipping user-visible changes.
+- Create a blog post (or other content) for fleetdm.com.
+- Try out an experimental refactor.
### Notify stakeholders when a user story is pushed to the next release
@@ -393,23 +344,6 @@ For each bug found, please use the [bug report template](https://github.com/flee
For unreleased bugs in an active sprint, a new bug is created with the `~unreleased bug` label. The `:release` label and associated product group label is added, and the engineer responsible for the feature is assigned. If QA is unsure who the bug should be assigned to, it is assigned to the EM. Fixing the bug becomes part of the story.
-### Accept new Apple developer account terms
-
-Engineering is responsible for managing third-party accounts required to support engineering infrastructure. We use the official Fleet Apple developer account to notarize installers we generate for Apple devices. Whenever Apple releases new terms of service, we are unable to notarize new packages until the new terms are accepted.
-
-When this occurs, we will begin receiving the following error message when attempting to notarize packages: "You must first sign the relevant contracts online." To resolve this error, follow the steps below.
-
-1. Visit the [Apple developer account login page](https://appleid.apple.com/account?appId=632&returnUrl=https%3A%2F%2Fdeveloper.apple.com%2Fcontact%2F).
-
-2. Log in using the credentials stored in 1Password under "Apple developer account".
-
-3. Contact the Head of Digital Experience to determine which phone number to use for 2FA.
-
-4. Complete the 2FA process to log in.
-
-5. Accept the new terms of service.
-
-
### Interview a developer candidate
Ensure the interview process follows these steps in order. This process must follow [creating a new position](https://fleetdm.com/handbook/company/leadership#creating-a-new-position) through [receiving job applications](https://fleetdm.com/handbook/company/leadership#receiving-job-applications). Once the position is approved manage this process per candidate in a [hiring pipeline](https://drive.google.com/drive/folders/1dLZaor9dQmAxcxyU6prm-MWNd-C-U8_1?usp=drive_link)
@@ -425,28 +359,6 @@ Ensure the interview process follows these steps in order. This process must fol
If the candidate passes all of these steps then continue with [hiring a new team member](https://fleetdm.com/handbook/company/leadership#hiring-a-new-team-member).
-### Renew MDM certificate signing request (CSR)
-
-The certificate signing request (CSR) certificate expires every year. It needs to be renewed prior to expiring. This is notified to the team by the MDM calendar event [IMPORTANT: Renew MDM CSR certificate](https://calendar.google.com/calendar/u/0/r/eventedit/MmdqNTY4dG9nbWZycnNxbDBzYjQ5dGplM2FfMjAyNDA5MDlUMTczMDAwWiBjXzMyMjM3NjgyZGRlOThlMzI4MjVhNTY1ZDEyZjk0MDEyNmNjMWI0ZDljYjZjNjgyYzQ2MjcxZGY0N2UzNjM5NDZAZw)
-
-Steps to renew the certificate:
-
-1. Visit the [Apple developer account login page](https://developer.apple.com/account).
-2. Log in using the credentials stored in 1Password under **Apple developer account**.
-3. Verify you are using the **Enterprise** subaccount for Fleet Device Management Inc.
-4. Generate a new certificate following the instructions in [MicroMDM](https://github.com/micromdm/micromdm/blob/c7e70b94d0cfc7710e5c92be20d4534d9d5a0640/docs/user-guide/quickstart.md?plain=1#L103-L118).
-5. Note: `mdmctl` (a micromdm command for MDM vendors) will generate a `VendorPrivateKey.key` and `VendorCertificateRequest.csr` using an appropriate shared email relay and a passphrase (suggested generation method with pwgen available in brew / apt / yum `pwgen -s 32 -1vcy`)
-6. Uploading `VendorCertificateRequest.csr` to Apple you will download a corresponding `mdm.cer` file
-7. Convert the downloaded cert to PEM with `openssl x509 -inform DER -outform PEM -in mdm.cer -out server.crt.pem`
-8. Update the **Config vars** in [Heroku](https://dashboard.heroku.com/apps/production-fleetdm-website/settings):
-* Update `sails_custom__mdmVendorCertPem` with the results from step 7 `server.crt.pem`
-* Update `sails_custom__mdmVendorKeyPassphrase` with the passphrase used in step 4
-* Update `sails_custom__mdmVendorKeyPem` with `VendorPrivateKey.key` from step 4
-9. Store updated values in [Confidential 1Password Vault](https://start.1password.com/open/i?a=N3F7LHAKQ5G3JPFPX234EC4ZDQ&v=lcvkjobeheaqdgnz33ontpuhxq&i=byyfn2knejwh42a2cbc5war5sa&h=fleetdevicemanagement.1password.com)
-10. Verify by logging into a normal apple account (not billing@...) and Generate a new Push Certificate following our [setup MDM](https://fleetdm.com/docs/using-fleet/mdm-setup) steps and verify the Expiration date is 1 year from today.
-11. Adjust calendar event to be between 2-4 weeks before the next expiration.
-
-
### Perform an incident postmortem
Conduct a postmortem meetings for every service or feature outage and every critical bug, whether it's a customer's environment or on fleetdm.com.
@@ -471,6 +383,68 @@ Beginning with macOS 16, Fleet will offer same-day support for all major version
6. When all bugs are fixed, follow the [writing a feature guide](https://fleetdm.com/handbook/engineering#write-a-feature-guide) process to publish an article announcing Fleet same-day support for the new major release.
+### Record engineering KPIs
+
+We track the effectiveness of our processes by observing issue throughput and identifying where buildups (and therefore bottlenecks) are occurring.
+
+The metrics are:
+* Number of bugs opened this week
+* Total # bugs open
+* Bugs in each state (inbox, acknowledged, reproduced)
+* Number of bugs closed this week
+
+Each week these are tracked and shared in the weekly KPI sheet by Luke Heath.
+
+
+### Edit a DNS record
+
+We use Cloudflare to manage the DNS records of fleetdm.com and our other domains. To make DNS changes in Cloudflare:
+1. Log into your Cloudflare account and select the "Fleet" account.
+2. Select the domain you want to change and go to the DNS panel on that domain's dashboard.
+3. To add a record, click the "Add record" button, select the record's type, fill in the required values, and click "Save". If you're making changes to an existing record, you only need to click on the record, update the record's values, and save your changes.
+
+> If you need access to Fleet's Cloudflare account, please ask the [DRI](https://fleetdm.com/handbook/company/why-this-way#why-direct-responsibility) [Luke Heath](https://fleetdm.com/handbook/engineering#team) in Slack for an invitation.
+
+
+### Accept new Apple developer account terms
+
+Engineering is responsible for managing third-party accounts required to support engineering infrastructure. We use the official Fleet Apple developer account to notarize installers we generate for Apple devices. Whenever Apple releases new terms of service, we are unable to notarize new packages until the new terms are accepted.
+
+When this occurs, we will begin receiving the following error message when attempting to notarize packages: "You must first sign the relevant contracts online." To resolve this error, follow the steps below.
+
+1. Visit the [Apple developer account login page](https://appleid.apple.com/account?appId=632&returnUrl=https%3A%2F%2Fdeveloper.apple.com%2Fcontact%2F).
+
+2. Log in using the credentials stored in 1Password under "Apple developer account".
+
+3. Contact the Head of Digital Experience to determine which phone number to use for 2FA.
+
+4. Complete the 2FA process to log in.
+
+5. Accept the new terms of service.
+
+
+### Renew MDM certificate signing request (CSR)
+
+The certificate signing request (CSR) certificate expires every year. It needs to be renewed prior to expiring. This is notified to the team by the MDM calendar event [IMPORTANT: Renew MDM CSR certificate](https://calendar.google.com/calendar/u/0/r/eventedit/MmdqNTY4dG9nbWZycnNxbDBzYjQ5dGplM2FfMjAyNDA5MDlUMTczMDAwWiBjXzMyMjM3NjgyZGRlOThlMzI4MjVhNTY1ZDEyZjk0MDEyNmNjMWI0ZDljYjZjNjgyYzQ2MjcxZGY0N2UzNjM5NDZAZw)
+
+Steps to renew the certificate:
+
+1. Visit the [Apple developer account login page](https://developer.apple.com/account).
+2. Log in using the credentials stored in 1Password under **Apple developer account**.
+3. Verify you are using the **Enterprise** subaccount for Fleet Device Management Inc.
+4. Generate a new certificate following the instructions in [MicroMDM](https://github.com/micromdm/micromdm/blob/c7e70b94d0cfc7710e5c92be20d4534d9d5a0640/docs/user-guide/quickstart.md?plain=1#L103-L118).
+5. Note: `mdmctl` (a micromdm command for MDM vendors) will generate a `VendorPrivateKey.key` and `VendorCertificateRequest.csr` using an appropriate shared email relay and a passphrase (suggested generation method with pwgen available in brew / apt / yum `pwgen -s 32 -1vcy`)
+6. Uploading `VendorCertificateRequest.csr` to Apple you will download a corresponding `mdm.cer` file
+7. Convert the downloaded cert to PEM with `openssl x509 -inform DER -outform PEM -in mdm.cer -out server.crt.pem`
+8. Update the **Config vars** in [Heroku](https://dashboard.heroku.com/apps/production-fleetdm-website/settings):
+* Update `sails_custom__mdmVendorCertPem` with the results from step 7 `server.crt.pem`
+* Update `sails_custom__mdmVendorKeyPassphrase` with the passphrase used in step 4
+* Update `sails_custom__mdmVendorKeyPem` with `VendorPrivateKey.key` from step 4
+9. Store updated values in [Confidential 1Password Vault](https://start.1password.com/open/i?a=N3F7LHAKQ5G3JPFPX234EC4ZDQ&v=lcvkjobeheaqdgnz33ontpuhxq&i=byyfn2knejwh42a2cbc5war5sa&h=fleetdevicemanagement.1password.com)
+10. Verify by logging into a normal apple account (not billing@...) and Generate a new Push Certificate following our [setup MDM](https://fleetdm.com/docs/using-fleet/mdm-setup) steps and verify the Expiration date is 1 year from today.
+11. Adjust calendar event to be between 2-4 weeks before the next expiration.
+
+
### Maintain TUF repo for secure agent updates
Instructions for creating and maintaining a TUF repo are available on our [TUF handbook page](https://fleetdm.com/handbook/engineering/tuf).
diff --git a/handbook/finance/README.md b/handbook/finance/README.md
index a92b7f8958..d7df002eb1 100644
--- a/handbook/finance/README.md
+++ b/handbook/finance/README.md
@@ -193,12 +193,6 @@ Use the following steps to update the [💸Finance department KPIs](https://docs
**Non-personnel monthly burn**:
- Copy the amount from the [numbers spreadsheet](https://docs.google.com/spreadsheets/d/1X-brkmUK7_Rgp7aq42drNcUg8ZipzEiS153uKZSabWc/edit#gid=1308221870&range=B3) and input in the cell for this week.
-**SaaS metrics**:
-- For "CAC", "CAC payback", "LTV" and "LTV:CAC" columns, drag the existing formula to this week's row.
-> Note: the formula relies on inputs in other fields, so if those fields haven't received input yet, it will look odd. If formulas are still broken after inputs in the other columns are added, [create an issue on the Finance board](https://github.com/fleetdm/confidential/issues/new?assignees=&labels=%23g-finance&projects=&template=custom-request.md) noting which columns are affected. Once created, @ mention Finance Engineer in the issue to bring awareness.
-
-- For "Average customer age", pull the age in days from the [Salesforce "Account age" report](https://fleetdm.lightning.force.com/lightning/r/Report/00OUG0000012jwX2AQ/view), then convert to months by dividing the age in days by 30.417. Put the calculated number into the cell. This metric changes gradually up each week when no new deals close and no customer churns. Because we calculate the age of the customer based on the average lifetime deal length, expected behavior is that it will decrease when a new deal closes, but not drastically (as even a 1-year deal will still add 12 months to the average age).
-
### Create an invoice
diff --git a/handbook/finance/finance.rituals.yml b/handbook/finance/finance.rituals.yml
index 1d4ddeb946..84e1706f5b 100644
--- a/handbook/finance/finance.rituals.yml
+++ b/handbook/finance/finance.rituals.yml
@@ -90,7 +90,7 @@
repo: "confidential"
-
task: "Run US contractor payroll"
- startedOn: "2024-02-28"
+ startedOn: "2024-02-27"
frequency: "Monthly"
description: "Manually process US contractor payroll by verifying and syncing time contractor worked, then processing payment."
moreInfoUrl: "https://fleetdm.com/handbook/finance#run-us-contractor-payroll"
diff --git a/handbook/sales/README.md b/handbook/sales/README.md
index ce0cd254c1..11bdfb4219 100644
--- a/handbook/sales/README.md
+++ b/handbook/sales/README.md
@@ -8,7 +8,7 @@ This handbook page details processes specific to working [with](#contact-us) and
| Role | Contributor(s) |
|:--------------------------------------|:------------------------------------------------------------------------------------------------------------------------|
| Chief Revenue Officer (CRO) | [Alex Mitchell](https://www.linkedin.com/in/alexandercmitchell/) _([@alexmitchelliii](https://github.com/alexmitchelliii))_
-| Solutions Consulting (SC) | [Dave Herder](https://www.linkedin.com/in/daveherder/) _([@dherder](https://github.com/dherder))_
[Allen Houchins](https://www.linkedin.com/in/allenhouchins/) _([@allenhouchins](https://github.com/allenhouchins))_
[Harrison Ravazzolo](https://www.linkedin.com/in/harrison-ravazzolo/) _([@harrisonravazzolo](https://github.com/harrisonravazzolo))_
+| Solutions Consulting (SC) | [Allen Houchins](https://www.linkedin.com/in/allenhouchins/) _([@allenhouchins](https://github.com/allenhouchins))_
[Harrison Ravazzolo](https://www.linkedin.com/in/harrison-ravazzolo/) _([@harrisonravazzolo](https://github.com/harrisonravazzolo))_
| Channel Sales | [Tom Ostertag](https://www.linkedin.com/in/tom-ostertag-77212791/) _([@tomostertag](https://github.com/TomOstertag))_
| Account Executive (AE) | [Patricia Ambrus](https://www.linkedin.com/in/pambrus/) _([@ambrusps](https://github.com/ambrusps))_
[Anthony Snyder](https://www.linkedin.com/in/anthonysnyder8/) _([@anthonysnyder8](https://github.com/AnthonySnyder8))_
[Paul Tardif](https://www.linkedin.com/in/paul-t-750833/) _([@phtardif1](https://github.com/phtardif1))_
[Kendra McKeever](https://www.linkedin.com/in/kendramckeever/) _([@KendraAtFleet](https://github.com/KendraAtFleet))_
@@ -53,25 +53,44 @@ Use the following steps to change a contact's organization in Salesforce:
- If the contact's organization in Salesforce is incorrect and we know where they're moving to, navigate to the contact in Salesforce, change the "Account name" to the contact's new organization, and save.
-### Send a quote
+### Send an order form
-During the buying cycle, the champion will need to start the process to secure funding in cooperation with the economic buyer and the finance org.
+In order to be transparent, Fleet sends order forms within 30 days of opportunity creation in most cases. All quotes and purchase orders must be approved by the CRO and 🌐 [Head of Digital Experience](https://fleetdm.com/handbook/digital-experience#team) before being sent to the prospect or customer. Often, the CRO will request legal review of any unique terms required. To prepare and send a subscription order form the Fleet owner of the opportunity (usually AE or CSM) will:
-All quotes and purchase orders must be approved by CRO before being sent to the prospect or customer. Often, the CRO will request legal review of any unique terms required.
+1. Navigate to the ["Template gallery"](https://docs.google.com/document/u/0/?tgif=d&ftv=1) in Google Docs and create a copy of the "TEMPLATE - Order form".
+2. Add/remove table rows as needed for multi-year deals.
+3. Where possible, include a graphic of the customer's logo. Use good judgment and omit if a high-quality graphic is unavailable. If in doubt, ask Digital Experience for help.
-The Fleet owner of the opportunity (usually AE or CSM) will prepare a quote and/or a Purchase Order when requested.
-- Because the champion may need to socialize "what is Fleet" or "what are we getting when buying Fleet," it is most often best to send the quote in [slide form](https://docs.google.com/presentation/d/15kbqm0OYPf1OmmTZvDp4F7VvMERnX4K6TMYqCYNr-wI/edit?usp=sharing).
-- Docusign can be used to create a [standard Purchase Order](https://www.loom.com/share/Loom-Message-16-January-2023-2ba8cf195ec645ebabac267d7df59823?sid=214f8c6b-beb3-427a-a3a8-e8c20b5dc350) if no special terms or pricing are needed.
-- Before sending to prospect, work with the Finance team to verify if sales tax needs to be charged and, if so, how much.
+> **Important**
+> - All changes to the [subscription agreement template](https://docs.google.com/document/d/1X4fh2LsuFtAVyQDnU1ZGBggqg-Ec00vYHACyckEooqA/edit?tab=t.0), or [standard terms](http://fleetdm.com/terms) must be brought to ["🦢🗣 Design review (#g-digital-experience)"](https://app.zenhub.com/workspaces/-g-digital-experience-6451748b4eb15200131d4bab/board?sprints=none) for approval.
+> - All non-standard (from another party) subscription agreements, NDAs, and similar contracts require legal review from Digital Experience before being signed. [Create an issue to request legal review](https://github.com/fleetdm/confidential/blob/main/.github/ISSUE_TEMPLATE/contract-review.md).
+
+4. In the internal Slack channel for the deal, at-mention the CRO and the Head of Digital Experience with a link to the docx version of the order and ask them to approve the order form.
+5. Once approved, send the order to the prospect.
-### Schedule a Solutions Consultant for prospect meeting
+### Send an NDA to a customer
+
+- Fleet uses "Non-Disclosure Agreements" (NDAs) to protect the company and the companies we collaborate with. Always offer to send Fleet's NDA and, whenever possible, default to using the company's version. To send an NDA to a customer, follow these steps:
+1. If a customer has no objections to using Fleet's NDA, route the NDA to them for signature using the "🙊 NDA (Non-disclosure agreement)" template in [DocuSign](https://apps.docusign.com/send/home).
+> If a customer would like to review the NDA first, download a .docx of [Fleet's NDA](https://docs.google.com/document/d/1gQCrF3silBFG9dJgyCvpmLa6hPhX_T4V7pL3XAwgqEU/edit?usp=sharing) and send it to the customer.
+2. If the customer has no objections, route the NDA using the template in DocuSign (do not upload and use the copy you emailed to the customer).
+3. If the customer "redlines" (i.e. wants to change) the NDA, follow the [contract review process](https://fleetdm.com/handbook/company/communications#getting-a-contract-reviewed) so that Digital Experience can look over any proposed changes and provide guidance on how to proceed.
+
+
+### Close a new customer deal
+
+To close a deal with a new customer (non-self-service), create and complete a GitHub issue using the ["Sale" issue template](https://github.com/fleetdm/confidential/issues/new?assignees=alexmitchelliii&labels=%23g-sales&projects=&template=3-sale.md&title=New+customer%3A+_____________).
+
+
+### Process a security questionnaire
+
+- The AE will [use the handbook](https://fleetdm.com/handbook/company/communications#vendor-questionnaires) to answer most of the questions with links to appropriate sections in the handbook. After this first pass has been completed, and if there are outstanding questions, the AE will [assign the issue to Digital Experience (#g-digital-experience)](https://fleetdm.com/handbook/digital-experience#contact-us) with a requested timeline for completion defined.
+- Digital Experience consults the handbook to validate that nothing was missed by the AE. After the second pass has been completed, and if there are outstanding questions, Digital Experience will [reassign the issue to Sales (#g-sales)](https://fleetdm.com/handbook/sales#contact-us) for intake.
+- The issue will be assigned to the Solutions Consultant (SC) associated to the opportunity in order to complete any unanswered questions.
+- The SC will search for unanswered questions and confirm again that nothing was missed from the handbook. Content missing from the handbook will need to be added via PR by the SC. Any unanswered questions after this pass has been completed by the SC will need to be [escalated to the Infrastructure team (#g-customer-success)](https://fleetdm.com/handbook/customer-success#contact-us) with the requested timeline for completion defined in the issue. Once complete, the infra team will assign the issue back to the #g-sales board.
+- Any questions answered by the infra team will be added to the handbook by the SC.
-To schedule an [ad hoc meeting](https://www.vocabulary.com/dictionary/ad%20hoc) with a Fleet prospect, the Account Executive (AE) will [open an issue](https://github.com/fleetdm/confidential/issues/new?assignees=&labels=%23g-sales%2C%23solutions-consultant%2C%3Adiscovery%2C%3Ademo%2C%3Ascoping%2C%3Atech-eval&projects=&template=custom-request.md&title=prospect+name+-+prep+%28date%29+-+discovery%2Cdemo%2Cscoping+%28date%29).
- - Use [this calendly link](https://calendly.com/fleetdm/talk-to-a-solutions-consultant) to obtain SC availability.
- - The AE will populate this issue with the appropriate dates for an internal prep meeting as well as the dates for the external prospect meeting.
- - Do not assign the issue. The Director of Solutions Consulting will assign the issue.
- - Ensure that the product category is defined ("Endpoint ops", "Device management", or "Vulnerability management") in the description of the issue.
-### Send an NDA to a customer
-- Fleet uses "Non-Disclosure Agreements" (NDAs) to protect the company and the companies we collaborate with. Always offer to send Fleet's NDA and, whenever possible, default to using the company's version. To send an NDA to a customer, follow these steps:
-1. If a customer has no objections to using Fleet's NDA, route the NDA to them for signature using the "🙊 NDA (Non-disclosure agreement)" template in [DocuSign](https://apps.docusign.com/send/home).
-> If a customer would like to review the NDA first, download a .docx of [Fleet's NDA](https://docs.google.com/document/d/1gQCrF3silBFG9dJgyCvpmLa6hPhX_T4V7pL3XAwgqEU/edit?usp=sharing) and send it to the customer.
-2. If the customer has no objections, route the NDA using the template in DocuSign (do not upload and use the copy you emailed to the customer).
-3. If the customer "redlines" (i.e. wants to change) the NDA, follow the [contract review process](https://fleetdm.com/handbook/company/communications#getting-a-contract-reviewed) so that Digital Experience can look over any proposed changes and provide guidance on how to proceed.
-
-
-### Create a subscription agreement
-
-1. Create a copy of the [subscription agreement template](https://docs.google.com/document/d/1ri9sS2rlBbBLEFi7RrfKZ9bZj8e48orsFKZDfF0PgAg/copy?tab=t.0).
-2. Add/remove table rows as needed for multi-year deals.
-3. Where possible, include a graphic of the customer's logo. Use good judgement and omit if a high quality graphic is unavailable. If in doubt, ask Digital Experience for help.
-
-> **Important**
-> - All changes to the [subscription agreement template](https://docs.google.com/document/d/1ri9sS2rlBbBLEFi7RrfKZ9bZj8e48orsFKZDfF0PgAg/copy?tab=t.0), or [standard terms](http://fleetdm.com/terms) must be brought to ["🦢🗣 Design review (#g-digital-experience)"](https://app.zenhub.com/workspaces/-g-digital-experience-6451748b4eb15200131d4bab/board?sprints=none) for approval.
-> - All non-standard (from another party) subscription agreements, NDAs, and similar contracts require legal review from Digital Experience before being signed. [Create an issue to request legal review](https://github.com/fleetdm/confidential/blob/main/.github/ISSUE_TEMPLATE/contract-review.md).
-
-
-### Close a new customer deal
-
-To close a deal with a new customer (non-self-service), create and complete a GitHub issue using the ["Sale" issue template](https://github.com/fleetdm/confidential/issues/new?assignees=alexmitchelliii&labels=%23g-sales&projects=&template=3-sale.md&title=New+customer%3A+_____________).
-
-
-### Process a security questionnaire
-
-- The AE will [use the handbook](https://fleetdm.com/handbook/company/communications#vendor-questionnaires) to answer most of the questions with links to appropriate sections in the handbook. After this first pass has been completed, and if there are outstanding questions, the AE will [assign the issue to Digital Experience (#g-digital-experience)](https://fleetdm.com/handbook/digital-experience#contact-us) with a requested timeline for completion defined.
-- Digital Experience consults the handbook to validate that nothing was missed by the AE. After the second pass has been completed, and if there are outstanding questions, Digital Experience will [reassign the issue to Sales (#g-sales)](https://fleetdm.com/handbook/sales#contact-us) for intake.
-- The issue will be assigned to the Solutions Consultant (SC) associated to the opportunity in order to complete any unanswered questions.
-- The SC will search for unanswered questions and confirm again that nothing was missed from the handbook. Content missing from the handbook will need to be added via PR by the SC. Any unanswered questions after this pass has been completed by the SC will need to be [escalated to the Infrastructure team (#g-customer-success)](https://fleetdm.com/handbook/customer-success#contact-us) with the requested timeline for completion defined in the issue. Once complete, the infra team will assign the issue back to the #g-sales board.
-- Any questions answered by the infra team will be added to the handbook by the SC.
## Rituals
@@ -225,17 +213,6 @@ Please see [handbook/company/communications#customer-support-service-level-agree
##### Submit a customer contract
Please see [handbook/sales#create-a-customer-agreement](https://fleetdm.com/handbook/sales#create-a-customer-agreement) for all sections above.
-##### Customer codenames
-Please see [Handbook/customer-success#assign-a-customer-codename](https://www.fleetdm.com/handbook/customer-success#assign-a-customer-codename)
-
-##### Document customer requests
-Please see [handbook/customer-success#document-customer-requests](https://fleetdm.com/handbook/customer-success#document-customer-requests)
-
-##### Generate a trial license key
-Please see [handbook/customer-success#generate-a-trial-license-key](https://fleetdm.com/handbook/customer-success#generate-a-trial-license-key)
-
-#### Create customer support Issue
-Please see [handbook/customer-success#create-customer-support-issue](https://fleetdm.com/handbook/customer-success#create-customer-support-issue)
diff --git a/infrastructure/dogfood/terraform/aws/variables.tf b/infrastructure/dogfood/terraform/aws/variables.tf
index cd04b77c50..097ee9befe 100644
--- a/infrastructure/dogfood/terraform/aws/variables.tf
+++ b/infrastructure/dogfood/terraform/aws/variables.tf
@@ -56,7 +56,7 @@ variable "database_name" {
variable "fleet_image" {
description = "the name of the container image to run"
- default = "fleetdm/fleet:v4.59.1"
+ default = "fleetdm/fleet:v4.60.0"
}
variable "software_inventory" {
diff --git a/infrastructure/dogfood/terraform/gcp/variables.tf b/infrastructure/dogfood/terraform/gcp/variables.tf
index deb96bc38e..4cc4956f10 100644
--- a/infrastructure/dogfood/terraform/gcp/variables.tf
+++ b/infrastructure/dogfood/terraform/gcp/variables.tf
@@ -68,7 +68,7 @@ variable "redis_mem" {
}
variable "image" {
- default = "fleetdm/fleet:v4.59.1"
+ default = "fleetdm/fleet:v4.60.0"
}
variable "software_installers_bucket_name" {
diff --git a/infrastructure/guardduty/.terraform.lock.hcl b/infrastructure/guardduty/.terraform.lock.hcl
index 5b743eb544..f8978d7aa6 100644
--- a/infrastructure/guardduty/.terraform.lock.hcl
+++ b/infrastructure/guardduty/.terraform.lock.hcl
@@ -2,8 +2,8 @@
# Manual edits may be lost in future updates.
provider "registry.terraform.io/hashicorp/aws" {
- version = "4.59.1"
- constraints = ">= 3.0.0, >= 4.8.0, >= 4.9.0, ~> 4.59.1"
+ version = "4.60.0"
+ constraints = ">= 3.0.0, >= 4.8.0, >= 4.9.0, ~> 4.60.0"
hashes = [
"h1:fuIdjl9f2JEH0TLoq5kc9NIPbJAAV7YBbZ8fvNp5XSg=",
"zh:0341a460210463a0bebd5c12ce13dc49bd8cae2399b215418c5efa607fed84e4",
diff --git a/infrastructure/guardduty/main.tf b/infrastructure/guardduty/main.tf
index fdeb7607e0..f1ce03a274 100644
--- a/infrastructure/guardduty/main.tf
+++ b/infrastructure/guardduty/main.tf
@@ -2,7 +2,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
- version = "~> 4.59.1"
+ version = "~> 4.60.0"
}
}
backend "s3" {
diff --git a/infrastructure/infrastructure/cloudtrail/main.tf b/infrastructure/infrastructure/cloudtrail/main.tf
index 0eaff5aff2..a000f06d08 100644
--- a/infrastructure/infrastructure/cloudtrail/main.tf
+++ b/infrastructure/infrastructure/cloudtrail/main.tf
@@ -2,7 +2,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
- version = "~> 4.59.1"
+ version = "~> 4.60.0"
}
}
backend "s3" {
diff --git a/infrastructure/infrastructure/elastic-agent/.terraform.lock.hcl b/infrastructure/infrastructure/elastic-agent/.terraform.lock.hcl
index c327efe675..4ed29230cf 100644
--- a/infrastructure/infrastructure/elastic-agent/.terraform.lock.hcl
+++ b/infrastructure/infrastructure/elastic-agent/.terraform.lock.hcl
@@ -2,8 +2,8 @@
# Manual edits may be lost in future updates.
provider "registry.terraform.io/hashicorp/aws" {
- version = "4.59.1"
- constraints = ">= 3.63.0, ~> 4.59.1"
+ version = "4.60.0"
+ constraints = ">= 3.63.0, ~> 4.60.0"
hashes = [
"h1:fuIdjl9f2JEH0TLoq5kc9NIPbJAAV7YBbZ8fvNp5XSg=",
"zh:0341a460210463a0bebd5c12ce13dc49bd8cae2399b215418c5efa607fed84e4",
diff --git a/infrastructure/infrastructure/elastic-agent/main.tf b/infrastructure/infrastructure/elastic-agent/main.tf
index 78f310682b..41f8b21f8e 100644
--- a/infrastructure/infrastructure/elastic-agent/main.tf
+++ b/infrastructure/infrastructure/elastic-agent/main.tf
@@ -20,7 +20,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
- version = "~> 4.59.1"
+ version = "~> 4.60.0"
}
}
backend "s3" {
diff --git a/infrastructure/infrastructure/guardduty-alerts/.terraform.lock.hcl b/infrastructure/infrastructure/guardduty-alerts/.terraform.lock.hcl
index 5b743eb544..f8978d7aa6 100644
--- a/infrastructure/infrastructure/guardduty-alerts/.terraform.lock.hcl
+++ b/infrastructure/infrastructure/guardduty-alerts/.terraform.lock.hcl
@@ -2,8 +2,8 @@
# Manual edits may be lost in future updates.
provider "registry.terraform.io/hashicorp/aws" {
- version = "4.59.1"
- constraints = ">= 3.0.0, >= 4.8.0, >= 4.9.0, ~> 4.59.1"
+ version = "4.60.0"
+ constraints = ">= 3.0.0, >= 4.8.0, >= 4.9.0, ~> 4.60.0"
hashes = [
"h1:fuIdjl9f2JEH0TLoq5kc9NIPbJAAV7YBbZ8fvNp5XSg=",
"zh:0341a460210463a0bebd5c12ce13dc49bd8cae2399b215418c5efa607fed84e4",
diff --git a/infrastructure/infrastructure/guardduty-alerts/main.tf b/infrastructure/infrastructure/guardduty-alerts/main.tf
index 4d0e0f4a68..698cfd3e22 100644
--- a/infrastructure/infrastructure/guardduty-alerts/main.tf
+++ b/infrastructure/infrastructure/guardduty-alerts/main.tf
@@ -15,7 +15,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
- version = "~> 4.59.1"
+ version = "~> 4.60.0"
}
}
backend "s3" {
diff --git a/infrastructure/infrastructure/spend_alerts/main.tf b/infrastructure/infrastructure/spend_alerts/main.tf
index 837d69399e..7af7ceac54 100644
--- a/infrastructure/infrastructure/spend_alerts/main.tf
+++ b/infrastructure/infrastructure/spend_alerts/main.tf
@@ -2,7 +2,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
- version = "~> 4.59.1"
+ version = "~> 4.60.0"
}
}
backend "s3" {
diff --git a/infrastructure/kubequery/.fossa.yml b/infrastructure/kubequery/.fossa.yml
deleted file mode 100644
index 841e42cc48..0000000000
--- a/infrastructure/kubequery/.fossa.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-# Copyright (c) 2020-present, The kubequery authors
-#
-# This source code is licensed as defined by the LICENSE file found in the
-# root directory of this source tree.
-#
-# SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
-
-version: 2
-cli:
- server: https://app.fossa.com
- fetcher: custom
- project: git@github.com:Uptycs/kubequery.git
-analyze:
- modules:
- - name: github.com/Uptycs/kubequery/cmd/kubequery
- type: go
- target: github.com/Uptycs/kubequery/cmd/kubequery
- path: cmd/kubequery
diff --git a/infrastructure/kubequery/.gitignore b/infrastructure/kubequery/.gitignore
deleted file mode 100644
index 4077dd3103..0000000000
--- a/infrastructure/kubequery/.gitignore
+++ /dev/null
@@ -1,14 +0,0 @@
-# Copyright (c) 2020-present, The kubequery authors
-#
-# This source code is licensed as defined by the LICENSE file found in the
-# root directory of this source tree.
-#
-# SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
-
-.vscode
-vendor
-kubequery.yaml
-/bin/genschema
-/bin/gentables
-/bin/kubequery
-/bin/uuidgen
diff --git a/infrastructure/kubequery/CHANGELOG.md b/infrastructure/kubequery/CHANGELOG.md
deleted file mode 100644
index b5ac95b995..0000000000
--- a/infrastructure/kubequery/CHANGELOG.md
+++ /dev/null
@@ -1,158 +0,0 @@
-# kubequery change log
-
-
-
-## [1.1.1](https://github.com/Uptycs/kubequery/releases/tag/1.1.1)
-
-[Git Commits](https://github.com/Uptycs/kubequery/compare/1.1.0...1.1.1)
-
-### New Features
-
-### Under the Hood improvements
-
-* Upgrade to basequery 5.0.2
-* Upgraded to Go 1.17
-
-### Table Changes
-
-### Bug Fixes
-
-### Documentation
-
-### Build
-
-### Security Issues
-
-### Packs
-
-
-
-## [1.1.0](https://github.com/Uptycs/kubequery/releases/tag/1.1.0)
-
-[Git Commits](https://github.com/Uptycs/kubequery/compare/1.0.0...1.1.0)
-
-### New Features
-
-* Helm chart to install kubequery
-* Support for Kubernetes 1.22
-
-### Under the Hood improvements
-
-* Upgrade to basequery 4.9.0
-* Upgraded to client go version 0.22
-
-### Table Changes
-
-* k8s 1.22 caused few table [schemas changes](https://github.com/Uptycs/kubequery/commit/a70e9a42f6f85ca1a0ebd23575590c73562fab83#diff-79f5d80ee02a931b2bf12fd018b6edeb447abd58e1fb85ae155ae932ec29ad9d):
- * kubernetes_stateful_sets
- * kubernetes_jobs
- * kubernetes_persistent_volume_claims
- * kubernetes_services
-
-### Bug Fixes
-
-* Check container status before iterating over contents. [Issue 16](https://github.com/Uptycs/kubequery/issues/16)
-
-### Documentation
-
-* Added helm related details in README.md
-
-### Build
-
-### Security Issues
-
-### Packs
-
-
-
-## [1.0.0](https://github.com/Uptycs/kubequery/releases/tag/1.0.0)
-
-[Git Commits](https://github.com/Uptycs/kubequery/compare/0.3.0...1.0.0)
-
-### New Features
-
-* New `kubequeryi` command line to easily invoke shell
-* Easy to use with [query-tls](https://github.com/Uptycs/query-tls)
-
-### Under the Hood improvements
-
-* Upgrade to basequery 4.8.0
-* Switch to light weight busybox docker image
-* Simple NodeJS based integration test
-
-### Table Changes
-
-* Added `cluster_name` and `cluster_uid` to tables missing those columns
-* Break up `resources` in `*_containers` tables to `resource_limits` and `resource_requests`
-* Added new table `kubernetes_component_statuses`
-* Removed table `kubernetes_storage_capacities`
-
-### Bug Fixes
-
-### Documentation
-
-### Build
-
-* Upgrade to Go 1.16
-
-### Security Issues
-
-### Packs
-
-* Added default query pack for all kubernetes tables
-
-
-
-## [0.3.0](https://github.com/Uptycs/kubequery/releases/tag/0.3.0)
-
-[Git Commits](https://github.com/Uptycs/kubequery/compare/0.2.0...0.3.0)
-
-### New Features
-
-### Under the Hood improvements
-
-* Upgrade to basequery 4.7.0
-
-### Table Changes
-
-### Bug Fixes
-
-### Documentation
-
-* Validate the installation was successful [PR-12](https://github.com/Uptycs/kubequery/pull/12)
-
-### Build
-
-### Security Issues
-
-### Packs
-
-
-
-## [0.2.0](https://github.com/Uptycs/kubequery/releases/tag/0.2.0)
-
-[Git Commits](https://github.com/Uptycs/kubequery/compare/0.1.0...0.2.0)
-
-### New Features
-
-* Added `kubernetes_events` table.
-
-### Under the Hood improvements
-
-* Switch to [basequery](https://github.com/Uptycs/basequery). This is stripped download version of Osquery with support for extension events and other features.
-
-### Table Changes
-
-* kubernetes_events
-
-### Bug Fixes
-
-### Documentation
-
-* Validate the installation was successful [PR-12](https://github.com/Uptycs/kubequery/pull/12)
-
-### Build
-
-### Security Issues
-
-### Packs
diff --git a/infrastructure/kubequery/CODE_OF_CONDUCT.md b/infrastructure/kubequery/CODE_OF_CONDUCT.md
deleted file mode 100644
index acdbb0b4d6..0000000000
--- a/infrastructure/kubequery/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,133 +0,0 @@
-
-# Contributor Covenant Code of Conduct
-
-## Our Pledge
-
-We as members, contributors, and leaders pledge to make participation in our
-community a harassment-free experience for everyone, regardless of age, body
-size, visible or invisible disability, ethnicity, sex characteristics, gender
-identity and expression, level of experience, education, socio-economic status,
-nationality, personal appearance, race, religion, or sexual identity
-and orientation.
-
-We pledge to act and interact in ways that contribute to an open, welcoming,
-diverse, inclusive, and healthy community.
-
-## Our Standards
-
-Examples of behavior that contributes to a positive environment for our
-community include:
-
-* Demonstrating empathy and kindness toward other people
-* Being respectful of differing opinions, viewpoints, and experiences
-* Giving and gracefully accepting constructive feedback
-* Accepting responsibility and apologizing to those affected by our mistakes,
- and learning from the experience
-* Focusing on what is best not just for us as individuals, but for the
- overall community
-
-Examples of unacceptable behavior include:
-
-* The use of sexualized language or imagery, and sexual attention or
- advances of any kind
-* Trolling, insulting or derogatory comments, and personal or political attacks
-* Public or private harassment
-* Publishing others' private information, such as a physical or email
- address, without their explicit permission
-* Other conduct which could reasonably be considered inappropriate in a
- professional setting
-
-## Enforcement Responsibilities
-
-Community leaders are responsible for clarifying and enforcing our standards of
-acceptable behavior and will take appropriate and fair corrective action in
-response to any behavior that they deem inappropriate, threatening, offensive,
-or harmful.
-
-Community leaders have the right and responsibility to remove, edit, or reject
-comments, commits, code, wiki edits, issues, and other contributions that are
-not aligned to this Code of Conduct, and will communicate reasons for moderation
-decisions when appropriate.
-
-## Scope
-
-This Code of Conduct applies within all community spaces, and also applies when
-an individual is officially representing the community in public spaces.
-Examples of representing our community include using an official e-mail address,
-posting via an official social media account, or acting as an appointed
-representative at an online or offline event.
-
-## Enforcement
-
-Instances of abusive, harassing, or otherwise unacceptable behavior may be
-reported to the community leaders responsible for enforcement at
-[kubequery@uptycs.com](mailto:kubequery@uptycs.com).
-All complaints will be reviewed and investigated promptly and fairly.
-
-All community leaders are obligated to respect the privacy and security of the
-reporter of any incident.
-
-## Enforcement Guidelines
-
-Community leaders will follow these Community Impact Guidelines in determining
-the consequences for any action they deem in violation of this Code of Conduct:
-
-### 1. Correction
-
-**Community Impact**: Use of inappropriate language or other behavior deemed
-unprofessional or unwelcome in the community.
-
-**Consequence**: A private, written warning from community leaders, providing
-clarity around the nature of the violation and an explanation of why the
-behavior was inappropriate. A public apology may be requested.
-
-### 2. Warning
-
-**Community Impact**: A violation through a single incident or series
-of actions.
-
-**Consequence**: A warning with consequences for continued behavior. No
-interaction with the people involved, including unsolicited interaction with
-those enforcing the Code of Conduct, for a specified period of time. This
-includes avoiding interactions in community spaces as well as external channels
-like social media. Violating these terms may lead to a temporary or
-permanent ban.
-
-### 3. Temporary Ban
-
-**Community Impact**: A serious violation of community standards, including
-sustained inappropriate behavior.
-
-**Consequence**: A temporary ban from any sort of interaction or public
-communication with the community for a specified period of time. No public or
-private interaction with the people involved, including unsolicited interaction
-with those enforcing the Code of Conduct, is allowed during this period.
-Violating these terms may lead to a permanent ban.
-
-### 4. Permanent Ban
-
-**Community Impact**: Demonstrating a pattern of violation of community
-standards, including sustained inappropriate behavior, harassment of an
-individual, or aggression toward or disparagement of classes of individuals.
-
-**Consequence**: A permanent ban from any sort of public interaction within
-the community.
-
-## Attribution
-
-This Code of Conduct is adapted from the [Contributor Covenant][homepage],
-version 2.0, available at
-[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
-
-Community Impact Guidelines were inspired by
-[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
-
-For answers to common questions about this code of conduct, see the FAQ at
-[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
-at [https://www.contributor-covenant.org/translations][translations].
-
-[homepage]: https://www.contributor-covenant.org
-[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
-[Mozilla CoC]: https://github.com/mozilla/diversity
-[FAQ]: https://www.contributor-covenant.org/faq
-[translations]: https://www.contributor-covenant.org/translations
diff --git a/infrastructure/kubequery/CONTRIBUTING.md b/infrastructure/kubequery/CONTRIBUTING.md
deleted file mode 100644
index 6a43e8d398..0000000000
--- a/infrastructure/kubequery/CONTRIBUTING.md
+++ /dev/null
@@ -1,51 +0,0 @@
-# Contributing to kubequery
-
-Welcome and thank you for considering contributing to kubequery open source.
-
-Reading and following these guidelines will help us make the contribution process easy and effective for everyone involved. It also communicates that you agree to respect the time of the developers managing and developing these open source projects. In return, we will reciprocate that respect by addressing your issue, assessing changes, and helping you finalize your pull requests.
-
-## Quicklinks
-
-* [Code of Conduct](#code-of-conduct)
-* [Getting Started](#getting-started)
- * [Issues](#issues)
- * [Pull Requests](#pull-requests)
-
-## Code of Conduct
-
-By participating and contributing to this project, you agree to uphold our [Code of Conduct](https://github.com/Uptycs/kubequery/blob/master/CODE_OF_CONDUCT.md).
-
-## Getting Started
-
-Contributions are made to this repo via Issues and Pull Requests (PRs). A few general guidelines that cover both:
-
-- To report security vulnerabilities, please email [kubequery@uptycs.com](mailto:kubequery@uptycs.com).
-- Search for existing Issues and PRs before creating your own.
-
-### Issues
-
-Issues should be used to report problems with kubequery, request a new feature, or to discuss potential changes before a PR is created. When you create a new issue, a template will be loaded that will guide you through collecting and providing the information we need to investigate.
-
-If you find an issue that addresses the problem you're having, please add your own reproduction information to the existing issue rather than creating a new one. Adding a [reaction](https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) can also help be indicating to our maintainers that a particular problem is affecting more than just the reporter.
-
-### Pull Requests
-
-PRs to our libraries are always welcome and can be a quick way to get your fix or improvement slated for the next release. In general, PRs should:
-
-- Only fix/add the functionality in question.
-- Add unit tests for fixed or changed functionality.
-- Address a single concern in the least number of changed lines as possible.
-- Include documentation in the repo.
-- Be accompanied by a complete Pull Request template (loaded automatically when a PR is created).
-
-For changes that address core functionality or would require breaking changes (e.g. a major release), it's best to open an Issue to discuss your proposal first. This is not required but can save time creating and reviewing changes.
-
-In general, we follow the ["fork-and-pull" Git workflow](https://github.com/susam/gitpr)
-
-1. Fork the repository to your own Github account
-2. Clone the project to your machine
-3. Create a branch locally with a succinct but descriptive name
-4. Commit changes to the branch
-5. Following any formatting and testing guidelines specific to this repo
-6. Push changes to your fork
-7. Open a PR in our repository and follow the PR template so that we can efficiently review the changes.
diff --git a/infrastructure/kubequery/Dockerfile b/infrastructure/kubequery/Dockerfile
deleted file mode 100644
index 5480212ad9..0000000000
--- a/infrastructure/kubequery/Dockerfile
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright (c) 2020-present, The kubequery authors
-#
-# This source code is licensed as defined by the LICENSE file found in the
-# root directory of this source tree.
-#
-# SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
-
-FROM ubuntu:20.04@sha256:80ef4a44043dec4490506e6cc4289eeda2d106a70148b74b5ae91ee670e9c35d AS builder
-
-ARG BASEQUERY_VERSION=5.0.2
-
-ADD https://uptycs-basequery.s3.amazonaws.com/${BASEQUERY_VERSION}/basequery_${BASEQUERY_VERSION}-1.linux_amd64.deb /tmp/basequery.deb
-
-RUN dpkg -i /tmp/basequery.deb
-
-# =====
-
-FROM uptycs/busybox:v1.33.0@sha256:6a312f5959d374420eedce83f42d2ad19a027bd4e448ed734372bc1a07ad8b10
-
-ARG BASEQUERY_VERSION
-ARG KUBEQUERY_VERSION
-
-LABEL \
- name="kubequery" \
- description="kubequery powered by Osquery" \
- version="${KUBEQUERY_VERSION}" \
- url="https://github.com/Uptycs/kubequery"
-
-# uptycs/busybox comes with this user predefined. We need a non-root user
-USER uptycs
-
-WORKDIR /opt/uptycs
-
-RUN set -ex; \
- mkdir /opt/uptycs/bin /opt/uptycs/etc /opt/uptycs/logs /opt/uptycs/var && \
- echo "/opt/uptycs/bin/kubequery.ext" > /opt/uptycs/etc/autoload.exts
-
-COPY --from=0 --chown=uptycs:uptycs /opt/osquery/bin/osqueryd /opt/uptycs/bin/basequery
-COPY --from=0 --chown=uptycs:uptycs /opt/osquery/share/osquery/certs/certs.pem /opt/uptycs/etc/
-COPY --chown=uptycs:uptycs bin/entrypoint.sh bin/kubequeryi bin/uuidgen /opt/uptycs/bin/
-COPY --chown=uptycs:uptycs bin/kubequery /opt/uptycs/bin/kubequery.ext
-
-ENV KUBEQUERY_VERSION=${KUBEQUERY_VERSION}
-
-ENTRYPOINT ["/opt/uptycs/bin/entrypoint.sh"]
diff --git a/infrastructure/kubequery/LICENSE b/infrastructure/kubequery/LICENSE
deleted file mode 100644
index 84be566876..0000000000
--- a/infrastructure/kubequery/LICENSE
+++ /dev/null
@@ -1,9 +0,0 @@
-# License
-
-By contributing to kubequery you agree that your contributions will be licensed
-under the terms of both the [LICENSE-Apache-2.0](LICENSE-Apache-2.0) and the
-[LICENSE-GPL-2.0](LICENSE-GPL-2.0) files in the root of this source tree.
-
-If you're using kubequery you are free to choose one of the provided licenses.
-
-`SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-only`
diff --git a/infrastructure/kubequery/LICENSE-Apache-2.0 b/infrastructure/kubequery/LICENSE-Apache-2.0
deleted file mode 100644
index 8f71f43fee..0000000000
--- a/infrastructure/kubequery/LICENSE-Apache-2.0
+++ /dev/null
@@ -1,202 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "{}"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright {yyyy} {name of copyright owner}
-
- Licensed 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.
-
diff --git a/infrastructure/kubequery/LICENSE-GPL-2.0 b/infrastructure/kubequery/LICENSE-GPL-2.0
deleted file mode 100644
index 1f963da0d1..0000000000
--- a/infrastructure/kubequery/LICENSE-GPL-2.0
+++ /dev/null
@@ -1,340 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Lesser General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-
- Copyright (C)
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- , 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.
-
diff --git a/infrastructure/kubequery/Makefile b/infrastructure/kubequery/Makefile
deleted file mode 100644
index 34af3a2c20..0000000000
--- a/infrastructure/kubequery/Makefile
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/usr/bin/make -f
-
-# Copyright (c) 2020-present, The kubequery authors
-#
-# This source code is licensed as defined by the LICENSE file found in the
-# root directory of this source tree.
-#
-# SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
-
-ifeq ($(VERSION),)
- VERSION := $(shell git describe --tags HEAD | cut -d'-' -f1-2 | sed 's/-/./')
-endif
-
-all: deps lint test build kubequery.yaml
-
-deps:
- @go mod download
-
-lint:
- @go install honnef.co/go/tools/cmd/staticcheck@latest
- @go install golang.org/x/lint/golint
- @staticcheck ./...
- @golint ./...
-
-build: deps
- @go build -ldflags="-s -w -X main.VERSION=${VERSION}" -o bin ./...
-
-test:
- @go test -race -cover ./...
-
-integration:
- @node integration/index.js
-
-docker: build
- @docker build --build-arg KUBEQUERY_VERSION=${VERSION} -t uptycs/kubequery:${VERSION} .
-
-genschema: build
- @./bin/gentables > docs/tables.json
- @echo "\`\`\`sql" > docs/schema.md
- @./bin/genschema >> docs/schema.md
- @echo "\`\`\`" >> docs/schema.md
-
-kubequery.yaml:
- @sed -e "s/^/ /g" etc/kubequery.flags > etc/kubequery.flags.tmp
- @sed -e "s/^/ /g" etc/kubequery.conf > etc/kubequery.conf.tmp
- @sed -e "/kubequery.flags: |/r etc/kubequery.flags.tmp" \
- -e "/kubequery.conf: |/r etc/kubequery.conf.tmp" \
- -e "s/version: latest/version: ${VERSION}/g" \
- kubequery-template.yaml > kubequery.yaml
- @rm -f etc/*.tmp
-
-clean:
- @rm -rf vendor kubequery.yaml bin/kubequery bin/genschema bin/uuidgen etc/*.tmp
-
-.PHONY: all integration
diff --git a/infrastructure/kubequery/README.md b/infrastructure/kubequery/README.md
deleted file mode 100644
index 6adad45b14..0000000000
--- a/infrastructure/kubequery/README.md
+++ /dev/null
@@ -1,180 +0,0 @@
-[](https://github.com/Uptycs/kubequery/actions?query=workflow%3ABuild)
-[](https://github.com/Uptycs/kubequery/actions?query=workflow%3ACodeQL)
-[](https://goreportcard.com/report/github.com/Uptycs/kubequery)
-[](https://app.fossa.com/projects/custom%2B22616%2Fgit%40github.com%3AUptycs%2Fkubequery.git?ref=badge_shield) [](CODE_OF_CONDUCT.md)
-
----
-
-# kubequery powered by Osquery
-
-kubequery is a [Osquery](https://osquery.io) extension that provides SQL based analytics for [Kubernetes](https://kubernetes.io) clusters
-
-kubequery will be packaged as docker image available from [dockerhub](https://hub.docker.com/r/uptycs/kubequery). It is expected to be deployed as a [Kubernetes Deployment](https://kubernetes.io/docs/concepts/workloads/controllers/deployment) per cluster. A sample deployment template is available [here](kubequery-template.yaml)
-
-kubequery tables [schema is available here](docs/schema.md)
-
----
-
-## Build
-
-`Go 1.17` and `make` are required to build kubequery. Run: `make`
-
-Container image for master branch will be available on [dockerhub](https://hub.docker.com/r/uptycs/kubequery)
-```sh
-docker pull uptycs/kubequery:latest
-```
-
-For production, tagged container images should be used instead of `latest`.
-
----
-
-## Deployment
-
-[kubequery-template.yaml](kubequery-template.yaml) is a template that creates the following Kubernetes resources:
-* [Namespace](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/)
-* [ServiceAccount](https://kubernetes.io/docs/reference/access-authn-authz/authentication/#service-account-tokens)
-* [ClusterRole](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#role-and-clusterrole)
-* [ClusterRoleBinding](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#rolebinding-and-clusterrolebinding)
-* [ConfigMap](https://kubernetes.io/docs/concepts/configuration/configmap/)
-* [Deployment](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/)
-
-`kubequery` Namespace will be the placeholder for all resources that are namespaced.
-
-`kubequery-sa` is ServiceAccount that is associated with the kubequery deployment pod specification. The container uses the service account token to authenticate with the API server.
-
-`kubequery-clusterrole` is a ClusterRole that allows `get` and `list` operations on all resources in the following API groups:
-- "" (core)
-- admissionregistration.k8s.io
-- apps
-- autoscaling
-- batch
-- networking.k8s.io
-- policy
-- rbac.authorization.k8s.io
-- storage.k8s.io
-
-`kubequery-clusterrolebinding` is a ClusterRoleBinding that binds the cluster role with the service account.
-
-`kubequery-config` is a ConfigMap that will be mounted inside the container image as a directory. The contents of this config map should be similar to `/etc/osquery`. For example, kubequery.flags, kubequery.conf, etc. should be part of this config map.
-
-`kubequery` is the Deployment that creates one replica pod. The container launched as a part of the pod is run as non-root user.
-
-By default pod resource `requests` and `limits` are set to 500m (half a core) and 200MB. kubequery.yaml file should be tweaked to suite your needs before applying:
-
-```sh
-kubectl apply -f kubequery.yaml
-```
-
-Check the status of the pod using the following command. Pod should be in Running Status.
-```sh
-kubectl get pods -n kubequery
-```
-
-Validate the installation was successful by first executing:
-
-```sh
-kubectl exec -it $(kubectl get pods -n kubequery -o jsonpath='{.items[0].metadata.name}') -n kubequery -- kubequeryi '.tables'
-```
-
-Which should produce the following output:
-
-```
- => kubernetes_api_resources
- => kubernetes_cluster_role_binding_subjects
- => kubernetes_cluster_role_policy_rule
- => kubernetes_config_maps
- => kubernetes_cron_jobs
- => kubernetes_csi_drivers
- => kubernetes_csi_node_drivers
- => kubernetes_daemon_set_containers
- ...
-```
-
-Queries can be run using kubequeryi on the deployed container:
-
-```sh
-kubectl exec -it $(kubectl get pods -n kubequery -o jsonpath='{.items[0].metadata.name}') -n kubequery -- kubequeryi --line 'SELECT * FROM kubernetes_pods'
-```
-
-Pod logs can be viewed using:
-```sh
-kubectl logs $(kubectl get pods -n kubequery -o jsonpath='{.items[0].metadata.name}') -n kubequery
-```
-
-## Helm
-
-[Helm](https://helm.sh) must be installed to use the charts. Please refer to Helm's [documentation](https://helm.sh/docs) to get started.
-
-Once Helm has been set up correctly, add the repo as follows:
-
-```sh
-helm repo add uptycs https://uptycs.github.io/kubequery
-```
-
-If you had already added this repo earlier, run `helm repo update` to retrieve the latest versions of the packages. You can then run `helm search repo uptycs` to see the charts.
-
-To install the kubequery chart:
-```sh
-helm install my-kubequery uptycs/kubequery
-```
-
-To uninstall the chart:
-```sh
-helm delete my-kubequery
-```
-
----
-
-## FAQ
-
-### Use kubequery instead of Osquery in Kubernetes?
-
-No. kubequery should to be deployed as a [Kubernetes Deployment](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/). Which means there will be one [Pod](https://kubernetes.io/docs/concepts/workloads/pods/) of kubequery running per Kubernetes cluster. Osquery should be deployed to every node in the cluster. Querying most Osquery tables from an ephemeral pod does not provide much value. kubequery container image also runs as non-root user, which means most of the Osquery tables will either return an error or partial data.
-
-
-
-### Why are some columns JSON?
-
-Normalizing nested JSON data like Kubernetes API responses will create an explosion of tables. So some of the columns in kuberenetes tables are left as JSON. Data is eventually processed by [SQLite](https://www.sqlite.org/index.html) with-in Osquery. SQLite has very [good JSON](https://www.sqlite.org/json1.html) support.
-
-For example if `run_as_user` in `kubernetes_pod_security_policies` table looks like the following:
-```json
-{"rule": "MustRunAsNonRoot"}
-```
-
-To get the value of `rule`, the following query can be used:
-```sql
-SELECT value AS 'rule'
-FROM kubernetes_pod_security_policies, json_tree(kubernetes_pod_security_policies.run_as_user)
-WHERE key = 'rule';
-
-+------------------+
-| rule |
-+------------------+
-| MustRunAsNonRoot |
-+------------------+
-```
-
-[json_each](https://www.sqlite.org/json1.html#jeach) can be used to explode JSON array types. For example if `volumes` in `kubernetes_pod_security_policies` table looks like the following:
-```json
-{"volumes": ["configMap","emptyDir","projected","secret","downwardAPI","persistentVolumeClaim"]}
-```
-
-To get a separate row for each volume, the following query can be used:
-```sql
-SELECT value
-FROM kubernetes_pod_security_policies, json_each(kubernetes_pod_security_policies.volumes);
-
-+-----------------------+
-| value |
-+-----------------------+
-| configMap |
-| emptyDir |
-| projected |
-| secret |
-| downwardAPI |
-| persistentVolumeClaim |
-+-----------------------+
-```
-
-Osquery logger's like TLS, Kafka loggers can be used to export scheduled query data to remove fleet management/security analytics platforms. Lamba like functions can be applied on rows of streaming data in these platforms. These lamba functions can extract necessary fields from embedded JSON to detect compliance issues or security concerns. If tables are normalized and are streamed at different schedules, it will not be trivial to JOIN across tables and trigger events/alerts.
diff --git a/infrastructure/kubequery/SECURITY.md b/infrastructure/kubequery/SECURITY.md
deleted file mode 100644
index c4451d097e..0000000000
--- a/infrastructure/kubequery/SECURITY.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# Security Policy
-
-## Supported Versions
-
-| Version | Supported |
-| ------- | ------------------ |
-| 1.1.1 | :white_check_mark: |
-| 1.1.0 | :white_check_mark: |
-| 1.0.0 | :white_check_mark: |
-
-## Reporting a Vulnerability
-
-Please report vulnerabilties to [kubequery@uptycs.com](mailto:kubequery@uptycs.com).
-We will evaluate the details and get back ASAP.
-We are working on creating other communication channels for kubequery developers and users.
diff --git a/infrastructure/kubequery/bin/entrypoint.sh b/infrastructure/kubequery/bin/entrypoint.sh
deleted file mode 100755
index a4fb190906..0000000000
--- a/infrastructure/kubequery/bin/entrypoint.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-
-UUID=$(/opt/uptycs/bin/uuidgen)
-if [ $? -eq 0 ]; then
- # Use kube-system UUID as the host identifier
- ADDITIONAL_FLAGS="--host_identifier=specified --specified_identifier=${UUID}"
-fi
-
-if [ -d /opt/uptycs/config ]; then
- # Copy bootstrap flags and configuration from volume mount
- cp /opt/uptycs/config/* /opt/uptycs/etc/
-fi
-
-exec /opt/uptycs/bin/basequery \
- --flagfile=/opt/uptycs/etc/kubequery.flags \
- --config_path=/opt/uptycs/etc/kubequery.conf \
- --database_path=/opt/uptycs/kubequery.db \
- --logger_path=/opt/uptycs/logs \
- --pidfile=/opt/uptycs/var/kubequery.pid \
- --disable_watchdog \
- --enroll_tables=osquery_info,kubernetes_info \
- ${ADDITIONAL_FLAGS} \
- --tls_user_agent=kubequery/${KUBEQUERY_VERSION} \
- --extensions_socket=/opt/uptycs/var/kubequery.em \
- --extensions_autoload=/opt/uptycs/etc/autoload.exts \
- --extensions_require=kubequery \
- --extension_event_tables=kubernetes_events \
- -D
diff --git a/infrastructure/kubequery/bin/kubequeryi b/infrastructure/kubequery/bin/kubequeryi
deleted file mode 100755
index 0babe0328f..0000000000
--- a/infrastructure/kubequery/bin/kubequeryi
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-
-/opt/uptycs/bin/basequery \
- --flagfile=/opt/uptycs/etc/kubequery.flags \
- --config_path=/opt/uptycs/etc/kubequery.conf \
- --extensions_socket=/opt/uptycs/var/kubequeryi.em \
- --extensions_autoload=/opt/uptycs/etc/autoload.exts \
- --extensions_require=kubequery \
- --extension_event_tables=kubernetes_events \
- --disable_database \
- --disable_events=false \
- -S \
- "$@"
diff --git a/infrastructure/kubequery/charts/kubequery/.helmignore b/infrastructure/kubequery/charts/kubequery/.helmignore
deleted file mode 100644
index d2cfd4600b..0000000000
--- a/infrastructure/kubequery/charts/kubequery/.helmignore
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright (c) 2020-present, The kubequery authors
-#
-# This source code is licensed as defined by the LICENSE file found in the
-# root directory of this source tree.
-#
-# SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
-
-# Patterns to ignore when building packages.
-
-# This supports shell glob matching, relative path matching, and
-# negation (prefixed with !). Only one pattern per line.
-.DS_Store
-
-# Common VCS dirs
-.git/
-.gitignore
-.bzr/
-.bzrignore
-.hg/
-.hgignore
-.svn/
-
-# Common backup files
-*.swp
-*.bak
-*.tmp
-*.orig
-*~
-
-# Various IDEs
-.project
-.idea/
-*.tmproj
-.vscode/
diff --git a/infrastructure/kubequery/charts/kubequery/Chart.yaml b/infrastructure/kubequery/charts/kubequery/Chart.yaml
deleted file mode 100644
index 0adac6e19f..0000000000
--- a/infrastructure/kubequery/charts/kubequery/Chart.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright (c) 2020-present, The kubequery authors
-#
-# This source code is licensed as defined by the LICENSE file found in the
-# root directory of this source tree.
-#
-# SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
-
-apiVersion: v2
-
-name: kubequery
-description: kubequery powered by Osquery
-
-type: application
-version: 1.1.1
-appVersion: 1.1.1
-icon: https://raw.githubusercontent.com/Uptycs/kubequery/master/docs/kubequery.png
diff --git a/infrastructure/kubequery/charts/kubequery/templates/Chart.yaml b/infrastructure/kubequery/charts/kubequery/templates/Chart.yaml
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/infrastructure/kubequery/charts/kubequery/templates/_helpers.tpl b/infrastructure/kubequery/charts/kubequery/templates/_helpers.tpl
deleted file mode 100644
index 59a2031ed7..0000000000
--- a/infrastructure/kubequery/charts/kubequery/templates/_helpers.tpl
+++ /dev/null
@@ -1,55 +0,0 @@
-# Copyright (c) 2020-present, The kubequery authors
-#
-# This source code is licensed as defined by the LICENSE file found in the
-# root directory of this source tree.
-#
-# SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
-
-{{/*
-Expand the name of the chart.
-*/}}
-{{- define "kubequery.name" -}}
-{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
-{{- end }}
-
-{{/*
-Create a default fully qualified app name.
-We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
-If release name contains chart name it will be used as a full name.
-*/}}
-{{- define "kubequery.fullname" -}}
-{{- $name := default .Chart.Name .Values.nameOverride }}
-{{- if contains $name .Release.Name }}
-{{- .Release.Name | trunc 63 | trimSuffix "-" }}
-{{- else }}
-{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
-{{- end }}
-{{- end }}
-
-{{/*
-Create chart name and version as used by the chart label.
-*/}}
-{{- define "kubequery.chart" -}}
-{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
-{{- end }}
-
-{{/*
-Common labels
-*/}}
-{{- define "kubequery.labels" -}}
-helm.sh/chart: {{ include "kubequery.chart" . }}
-app.kubernetes.io/instance: {{ .Release.Name }}
-{{- if .Chart.AppVersion }}
-app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
-{{- end }}
-app.kubernetes.io/managed-by: {{ .Release.Service }}
-app.kubernetes.io/part-of: kubequery
-{{- end }}
-
-{{/*
-Selector labels
-*/}}
-{{- define "kubequery.selectorLabels" -}}
-app.kubernetes.io/name: {{ include "kubequery.name" . }}
-app.kubernetes.io/instance: {{ .Release.Name }}
-{{- end }}
diff --git a/infrastructure/kubequery/charts/kubequery/templates/clusterrole.yaml b/infrastructure/kubequery/charts/kubequery/templates/clusterrole.yaml
deleted file mode 100644
index 7bb8ca7af2..0000000000
--- a/infrastructure/kubequery/charts/kubequery/templates/clusterrole.yaml
+++ /dev/null
@@ -1,18 +0,0 @@
-# Copyright (c) 2020-present, The kubequery authors
-#
-# This source code is licensed as defined by the LICENSE file found in the
-# root directory of this source tree.
-#
-# SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
-
-apiVersion: rbac.authorization.k8s.io/v1
-kind: ClusterRole
-metadata:
- name: {{ .Release.Name }}-clusterrole
- labels:
- app.kubernetes.io/name: {{ .Release.Name }}-clusterrole
- {{- include "kubequery.labels" . | nindent 4 }}
-rules:
-- apiGroups: ["", "admissionregistration.k8s.io", "apps", "autoscaling", "batch", "events.k8s.io", "networking.k8s.io", "policy", "rbac.authorization.k8s.io", "storage.k8s.io"]
- resources: ["*"]
- verbs: ["get", "list", "watch"]
diff --git a/infrastructure/kubequery/charts/kubequery/templates/clusterrolebinding.yaml b/infrastructure/kubequery/charts/kubequery/templates/clusterrolebinding.yaml
deleted file mode 100644
index e9561aa222..0000000000
--- a/infrastructure/kubequery/charts/kubequery/templates/clusterrolebinding.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
-# Copyright (c) 2020-present, The kubequery authors
-#
-# This source code is licensed as defined by the LICENSE file found in the
-# root directory of this source tree.
-#
-# SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
-
-apiVersion: rbac.authorization.k8s.io/v1
-kind: ClusterRoleBinding
-metadata:
- name: {{ .Release.Name }}-clusterrolebinding
- labels:
- app.kubernetes.io/name: {{ .Release.Name }}-clusterrolebinding
- {{- include "kubequery.labels" . | nindent 4 }}
-roleRef:
- kind: ClusterRole
- name: {{ .Release.Name }}-clusterrole
- apiGroup: rbac.authorization.k8s.io
-subjects:
-- kind: ServiceAccount
- name: {{ .Release.Name }}-serviceaccount
- namespace: {{ .Values.namespace }}
diff --git a/infrastructure/kubequery/charts/kubequery/templates/configmap.yaml b/infrastructure/kubequery/charts/kubequery/templates/configmap.yaml
deleted file mode 100644
index 0cb7020f73..0000000000
--- a/infrastructure/kubequery/charts/kubequery/templates/configmap.yaml
+++ /dev/null
@@ -1,20 +0,0 @@
-# Copyright (c) 2020-present, The kubequery authors
-#
-# This source code is licensed as defined by the LICENSE file found in the
-# root directory of this source tree.
-#
-# SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
-
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: {{ .Release.Name }}-configmap
- namespace: {{ .Values.namespace }}
- labels:
- app.kubernetes.io/name: {{ .Release.Name }}-configmap
- {{- include "kubequery.labels" . | nindent 4 }}
-data:
-{{- range $name, $config := .Values.config }}
- {{ $name }}: |-
-{{ tpl $config $ | indent 4 }}
- {{- end }}
diff --git a/infrastructure/kubequery/charts/kubequery/templates/deployment.yaml b/infrastructure/kubequery/charts/kubequery/templates/deployment.yaml
deleted file mode 100644
index d7a000e7b3..0000000000
--- a/infrastructure/kubequery/charts/kubequery/templates/deployment.yaml
+++ /dev/null
@@ -1,64 +0,0 @@
-# Copyright (c) 2020-present, The kubequery authors
-#
-# This source code is licensed as defined by the LICENSE file found in the
-# root directory of this source tree.
-#
-# SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
-
-apiVersion: apps/v1
-kind: Deployment
-metadata:
- name: {{ include "kubequery.fullname" . }}
- namespace: {{ .Values.namespace }}
- labels:
- app.kubernetes.io/name: {{ .Release.Name }}-deployment
- {{- include "kubequery.labels" . | nindent 4 }}
-spec:
- replicas: 1
- selector:
- matchLabels:
- {{- include "kubequery.selectorLabels" . | nindent 6 }}
- template:
- metadata:
- {{- with .Values.podAnnotations }}
- annotations:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- labels:
- {{- include "kubequery.selectorLabels" . | nindent 8 }}
- spec:
- hostname: {{ .Values.cluster }}
- securityContext:
- runAsNonRoot: true
- runAsUser: 1000
- runAsGroup: 1000
- fsGroup: 1000
- terminationGracePeriodSeconds: 10
- serviceAccountName: {{ .Release.Name }}-serviceaccount
- containers:
- - name: {{ .Chart.Name }}
- image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
- imagePullPolicy: {{ .Values.image.pullPolicy }}
- {{- with .Values.resources }}
- resources:
- {{- toYaml . | nindent 10 }}
- {{- end }}
- volumeMounts:
- - name: config
- mountPath: /opt/uptycs/config
- {{- with .Values.nodeSelector }}
- nodeSelector:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- {{- with .Values.affinity }}
- affinity:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- {{- with .Values.tolerations }}
- tolerations:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- volumes:
- - name: config
- configMap:
- name: {{ .Release.Name }}-configmap
diff --git a/infrastructure/kubequery/charts/kubequery/templates/namespace.yaml b/infrastructure/kubequery/charts/kubequery/templates/namespace.yaml
deleted file mode 100644
index 1e421a4854..0000000000
--- a/infrastructure/kubequery/charts/kubequery/templates/namespace.yaml
+++ /dev/null
@@ -1,14 +0,0 @@
-# Copyright (c) 2020-present, The kubequery authors
-#
-# This source code is licensed as defined by the LICENSE file found in the
-# root directory of this source tree.
-#
-# SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
-
-apiVersion: v1
-kind: Namespace
-metadata:
- name: {{ .Values.namespace }}
- labels:
- app.kubernetes.io/name: {{ .Values.namespace }}
- {{- include "kubequery.labels" . | nindent 4 }}
diff --git a/infrastructure/kubequery/charts/kubequery/templates/serviceaccount.yaml b/infrastructure/kubequery/charts/kubequery/templates/serviceaccount.yaml
deleted file mode 100644
index 335a744f55..0000000000
--- a/infrastructure/kubequery/charts/kubequery/templates/serviceaccount.yaml
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright (c) 2020-present, The kubequery authors
-#
-# This source code is licensed as defined by the LICENSE file found in the
-# root directory of this source tree.
-#
-# SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
-
-apiVersion: v1
-kind: ServiceAccount
-metadata:
- name: {{ .Release.Name }}-serviceaccount
- namespace: {{ .Values.namespace }}
- labels:
- app.kubernetes.io/name: {{ .Release.Name }}-serviceaccount
- {{- include "kubequery.labels" . | nindent 4 }}
diff --git a/infrastructure/kubequery/charts/kubequery/values.yaml b/infrastructure/kubequery/charts/kubequery/values.yaml
deleted file mode 100644
index 356cb1f9aa..0000000000
--- a/infrastructure/kubequery/charts/kubequery/values.yaml
+++ /dev/null
@@ -1,247 +0,0 @@
-# Copyright (c) 2020-present, The kubequery authors
-#
-# This source code is licensed as defined by the LICENSE file found in the
-# root directory of this source tree.
-#
-# SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
-
-# Namespace to deploy into
-namespace: kubequery
-
-nameOverride: ""
-fullnameOverride: ""
-
-image:
- repository: uptycs/kubequery
- pullPolicy: IfNotPresent
- # Overrides the image tag whose default is the chart appVersion.
- tag: ""
-
-# Cluster name
-cluster: mycluster
-
-resources:
- requests:
- cpu: 200m
- memory: 128Mi
- limits:
- cpu: 1000m
- memory: 512Mi
-
-# kubequery configuration
-config:
- # TLS enroll secret
- enroll.secret: TODO
-
- # Flags
- kubequery.flags: |-
- --schedule_splay_percent=50
-
- # Config
- kubequery.conf: |-
- {
- "schedule": {
- "kubernetes_api_resources": {
- "query": "SELECT * FROM kubernetes_api_resources",
- "interval": 43200
- },
- "kubernetes_cluster_role_policy_rules": {
- "query": "SELECT * FROM kubernetes_cluster_role_policy_rules",
- "interval": 1800
- },
- "kubernetes_cluster_role_binding_subjects": {
- "query": "SELECT * FROM kubernetes_cluster_role_binding_subjects",
- "interval": 1800
- },
- "kubernetes_component_statuses": {
- "query": "SELECT * FROM kubernetes_component_statuses",
- "interval": 3600
- },
- "kubernetes_config_maps": {
- "query": "SELECT * FROM kubernetes_config_maps",
- "interval": 600
- },
- "kubernetes_cron_jobs": {
- "query": "SELECT * FROM kubernetes_cron_jobs",
- "interval": 600
- },
- "kubernetes_csi_drivers": {
- "query": "SELECT * FROM kubernetes_csi_drivers",
- "interval": 43200
- },
- "kubernetes_csi_node_drivers": {
- "query": "SELECT * FROM kubernetes_csi_node_drivers",
- "interval": 43200
- },
- "kubernetes_daemon_set_containers": {
- "query": "SELECT * FROM kubernetes_daemon_set_containers",
- "interval": 600
- },
- "kubernetes_daemon_sets": {
- "query": "SELECT * FROM kubernetes_daemon_sets",
- "interval": 600
- },
- "kubernetes_daemon_set_volumes": {
- "query": "SELECT * FROM kubernetes_daemon_set_volumes",
- "interval": 600
- },
- "kubernetes_deployments": {
- "query": "SELECT * FROM kubernetes_deployments",
- "interval": 600
- },
- "kubernetes_deployments_containers": {
- "query": "SELECT * FROM kubernetes_deployments_containers",
- "interval": 600
- },
- "kubernetes_deployments_volumes": {
- "query": "SELECT * FROM kubernetes_deployments_volumes",
- "interval": 600
- },
- "kubernetes_endpoint_subsets": {
- "query": "SELECT * FROM kubernetes_endpoint_subsets",
- "interval": 1800
- },
- "kubernetes_horizontal_pod_autoscalers": {
- "query": "SELECT * FROM kubernetes_horizontal_pod_autoscalers",
- "interval": 7200
- },
- "kubernetes_info": {
- "query": "SELECT * FROM kubernetes_info",
- "interval": 43200
- },
- "kubernetes_ingress_classes": {
- "query": "SELECT * FROM kubernetes_ingress_classes",
- "interval": 21600
- },
- "kubernetes_ingresses": {
- "query": "SELECT * FROM kubernetes_ingresses",
- "interval": 21600
- },
- "kubernetes_jobs": {
- "query": "SELECT * FROM kubernetes_jobs",
- "interval": 600
- },
- "kubernetes_limit_ranges": {
- "query": "SELECT * FROM kubernetes_limit_ranges",
- "interval": 21600
- },
- "kubernetes_mutating_webhooks": {
- "query": "SELECT * FROM kubernetes_mutating_webhooks",
- "interval": 7200
- },
- "kubernetes_namespaces": {
- "query": "SELECT * FROM kubernetes_namespaces",
- "interval": 3600
- },
- "kubernetes_network_policies": {
- "query": "SELECT * FROM kubernetes_network_policies",
- "interval": 1800
- },
- "kubernetes_nodes": {
- "query": "SELECT * FROM kubernetes_nodes",
- "interval": 600
- },
- "kubernetes_persistent_volume_claims": {
- "query": "SELECT * FROM kubernetes_persistent_volume_claims",
- "interval": 1800
- },
- "kubernetes_persistent_volumes": {
- "query": "SELECT * FROM kubernetes_persistent_volumes",
- "interval": 1800
- },
- "kubernetes_pod_containers": {
- "query": "SELECT * FROM kubernetes_pod_containers",
- "interval": 600
- },
- "kubernetes_pod_disruption_budgets": {
- "query": "SELECT * FROM kubernetes_pod_disruption_budgets",
- "interval": 1800
- },
- "kubernetes_pods": {
- "query": "SELECT * FROM kubernetes_pods",
- "interval": 600
- },
- "kubernetes_pod_security_policies": {
- "query": "SELECT * FROM kubernetes_pod_security_policies",
- "interval": 600
- },
- "kubernetes_pod_template_containers": {
- "query": "SELECT * FROM kubernetes_pod_template_containers",
- "interval": 1800
- },
- "kubernetes_pod_templates": {
- "query": "SELECT * FROM kubernetes_pod_templates",
- "interval": 1800
- },
- "kubernetes_pod_templates_volumes": {
- "query": "SELECT * FROM kubernetes_pod_templates_volumes",
- "interval": 1800
- },
- "kubernetes_pod_volumes": {
- "query": "SELECT * FROM kubernetes_pod_volumes",
- "interval": 600
- },
- "kubernetes_replica_set_containers": {
- "query": "SELECT * FROM kubernetes_replica_set_containers",
- "interval": 600
- },
- "kubernetes_replica_sets": {
- "query": "SELECT * FROM kubernetes_replica_sets",
- "interval": 600
- },
- "kubernetes_replica_set_volumes": {
- "query": "SELECT * FROM kubernetes_replica_set_volumes",
- "interval": 600
- },
- "kubernetes_resource_quotas": {
- "query": "SELECT * FROM kubernetes_resource_quotas",
- "interval": 3600
- },
- "kubernetes_role_binding_subjects": {
- "query": "SELECT * FROM kubernetes_role_binding_subjects",
- "interval": 600
- },
- "kubernetes_role_policy_rules": {
- "query": "SELECT * FROM kubernetes_role_policy_rules",
- "interval": 600
- },
- "kubernetes_secrets": {
- "query": "SELECT * FROM kubernetes_secrets",
- "interval": 600
- },
- "kubernetes_service_accounts": {
- "query": "SELECT * FROM kubernetes_service_accounts",
- "interval": 600
- },
- "kubernetes_services": {
- "query": "SELECT * FROM kubernetes_services",
- "interval": 900
- },
- "kubernetes_stateful_set_containers": {
- "query": "SELECT * FROM kubernetes_stateful_set_containers",
- "interval": 600
- },
- "kubernetes_stateful_sets": {
- "query": "SELECT * FROM kubernetes_stateful_sets",
- "interval": 600
- },
- "kubernetes_stateful_set_volumes": {
- "query": "SELECT * FROM kubernetes_stateful_set_volumes",
- "interval": 600
- },
- "kubernetes_storage_classes": {
- "query": "SELECT * FROM kubernetes_storage_classes",
- "interval": 21600
- },
- "kubernetes_validating_webhooks": {
- "query": "SELECT * FROM kubernetes_validating_webhooks",
- "interval": 7200
- },
- "kubernetes_volume_attachments": {
- "query": "SELECT * FROM kubernetes_volume_attachments",
- "interval": 3600
- }
- },
- "options":{
- }
- }
diff --git a/infrastructure/kubequery/cmd/genschema/main.go b/infrastructure/kubequery/cmd/genschema/main.go
deleted file mode 100644
index 43436c9e22..0000000000
--- a/infrastructure/kubequery/cmd/genschema/main.go
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package main
-
-import (
- "fmt"
-
- "github.com/Uptycs/kubequery/internal/k8s/tables"
-)
-
-func main() {
- for _, t := range tables.GetTables() {
- fmt.Printf("CREATE TABLE %s (\n", t.Name)
- for i, c := range t.Columns {
- fmt.Printf(" `%s` %s", c.Name, c.Type)
- if i < len(t.Columns)-1 {
- fmt.Printf(",")
- }
- fmt.Println()
- }
- fmt.Print(");\n\n")
- }
-}
diff --git a/infrastructure/kubequery/cmd/gentables/main.go b/infrastructure/kubequery/cmd/gentables/main.go
deleted file mode 100644
index 8b49b2d161..0000000000
--- a/infrastructure/kubequery/cmd/gentables/main.go
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package main
-
-import (
- "fmt"
-
- "github.com/Uptycs/kubequery/internal/k8s/tables"
-)
-
-func main() {
- tbls := tables.GetTables()
- fmt.Printf("{\n \"tables\": [")
- for j, t := range tbls {
- fmt.Printf(" {\n \"name\": \"%s\",\n \"columns\": [\n", t.Name)
- for i, c := range t.Columns {
- fmt.Printf(" {\n \"name\": \"%s\",\n \"type\": \"%s\"\n", c.Name, c.Type)
- if i < len(t.Columns)-1 {
- fmt.Printf(" },\n")
- } else {
- fmt.Printf(" }\n")
- }
- }
- fmt.Printf(" ]\n")
- if j < len(tbls)-1 {
- fmt.Printf(" },\n")
- } else {
- fmt.Printf(" }\n")
- }
- }
- fmt.Printf(" ]\n}")
-}
diff --git a/infrastructure/kubequery/cmd/kubequery/main.go b/infrastructure/kubequery/cmd/kubequery/main.go
deleted file mode 100644
index 03b2762018..0000000000
--- a/infrastructure/kubequery/cmd/kubequery/main.go
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package main
-
-import (
- "context"
- "flag"
- "fmt"
- "os"
- "os/signal"
- "syscall"
- "time"
-
- osquery "github.com/Uptycs/basequery-go"
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- "github.com/Uptycs/kubequery/internal/k8s/event"
- "github.com/Uptycs/kubequery/internal/k8s/tables"
-)
-
-var (
- // VERSION set by compiler
- VERSION = "latest"
-
- //lint:ignore U1000 Argument is required by basequery
- verbose = flag.Bool("verbose", false, "Whether to enable verbose logging")
- version = flag.Bool("version", false, "Prints kubequery version")
- socket = flag.String("socket", "", "Path to the extensions UNIX domain socket")
- timeout = flag.Int("timeout", 5, "Seconds to wait for autoloaded extensions")
- interval = flag.Int("interval", 5, "Seconds delay between connectivity checks")
-)
-
-func main() {
- flag.Parse()
-
- if *version {
- fmt.Println("kubequery version:", VERSION)
- os.Exit(0)
- }
-
- if *socket == "" {
- panic("Missing required --socket argument")
- }
-
- err := k8s.Init()
- if err != nil {
- panic(fmt.Sprintf("Error connecting to kubernetes API server: %s", err))
- }
-
- server, err := osquery.NewExtensionManagerServer(
- "kubequery",
- *socket,
- osquery.ServerVersion(VERSION),
- osquery.ServerTimeout(time.Second*time.Duration(*timeout)),
- osquery.ServerPingInterval(time.Second*time.Duration(*interval)),
- )
- if err != nil {
- panic(fmt.Sprintf("Error launching kubequery: %s", err))
- }
-
- quit := make(chan os.Signal, 1)
- signal.Notify(quit, os.Interrupt)
-
- for _, t := range tables.GetTables() {
- server.RegisterPlugin(table.NewPlugin(t.Name, t.Columns, t.GenFunc))
- }
-
- go func() {
- if err := server.Run(); err != nil {
- panic(fmt.Sprintf("Failed to start extension manager server: %s", err))
- }
- syscall.Kill(syscall.Getpid(), syscall.SIGINT)
- }()
-
- // Wait for the extension manager to start before sending events
- time.Sleep(time.Second * 5)
-
- watcher, err := event.CreateEventWatcher(*socket, time.Second*time.Duration(*timeout))
- if err != nil {
- fmt.Println("Failed to create kubernetes event watcher: ", err)
- } else {
- watcher.Start()
- }
-
- <-quit
-
- if watcher != nil {
- watcher.Stop()
- }
- server.Shutdown(context.Background())
-}
diff --git a/infrastructure/kubequery/cmd/uuidgen/main.go b/infrastructure/kubequery/cmd/uuidgen/main.go
deleted file mode 100644
index 964227ef18..0000000000
--- a/infrastructure/kubequery/cmd/uuidgen/main.go
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package main
-
-import (
- "context"
- "fmt"
-
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-func main() {
- err := k8s.Init()
- if err != nil {
- panic(fmt.Sprintf("Error connecting to kubernetes API server: %s", err))
- }
-
- options := v1.GetOptions{}
- ks, err := k8s.GetClient().CoreV1().Namespaces().Get(context.Background(), "kube-system", options)
- if err != nil {
- panic(fmt.Sprintf("Error getting kube-system namespace: %s", err))
- }
-
- fmt.Print(ks.ObjectMeta.UID)
-}
diff --git a/infrastructure/kubequery/docs/deployment.svg b/infrastructure/kubequery/docs/deployment.svg
deleted file mode 100644
index 0fc39eb294..0000000000
--- a/infrastructure/kubequery/docs/deployment.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-100 100 100 Master Control Plane Node Osquery DaemonSet kubequery Deployment Node Osquery DaemonSet Node Osquery DaemonSet Viewer does not support full SVG 1.1
\ No newline at end of file
diff --git a/infrastructure/kubequery/docs/kubequery.png b/infrastructure/kubequery/docs/kubequery.png
deleted file mode 100644
index eed9b07c19..0000000000
Binary files a/infrastructure/kubequery/docs/kubequery.png and /dev/null differ
diff --git a/infrastructure/kubequery/docs/schema.md b/infrastructure/kubequery/docs/schema.md
deleted file mode 100644
index 3e7424c737..0000000000
--- a/infrastructure/kubequery/docs/schema.md
+++ /dev/null
@@ -1,2083 +0,0 @@
-```sql
-CREATE TABLE kubernetes_mutating_webhooks (
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `client_config` TEXT,
- `rules` TEXT,
- `failure_policy` TEXT,
- `match_policy` TEXT,
- `namespace_selector` TEXT,
- `object_selector` TEXT,
- `side_effects` TEXT,
- `timeout_seconds` INTEGER,
- `admission_review_versions` TEXT,
- `reinvocation_policy` TEXT
-);
-
-CREATE TABLE kubernetes_validating_webhooks (
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `client_config` TEXT,
- `rules` TEXT,
- `failure_policy` TEXT,
- `match_policy` TEXT,
- `namespace_selector` TEXT,
- `object_selector` TEXT,
- `side_effects` TEXT,
- `timeout_seconds` INTEGER,
- `admission_review_versions` TEXT
-);
-
-CREATE TABLE kubernetes_daemon_sets (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `namespace` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `se_linux_options_user` TEXT,
- `se_linux_options_role` TEXT,
- `se_linux_options_type` TEXT,
- `se_linux_options_level` TEXT,
- `windows_options_gmsa_credential_spec_name` TEXT,
- `windows_options_gmsa_credential_spec` TEXT,
- `windows_options_run_as_user_name` TEXT,
- `seccomp_profile_type` TEXT,
- `seccomp_profile_localhost_profile` TEXT,
- `run_as_user` BIGINT,
- `run_as_group` BIGINT,
- `run_as_non_root` INTEGER,
- `supplemental_groups` TEXT,
- `fs_group` BIGINT,
- `sysctls` TEXT,
- `fs_group_change_policy` TEXT,
- `node_affinity` TEXT,
- `pod_affinity` TEXT,
- `pod_anti_affinity` TEXT,
- `dns_config_nameservers` TEXT,
- `dns_config_searches` TEXT,
- `dns_config_options` TEXT,
- `node_selector` TEXT,
- `restart_policy` TEXT,
- `termination_grace_period_seconds` BIGINT,
- `active_deadline_seconds` BIGINT,
- `dns_policy` TEXT,
- `service_account_name` TEXT,
- `automount_service_account_token` INTEGER,
- `node_name` TEXT,
- `host_network` INTEGER,
- `host_pid` INTEGER,
- `host_ipc` INTEGER,
- `share_process_namespace` INTEGER,
- `image_pull_secrets` TEXT,
- `hostname` TEXT,
- `subdomain` TEXT,
- `scheduler_name` TEXT,
- `tolerations` TEXT,
- `host_aliases` TEXT,
- `priority_class_name` TEXT,
- `priority` INTEGER,
- `readiness_gates` TEXT,
- `runtime_class_name` TEXT,
- `enable_service_links` INTEGER,
- `preemption_policy` TEXT,
- `overhead` TEXT,
- `topology_spread_constraints` TEXT,
- `set_hostname_as_fqdn` INTEGER,
- `current_number_scheduled` INTEGER,
- `number_misscheduled` INTEGER,
- `desired_number_scheduled` INTEGER,
- `number_ready` INTEGER,
- `observed_generation` BIGINT,
- `updated_number_scheduled` INTEGER,
- `number_available` INTEGER,
- `number_unavailable` INTEGER,
- `collision_count` INTEGER,
- `conditions` TEXT,
- `selector` TEXT,
- `update_strategy` TEXT,
- `min_ready_seconds` INTEGER,
- `revision_history_limit` INTEGER
-);
-
-CREATE TABLE kubernetes_daemon_set_containers (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `namespace` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `se_linux_options_user` TEXT,
- `se_linux_options_role` TEXT,
- `se_linux_options_type` TEXT,
- `se_linux_options_level` TEXT,
- `windows_options_gmsa_credential_spec_name` TEXT,
- `windows_options_gmsa_credential_spec` TEXT,
- `windows_options_run_as_user_name` TEXT,
- `seccomp_profile_type` TEXT,
- `seccomp_profile_localhost_profile` TEXT,
- `run_as_user` BIGINT,
- `run_as_group` BIGINT,
- `run_as_non_root` INTEGER,
- `capabilities_add` TEXT,
- `capabilities_drop` TEXT,
- `privileged` INTEGER,
- `read_only_root_filesystem` INTEGER,
- `allow_privilege_escalation` INTEGER,
- `proc_mount` TEXT,
- `target_container_name` TEXT,
- `image` TEXT,
- `command` TEXT,
- `args` TEXT,
- `working_dir` TEXT,
- `ports` TEXT,
- `env_from` TEXT,
- `env` TEXT,
- `resource_limits` TEXT,
- `resource_requests` TEXT,
- `volume_mounts` TEXT,
- `volume_devices` TEXT,
- `liveness_probe` TEXT,
- `readiness_probe` TEXT,
- `startup_probe` TEXT,
- `lifecycle` TEXT,
- `termination_message_path` TEXT,
- `termination_message_policy` TEXT,
- `image_pull_policy` TEXT,
- `stdin` INTEGER,
- `stdin_once` INTEGER,
- `tty` INTEGER,
- `daemon_set_name` TEXT,
- `container_type` TEXT
-);
-
-CREATE TABLE kubernetes_daemon_set_volumes (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `namespace` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `volume_type` TEXT,
- `fs_type` TEXT,
- `read_only` INTEGER,
- `secret_name` TEXT,
- `host_path_path` TEXT,
- `host_path_type` TEXT,
- `empty_dir_medium` TEXT,
- `empty_dir_size_limit` TEXT,
- `gce_persistent_disk_pd_name` TEXT,
- `gce_persistent_disk_partition` INTEGER,
- `aws_elastic_block_store_volume_id` TEXT,
- `aws_elastic_block_store_partition` INTEGER,
- `git_repo_repository` TEXT,
- `git_repo_revision` TEXT,
- `git_repo_directory` TEXT,
- `secret_items` TEXT,
- `secret_default_mode` INTEGER,
- `secret_optional` INTEGER,
- `nfs_server` TEXT,
- `nfs_path` TEXT,
- `iscsi_target_portal` TEXT,
- `iscsi_iqn` TEXT,
- `iscsi_lun` INTEGER,
- `iscsi_interface` TEXT,
- `iscsi_portals` TEXT,
- `iscsi_discovery_chap_auth` INTEGER,
- `iscsi_session_chap_auth` INTEGER,
- `iscsi_initiator_name` TEXT,
- `glusterfs_endpoints_name` TEXT,
- `glusterfs_path` TEXT,
- `persistent_volume_claim_name` TEXT,
- `rbd_ceph_monitors` TEXT,
- `rbd_image` TEXT,
- `rbd_pool` TEXT,
- `rbd_rados_user` TEXT,
- `rbd_keyring` TEXT,
- `flex_volume_driver` TEXT,
- `flex_volume_options` TEXT,
- `cinder_volume_id` TEXT,
- `ceph_fs_monitors` TEXT,
- `ceph_fs_path` TEXT,
- `ceph_fs_user` TEXT,
- `ceph_fs_secret_file` TEXT,
- `flocker_dataset_name` TEXT,
- `flocker_dataset_uuid` TEXT,
- `downward_api_items` TEXT,
- `downward_api_default_mode` INTEGER,
- `fc_target_ww_ns` TEXT,
- `fc_lun` INTEGER,
- `fc_ww_ids` TEXT,
- `azure_file_share_name` TEXT,
- `config_map_name` TEXT,
- `config_map_items` TEXT,
- `config_map_default_mode` INTEGER,
- `config_map_optional` INTEGER,
- `vsphere_volume_volume_path` TEXT,
- `vsphere_volume_storage_policy_name` TEXT,
- `vsphere_volume_storage_policy_id` TEXT,
- `quobyte_registry` TEXT,
- `quobyte_volume` TEXT,
- `quobyte_user` TEXT,
- `quobyte_group` TEXT,
- `quobyte_tenant` TEXT,
- `azure_disk_disk_name` TEXT,
- `azure_disk_data_disk_uri` TEXT,
- `azure_disk_caching_mode` TEXT,
- `azure_disk_kind` TEXT,
- `photon_persistent_disk_pd_id` TEXT,
- `projected_sources` TEXT,
- `projected_default_mode` INTEGER,
- `portworx_volume_id` TEXT,
- `scale_io_gateway` TEXT,
- `scale_io_system` TEXT,
- `scale_iossl_enabled` INTEGER,
- `scale_io_protection_domain` TEXT,
- `scale_io_storage_pool` TEXT,
- `scale_io_storage_mode` TEXT,
- `scale_io_volume_name` TEXT,
- `storage_os_volume_name` TEXT,
- `storage_os_volume_namespace` TEXT,
- `csi_driver` TEXT,
- `csi_volume_attributes` TEXT,
- `ephemeral_volume_claim_template` TEXT,
- `daemon_set_name` TEXT
-);
-
-CREATE TABLE kubernetes_deployments (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `namespace` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `se_linux_options_user` TEXT,
- `se_linux_options_role` TEXT,
- `se_linux_options_type` TEXT,
- `se_linux_options_level` TEXT,
- `windows_options_gmsa_credential_spec_name` TEXT,
- `windows_options_gmsa_credential_spec` TEXT,
- `windows_options_run_as_user_name` TEXT,
- `seccomp_profile_type` TEXT,
- `seccomp_profile_localhost_profile` TEXT,
- `run_as_user` BIGINT,
- `run_as_group` BIGINT,
- `run_as_non_root` INTEGER,
- `supplemental_groups` TEXT,
- `fs_group` BIGINT,
- `sysctls` TEXT,
- `fs_group_change_policy` TEXT,
- `node_affinity` TEXT,
- `pod_affinity` TEXT,
- `pod_anti_affinity` TEXT,
- `dns_config_nameservers` TEXT,
- `dns_config_searches` TEXT,
- `dns_config_options` TEXT,
- `node_selector` TEXT,
- `restart_policy` TEXT,
- `termination_grace_period_seconds` BIGINT,
- `active_deadline_seconds` BIGINT,
- `dns_policy` TEXT,
- `service_account_name` TEXT,
- `automount_service_account_token` INTEGER,
- `node_name` TEXT,
- `host_network` INTEGER,
- `host_pid` INTEGER,
- `host_ipc` INTEGER,
- `share_process_namespace` INTEGER,
- `image_pull_secrets` TEXT,
- `hostname` TEXT,
- `subdomain` TEXT,
- `scheduler_name` TEXT,
- `tolerations` TEXT,
- `host_aliases` TEXT,
- `priority_class_name` TEXT,
- `priority` INTEGER,
- `readiness_gates` TEXT,
- `runtime_class_name` TEXT,
- `enable_service_links` INTEGER,
- `preemption_policy` TEXT,
- `overhead` TEXT,
- `topology_spread_constraints` TEXT,
- `set_hostname_as_fqdn` INTEGER,
- `observed_generation` BIGINT,
- `replicas` INTEGER,
- `updated_replicas` INTEGER,
- `ready_replicas` INTEGER,
- `available_replicas` INTEGER,
- `unavailable_replicas` INTEGER,
- `conditions` TEXT,
- `collision_count` INTEGER,
- `deployment_replicas` INTEGER,
- `selector` TEXT,
- `strategy` TEXT,
- `min_ready_seconds` INTEGER,
- `revision_history_limit` INTEGER,
- `paused` INTEGER,
- `progress_deadline_seconds` INTEGER
-);
-
-CREATE TABLE kubernetes_deployments_containers (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `namespace` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `se_linux_options_user` TEXT,
- `se_linux_options_role` TEXT,
- `se_linux_options_type` TEXT,
- `se_linux_options_level` TEXT,
- `windows_options_gmsa_credential_spec_name` TEXT,
- `windows_options_gmsa_credential_spec` TEXT,
- `windows_options_run_as_user_name` TEXT,
- `seccomp_profile_type` TEXT,
- `seccomp_profile_localhost_profile` TEXT,
- `run_as_user` BIGINT,
- `run_as_group` BIGINT,
- `run_as_non_root` INTEGER,
- `capabilities_add` TEXT,
- `capabilities_drop` TEXT,
- `privileged` INTEGER,
- `read_only_root_filesystem` INTEGER,
- `allow_privilege_escalation` INTEGER,
- `proc_mount` TEXT,
- `target_container_name` TEXT,
- `image` TEXT,
- `command` TEXT,
- `args` TEXT,
- `working_dir` TEXT,
- `ports` TEXT,
- `env_from` TEXT,
- `env` TEXT,
- `resource_limits` TEXT,
- `resource_requests` TEXT,
- `volume_mounts` TEXT,
- `volume_devices` TEXT,
- `liveness_probe` TEXT,
- `readiness_probe` TEXT,
- `startup_probe` TEXT,
- `lifecycle` TEXT,
- `termination_message_path` TEXT,
- `termination_message_policy` TEXT,
- `image_pull_policy` TEXT,
- `stdin` INTEGER,
- `stdin_once` INTEGER,
- `tty` INTEGER,
- `deployment_name` TEXT,
- `container_type` TEXT
-);
-
-CREATE TABLE kubernetes_deployments_volumes (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `namespace` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `volume_type` TEXT,
- `fs_type` TEXT,
- `read_only` INTEGER,
- `secret_name` TEXT,
- `host_path_path` TEXT,
- `host_path_type` TEXT,
- `empty_dir_medium` TEXT,
- `empty_dir_size_limit` TEXT,
- `gce_persistent_disk_pd_name` TEXT,
- `gce_persistent_disk_partition` INTEGER,
- `aws_elastic_block_store_volume_id` TEXT,
- `aws_elastic_block_store_partition` INTEGER,
- `git_repo_repository` TEXT,
- `git_repo_revision` TEXT,
- `git_repo_directory` TEXT,
- `secret_items` TEXT,
- `secret_default_mode` INTEGER,
- `secret_optional` INTEGER,
- `nfs_server` TEXT,
- `nfs_path` TEXT,
- `iscsi_target_portal` TEXT,
- `iscsi_iqn` TEXT,
- `iscsi_lun` INTEGER,
- `iscsi_interface` TEXT,
- `iscsi_portals` TEXT,
- `iscsi_discovery_chap_auth` INTEGER,
- `iscsi_session_chap_auth` INTEGER,
- `iscsi_initiator_name` TEXT,
- `glusterfs_endpoints_name` TEXT,
- `glusterfs_path` TEXT,
- `persistent_volume_claim_name` TEXT,
- `rbd_ceph_monitors` TEXT,
- `rbd_image` TEXT,
- `rbd_pool` TEXT,
- `rbd_rados_user` TEXT,
- `rbd_keyring` TEXT,
- `flex_volume_driver` TEXT,
- `flex_volume_options` TEXT,
- `cinder_volume_id` TEXT,
- `ceph_fs_monitors` TEXT,
- `ceph_fs_path` TEXT,
- `ceph_fs_user` TEXT,
- `ceph_fs_secret_file` TEXT,
- `flocker_dataset_name` TEXT,
- `flocker_dataset_uuid` TEXT,
- `downward_api_items` TEXT,
- `downward_api_default_mode` INTEGER,
- `fc_target_ww_ns` TEXT,
- `fc_lun` INTEGER,
- `fc_ww_ids` TEXT,
- `azure_file_share_name` TEXT,
- `config_map_name` TEXT,
- `config_map_items` TEXT,
- `config_map_default_mode` INTEGER,
- `config_map_optional` INTEGER,
- `vsphere_volume_volume_path` TEXT,
- `vsphere_volume_storage_policy_name` TEXT,
- `vsphere_volume_storage_policy_id` TEXT,
- `quobyte_registry` TEXT,
- `quobyte_volume` TEXT,
- `quobyte_user` TEXT,
- `quobyte_group` TEXT,
- `quobyte_tenant` TEXT,
- `azure_disk_disk_name` TEXT,
- `azure_disk_data_disk_uri` TEXT,
- `azure_disk_caching_mode` TEXT,
- `azure_disk_kind` TEXT,
- `photon_persistent_disk_pd_id` TEXT,
- `projected_sources` TEXT,
- `projected_default_mode` INTEGER,
- `portworx_volume_id` TEXT,
- `scale_io_gateway` TEXT,
- `scale_io_system` TEXT,
- `scale_iossl_enabled` INTEGER,
- `scale_io_protection_domain` TEXT,
- `scale_io_storage_pool` TEXT,
- `scale_io_storage_mode` TEXT,
- `scale_io_volume_name` TEXT,
- `storage_os_volume_name` TEXT,
- `storage_os_volume_namespace` TEXT,
- `csi_driver` TEXT,
- `csi_volume_attributes` TEXT,
- `ephemeral_volume_claim_template` TEXT,
- `deployment_name` TEXT
-);
-
-CREATE TABLE kubernetes_replica_sets (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `namespace` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `se_linux_options_user` TEXT,
- `se_linux_options_role` TEXT,
- `se_linux_options_type` TEXT,
- `se_linux_options_level` TEXT,
- `windows_options_gmsa_credential_spec_name` TEXT,
- `windows_options_gmsa_credential_spec` TEXT,
- `windows_options_run_as_user_name` TEXT,
- `seccomp_profile_type` TEXT,
- `seccomp_profile_localhost_profile` TEXT,
- `run_as_user` BIGINT,
- `run_as_group` BIGINT,
- `run_as_non_root` INTEGER,
- `supplemental_groups` TEXT,
- `fs_group` BIGINT,
- `sysctls` TEXT,
- `fs_group_change_policy` TEXT,
- `node_affinity` TEXT,
- `pod_affinity` TEXT,
- `pod_anti_affinity` TEXT,
- `dns_config_nameservers` TEXT,
- `dns_config_searches` TEXT,
- `dns_config_options` TEXT,
- `node_selector` TEXT,
- `restart_policy` TEXT,
- `termination_grace_period_seconds` BIGINT,
- `active_deadline_seconds` BIGINT,
- `dns_policy` TEXT,
- `service_account_name` TEXT,
- `automount_service_account_token` INTEGER,
- `node_name` TEXT,
- `host_network` INTEGER,
- `host_pid` INTEGER,
- `host_ipc` INTEGER,
- `share_process_namespace` INTEGER,
- `image_pull_secrets` TEXT,
- `hostname` TEXT,
- `subdomain` TEXT,
- `scheduler_name` TEXT,
- `tolerations` TEXT,
- `host_aliases` TEXT,
- `priority_class_name` TEXT,
- `priority` INTEGER,
- `readiness_gates` TEXT,
- `runtime_class_name` TEXT,
- `enable_service_links` INTEGER,
- `preemption_policy` TEXT,
- `overhead` TEXT,
- `topology_spread_constraints` TEXT,
- `set_hostname_as_fqdn` INTEGER,
- `replicas` INTEGER,
- `fully_labeled_replicas` INTEGER,
- `ready_replicas` INTEGER,
- `available_replicas` INTEGER,
- `observed_generation` BIGINT,
- `conditions` TEXT,
- `replica_set_replicas` INTEGER,
- `min_ready_seconds` INTEGER,
- `selector` TEXT
-);
-
-CREATE TABLE kubernetes_replica_set_containers (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `namespace` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `se_linux_options_user` TEXT,
- `se_linux_options_role` TEXT,
- `se_linux_options_type` TEXT,
- `se_linux_options_level` TEXT,
- `windows_options_gmsa_credential_spec_name` TEXT,
- `windows_options_gmsa_credential_spec` TEXT,
- `windows_options_run_as_user_name` TEXT,
- `seccomp_profile_type` TEXT,
- `seccomp_profile_localhost_profile` TEXT,
- `run_as_user` BIGINT,
- `run_as_group` BIGINT,
- `run_as_non_root` INTEGER,
- `capabilities_add` TEXT,
- `capabilities_drop` TEXT,
- `privileged` INTEGER,
- `read_only_root_filesystem` INTEGER,
- `allow_privilege_escalation` INTEGER,
- `proc_mount` TEXT,
- `target_container_name` TEXT,
- `image` TEXT,
- `command` TEXT,
- `args` TEXT,
- `working_dir` TEXT,
- `ports` TEXT,
- `env_from` TEXT,
- `env` TEXT,
- `resource_limits` TEXT,
- `resource_requests` TEXT,
- `volume_mounts` TEXT,
- `volume_devices` TEXT,
- `liveness_probe` TEXT,
- `readiness_probe` TEXT,
- `startup_probe` TEXT,
- `lifecycle` TEXT,
- `termination_message_path` TEXT,
- `termination_message_policy` TEXT,
- `image_pull_policy` TEXT,
- `stdin` INTEGER,
- `stdin_once` INTEGER,
- `tty` INTEGER,
- `replica_set_name` TEXT,
- `container_type` TEXT
-);
-
-CREATE TABLE kubernetes_replica_set_volumes (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `namespace` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `volume_type` TEXT,
- `fs_type` TEXT,
- `read_only` INTEGER,
- `secret_name` TEXT,
- `host_path_path` TEXT,
- `host_path_type` TEXT,
- `empty_dir_medium` TEXT,
- `empty_dir_size_limit` TEXT,
- `gce_persistent_disk_pd_name` TEXT,
- `gce_persistent_disk_partition` INTEGER,
- `aws_elastic_block_store_volume_id` TEXT,
- `aws_elastic_block_store_partition` INTEGER,
- `git_repo_repository` TEXT,
- `git_repo_revision` TEXT,
- `git_repo_directory` TEXT,
- `secret_items` TEXT,
- `secret_default_mode` INTEGER,
- `secret_optional` INTEGER,
- `nfs_server` TEXT,
- `nfs_path` TEXT,
- `iscsi_target_portal` TEXT,
- `iscsi_iqn` TEXT,
- `iscsi_lun` INTEGER,
- `iscsi_interface` TEXT,
- `iscsi_portals` TEXT,
- `iscsi_discovery_chap_auth` INTEGER,
- `iscsi_session_chap_auth` INTEGER,
- `iscsi_initiator_name` TEXT,
- `glusterfs_endpoints_name` TEXT,
- `glusterfs_path` TEXT,
- `persistent_volume_claim_name` TEXT,
- `rbd_ceph_monitors` TEXT,
- `rbd_image` TEXT,
- `rbd_pool` TEXT,
- `rbd_rados_user` TEXT,
- `rbd_keyring` TEXT,
- `flex_volume_driver` TEXT,
- `flex_volume_options` TEXT,
- `cinder_volume_id` TEXT,
- `ceph_fs_monitors` TEXT,
- `ceph_fs_path` TEXT,
- `ceph_fs_user` TEXT,
- `ceph_fs_secret_file` TEXT,
- `flocker_dataset_name` TEXT,
- `flocker_dataset_uuid` TEXT,
- `downward_api_items` TEXT,
- `downward_api_default_mode` INTEGER,
- `fc_target_ww_ns` TEXT,
- `fc_lun` INTEGER,
- `fc_ww_ids` TEXT,
- `azure_file_share_name` TEXT,
- `config_map_name` TEXT,
- `config_map_items` TEXT,
- `config_map_default_mode` INTEGER,
- `config_map_optional` INTEGER,
- `vsphere_volume_volume_path` TEXT,
- `vsphere_volume_storage_policy_name` TEXT,
- `vsphere_volume_storage_policy_id` TEXT,
- `quobyte_registry` TEXT,
- `quobyte_volume` TEXT,
- `quobyte_user` TEXT,
- `quobyte_group` TEXT,
- `quobyte_tenant` TEXT,
- `azure_disk_disk_name` TEXT,
- `azure_disk_data_disk_uri` TEXT,
- `azure_disk_caching_mode` TEXT,
- `azure_disk_kind` TEXT,
- `photon_persistent_disk_pd_id` TEXT,
- `projected_sources` TEXT,
- `projected_default_mode` INTEGER,
- `portworx_volume_id` TEXT,
- `scale_io_gateway` TEXT,
- `scale_io_system` TEXT,
- `scale_iossl_enabled` INTEGER,
- `scale_io_protection_domain` TEXT,
- `scale_io_storage_pool` TEXT,
- `scale_io_storage_mode` TEXT,
- `scale_io_volume_name` TEXT,
- `storage_os_volume_name` TEXT,
- `storage_os_volume_namespace` TEXT,
- `csi_driver` TEXT,
- `csi_volume_attributes` TEXT,
- `ephemeral_volume_claim_template` TEXT,
- `replica_set_name` TEXT
-);
-
-CREATE TABLE kubernetes_stateful_sets (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `namespace` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `se_linux_options_user` TEXT,
- `se_linux_options_role` TEXT,
- `se_linux_options_type` TEXT,
- `se_linux_options_level` TEXT,
- `windows_options_gmsa_credential_spec_name` TEXT,
- `windows_options_gmsa_credential_spec` TEXT,
- `windows_options_run_as_user_name` TEXT,
- `seccomp_profile_type` TEXT,
- `seccomp_profile_localhost_profile` TEXT,
- `run_as_user` BIGINT,
- `run_as_group` BIGINT,
- `run_as_non_root` INTEGER,
- `supplemental_groups` TEXT,
- `fs_group` BIGINT,
- `sysctls` TEXT,
- `fs_group_change_policy` TEXT,
- `node_affinity` TEXT,
- `pod_affinity` TEXT,
- `pod_anti_affinity` TEXT,
- `dns_config_nameservers` TEXT,
- `dns_config_searches` TEXT,
- `dns_config_options` TEXT,
- `node_selector` TEXT,
- `restart_policy` TEXT,
- `termination_grace_period_seconds` BIGINT,
- `active_deadline_seconds` BIGINT,
- `dns_policy` TEXT,
- `service_account_name` TEXT,
- `automount_service_account_token` INTEGER,
- `node_name` TEXT,
- `host_network` INTEGER,
- `host_pid` INTEGER,
- `host_ipc` INTEGER,
- `share_process_namespace` INTEGER,
- `image_pull_secrets` TEXT,
- `hostname` TEXT,
- `subdomain` TEXT,
- `scheduler_name` TEXT,
- `tolerations` TEXT,
- `host_aliases` TEXT,
- `priority_class_name` TEXT,
- `priority` INTEGER,
- `readiness_gates` TEXT,
- `runtime_class_name` TEXT,
- `enable_service_links` INTEGER,
- `preemption_policy` TEXT,
- `overhead` TEXT,
- `topology_spread_constraints` TEXT,
- `set_hostname_as_fqdn` INTEGER,
- `observed_generation` BIGINT,
- `replicas` INTEGER,
- `ready_replicas` INTEGER,
- `current_replicas` INTEGER,
- `updated_replicas` INTEGER,
- `current_revision` TEXT,
- `update_revision` TEXT,
- `collision_count` INTEGER,
- `conditions` TEXT,
- `available_replicas` INTEGER,
- `stateful_set_replicas` INTEGER,
- `selector` TEXT,
- `volume_claim_templates` TEXT,
- `service_name` TEXT,
- `pod_management_policy` TEXT,
- `update_strategy` TEXT,
- `revision_history_limit` INTEGER
-);
-
-CREATE TABLE kubernetes_stateful_set_containers (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `namespace` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `se_linux_options_user` TEXT,
- `se_linux_options_role` TEXT,
- `se_linux_options_type` TEXT,
- `se_linux_options_level` TEXT,
- `windows_options_gmsa_credential_spec_name` TEXT,
- `windows_options_gmsa_credential_spec` TEXT,
- `windows_options_run_as_user_name` TEXT,
- `seccomp_profile_type` TEXT,
- `seccomp_profile_localhost_profile` TEXT,
- `run_as_user` BIGINT,
- `run_as_group` BIGINT,
- `run_as_non_root` INTEGER,
- `capabilities_add` TEXT,
- `capabilities_drop` TEXT,
- `privileged` INTEGER,
- `read_only_root_filesystem` INTEGER,
- `allow_privilege_escalation` INTEGER,
- `proc_mount` TEXT,
- `target_container_name` TEXT,
- `image` TEXT,
- `command` TEXT,
- `args` TEXT,
- `working_dir` TEXT,
- `ports` TEXT,
- `env_from` TEXT,
- `env` TEXT,
- `resource_limits` TEXT,
- `resource_requests` TEXT,
- `volume_mounts` TEXT,
- `volume_devices` TEXT,
- `liveness_probe` TEXT,
- `readiness_probe` TEXT,
- `startup_probe` TEXT,
- `lifecycle` TEXT,
- `termination_message_path` TEXT,
- `termination_message_policy` TEXT,
- `image_pull_policy` TEXT,
- `stdin` INTEGER,
- `stdin_once` INTEGER,
- `tty` INTEGER,
- `stateful_set_name` TEXT,
- `container_type` TEXT
-);
-
-CREATE TABLE kubernetes_stateful_set_volumes (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `namespace` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `volume_type` TEXT,
- `fs_type` TEXT,
- `read_only` INTEGER,
- `secret_name` TEXT,
- `host_path_path` TEXT,
- `host_path_type` TEXT,
- `empty_dir_medium` TEXT,
- `empty_dir_size_limit` TEXT,
- `gce_persistent_disk_pd_name` TEXT,
- `gce_persistent_disk_partition` INTEGER,
- `aws_elastic_block_store_volume_id` TEXT,
- `aws_elastic_block_store_partition` INTEGER,
- `git_repo_repository` TEXT,
- `git_repo_revision` TEXT,
- `git_repo_directory` TEXT,
- `secret_items` TEXT,
- `secret_default_mode` INTEGER,
- `secret_optional` INTEGER,
- `nfs_server` TEXT,
- `nfs_path` TEXT,
- `iscsi_target_portal` TEXT,
- `iscsi_iqn` TEXT,
- `iscsi_lun` INTEGER,
- `iscsi_interface` TEXT,
- `iscsi_portals` TEXT,
- `iscsi_discovery_chap_auth` INTEGER,
- `iscsi_session_chap_auth` INTEGER,
- `iscsi_initiator_name` TEXT,
- `glusterfs_endpoints_name` TEXT,
- `glusterfs_path` TEXT,
- `persistent_volume_claim_name` TEXT,
- `rbd_ceph_monitors` TEXT,
- `rbd_image` TEXT,
- `rbd_pool` TEXT,
- `rbd_rados_user` TEXT,
- `rbd_keyring` TEXT,
- `flex_volume_driver` TEXT,
- `flex_volume_options` TEXT,
- `cinder_volume_id` TEXT,
- `ceph_fs_monitors` TEXT,
- `ceph_fs_path` TEXT,
- `ceph_fs_user` TEXT,
- `ceph_fs_secret_file` TEXT,
- `flocker_dataset_name` TEXT,
- `flocker_dataset_uuid` TEXT,
- `downward_api_items` TEXT,
- `downward_api_default_mode` INTEGER,
- `fc_target_ww_ns` TEXT,
- `fc_lun` INTEGER,
- `fc_ww_ids` TEXT,
- `azure_file_share_name` TEXT,
- `config_map_name` TEXT,
- `config_map_items` TEXT,
- `config_map_default_mode` INTEGER,
- `config_map_optional` INTEGER,
- `vsphere_volume_volume_path` TEXT,
- `vsphere_volume_storage_policy_name` TEXT,
- `vsphere_volume_storage_policy_id` TEXT,
- `quobyte_registry` TEXT,
- `quobyte_volume` TEXT,
- `quobyte_user` TEXT,
- `quobyte_group` TEXT,
- `quobyte_tenant` TEXT,
- `azure_disk_disk_name` TEXT,
- `azure_disk_data_disk_uri` TEXT,
- `azure_disk_caching_mode` TEXT,
- `azure_disk_kind` TEXT,
- `photon_persistent_disk_pd_id` TEXT,
- `projected_sources` TEXT,
- `projected_default_mode` INTEGER,
- `portworx_volume_id` TEXT,
- `scale_io_gateway` TEXT,
- `scale_io_system` TEXT,
- `scale_iossl_enabled` INTEGER,
- `scale_io_protection_domain` TEXT,
- `scale_io_storage_pool` TEXT,
- `scale_io_storage_mode` TEXT,
- `scale_io_volume_name` TEXT,
- `storage_os_volume_name` TEXT,
- `storage_os_volume_namespace` TEXT,
- `csi_driver` TEXT,
- `csi_volume_attributes` TEXT,
- `ephemeral_volume_claim_template` TEXT,
- `stateful_set_name` TEXT
-);
-
-CREATE TABLE kubernetes_horizontal_pod_autoscalers (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `namespace` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `scale_target_ref` TEXT,
- `min_replicas` INTEGER,
- `max_replicas` INTEGER,
- `target_cpu_utilization_percentage` INTEGER,
- `observed_generation` BIGINT,
- `last_scale_time` BIGINT,
- `current_replicas` INTEGER,
- `desired_replicas` INTEGER,
- `current_cpu_utilization_percentage` INTEGER
-);
-
-CREATE TABLE kubernetes_cron_jobs (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `namespace` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `se_linux_options_user` TEXT,
- `se_linux_options_role` TEXT,
- `se_linux_options_type` TEXT,
- `se_linux_options_level` TEXT,
- `windows_options_gmsa_credential_spec_name` TEXT,
- `windows_options_gmsa_credential_spec` TEXT,
- `windows_options_run_as_user_name` TEXT,
- `seccomp_profile_type` TEXT,
- `seccomp_profile_localhost_profile` TEXT,
- `run_as_user` BIGINT,
- `run_as_group` BIGINT,
- `run_as_non_root` INTEGER,
- `supplemental_groups` TEXT,
- `fs_group` BIGINT,
- `sysctls` TEXT,
- `fs_group_change_policy` TEXT,
- `node_affinity` TEXT,
- `pod_affinity` TEXT,
- `pod_anti_affinity` TEXT,
- `dns_config_nameservers` TEXT,
- `dns_config_searches` TEXT,
- `dns_config_options` TEXT,
- `node_selector` TEXT,
- `restart_policy` TEXT,
- `termination_grace_period_seconds` BIGINT,
- `active_deadline_seconds` BIGINT,
- `dns_policy` TEXT,
- `service_account_name` TEXT,
- `automount_service_account_token` INTEGER,
- `node_name` TEXT,
- `host_network` INTEGER,
- `host_pid` INTEGER,
- `host_ipc` INTEGER,
- `share_process_namespace` INTEGER,
- `image_pull_secrets` TEXT,
- `hostname` TEXT,
- `subdomain` TEXT,
- `scheduler_name` TEXT,
- `tolerations` TEXT,
- `host_aliases` TEXT,
- `priority_class_name` TEXT,
- `priority` INTEGER,
- `readiness_gates` TEXT,
- `runtime_class_name` TEXT,
- `enable_service_links` INTEGER,
- `preemption_policy` TEXT,
- `overhead` TEXT,
- `topology_spread_constraints` TEXT,
- `set_hostname_as_fqdn` INTEGER,
- `active` TEXT,
- `last_schedule_time` BIGINT,
- `last_successful_time` BIGINT,
- `schedule` TEXT,
- `starting_deadline_seconds` BIGINT,
- `concurrency_policy` TEXT,
- `suspend` INTEGER,
- `successful_jobs_history_limit` INTEGER,
- `failed_jobs_history_limit` INTEGER,
- `parallelism` INTEGER,
- `completions` INTEGER,
- `job_active_deadline_seconds` BIGINT,
- `backoff_limit` INTEGER,
- `selector` TEXT,
- `manual_selector` INTEGER,
- `ttl_seconds_after_finished` INTEGER
-);
-
-CREATE TABLE kubernetes_jobs (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `namespace` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `se_linux_options_user` TEXT,
- `se_linux_options_role` TEXT,
- `se_linux_options_type` TEXT,
- `se_linux_options_level` TEXT,
- `windows_options_gmsa_credential_spec_name` TEXT,
- `windows_options_gmsa_credential_spec` TEXT,
- `windows_options_run_as_user_name` TEXT,
- `seccomp_profile_type` TEXT,
- `seccomp_profile_localhost_profile` TEXT,
- `run_as_user` BIGINT,
- `run_as_group` BIGINT,
- `run_as_non_root` INTEGER,
- `supplemental_groups` TEXT,
- `fs_group` BIGINT,
- `sysctls` TEXT,
- `fs_group_change_policy` TEXT,
- `node_affinity` TEXT,
- `pod_affinity` TEXT,
- `pod_anti_affinity` TEXT,
- `dns_config_nameservers` TEXT,
- `dns_config_searches` TEXT,
- `dns_config_options` TEXT,
- `node_selector` TEXT,
- `restart_policy` TEXT,
- `termination_grace_period_seconds` BIGINT,
- `active_deadline_seconds` BIGINT,
- `dns_policy` TEXT,
- `service_account_name` TEXT,
- `automount_service_account_token` INTEGER,
- `node_name` TEXT,
- `host_network` INTEGER,
- `host_pid` INTEGER,
- `host_ipc` INTEGER,
- `share_process_namespace` INTEGER,
- `image_pull_secrets` TEXT,
- `hostname` TEXT,
- `subdomain` TEXT,
- `scheduler_name` TEXT,
- `tolerations` TEXT,
- `host_aliases` TEXT,
- `priority_class_name` TEXT,
- `priority` INTEGER,
- `readiness_gates` TEXT,
- `runtime_class_name` TEXT,
- `enable_service_links` INTEGER,
- `preemption_policy` TEXT,
- `overhead` TEXT,
- `topology_spread_constraints` TEXT,
- `set_hostname_as_fqdn` INTEGER,
- `conditions` TEXT,
- `start_time` BIGINT,
- `completion_time` BIGINT,
- `active` INTEGER,
- `succeeded` INTEGER,
- `failed` INTEGER,
- `completed_indexes` TEXT,
- `uncounted_terminated_pods` TEXT,
- `parallelism` INTEGER,
- `completions` INTEGER,
- `job_active_deadline_seconds` BIGINT,
- `backoff_limit` INTEGER,
- `selector` TEXT,
- `manual_selector` INTEGER,
- `ttl_seconds_after_finished` INTEGER
-);
-
-CREATE TABLE kubernetes_component_statuses (
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `type` TEXT,
- `status` TEXT,
- `message` TEXT,
- `error` TEXT
-);
-
-CREATE TABLE kubernetes_config_maps (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `namespace` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `immutable` INTEGER
-);
-
-CREATE TABLE kubernetes_endpoint_subsets (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `namespace` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `addresses` TEXT,
- `not_ready_addresses` TEXT,
- `ports` TEXT
-);
-
-CREATE TABLE kubernetes_limit_ranges (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `namespace` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `type` TEXT,
- `max` TEXT,
- `min` TEXT,
- `default` TEXT,
- `default_request` TEXT,
- `max_limit_request_ratio` TEXT
-);
-
-CREATE TABLE kubernetes_namespaces (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `phase` TEXT,
- `conditions` TEXT
-);
-
-CREATE TABLE kubernetes_nodes (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `pod_cidr` TEXT,
- `pod_cidrs` TEXT,
- `provider_id` TEXT,
- `unschedulable` INTEGER,
- `taints` TEXT,
- `config_source` TEXT,
- `do_not_use_external_id` TEXT,
- `capacity` TEXT,
- `allocatable` TEXT,
- `phase` TEXT,
- `conditions` TEXT,
- `addresses` TEXT,
- `daemon_endpoints` TEXT,
- `node_info` TEXT,
- `images` TEXT,
- `volumes_in_use` TEXT,
- `volumes_attached` TEXT,
- `config` TEXT
-);
-
-CREATE TABLE kubernetes_persistent_volume_claims (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `access_modes` TEXT,
- `selector` TEXT,
- `resources` TEXT,
- `volume_name` TEXT,
- `storage_class_name` TEXT,
- `volume_mode` TEXT,
- `data_source` TEXT,
- `data_source_ref` TEXT,
- `phase` TEXT,
- `capacity` TEXT,
- `conditions` TEXT
-);
-
-CREATE TABLE kubernetes_persistent_volumes (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `capacity` TEXT,
- `access_modes` TEXT,
- `claim_ref` TEXT,
- `persistent_volume_reclaim_policy` TEXT,
- `storage_class_name` TEXT,
- `mount_options` TEXT,
- `volume_mode` TEXT,
- `node_affinity` TEXT,
- `status_phase` TEXT,
- `status_message` TEXT,
- `status_reason` TEXT,
- `volume_type` TEXT,
- `fs_type` TEXT,
- `read_only` INTEGER,
- `secret_name` TEXT,
- `host_path_path` TEXT,
- `host_path_type` TEXT,
- `gce_persistent_disk_pd_name` TEXT,
- `gce_persistent_disk_partition` INTEGER,
- `aws_elastic_block_store_volume_id` TEXT,
- `aws_elastic_block_store_partition` INTEGER,
- `nfs_server` TEXT,
- `nfs_path` TEXT,
- `iscsi_target_portal` TEXT,
- `iscsi_iqn` TEXT,
- `iscsi_lun` INTEGER,
- `iscsi_interface` TEXT,
- `iscsi_portals` TEXT,
- `iscsi_discovery_chap_auth` INTEGER,
- `iscsi_session_chap_auth` INTEGER,
- `iscsi_initiator_name` TEXT,
- `local_path` TEXT,
- `glusterfs_endpoints_name` TEXT,
- `glusterfs_path` TEXT,
- `rbd_ceph_monitors` TEXT,
- `rbd_image` TEXT,
- `rbd_pool` TEXT,
- `rbd_rados_user` TEXT,
- `rbd_keyring` TEXT,
- `flex_volume_driver` TEXT,
- `flex_volume_options` TEXT,
- `cinder_volume_id` TEXT,
- `ceph_fs_monitors` TEXT,
- `ceph_fs_path` TEXT,
- `ceph_fs_user` TEXT,
- `ceph_fs_secret_file` TEXT,
- `flocker_dataset_name` TEXT,
- `flocker_dataset_uuid` TEXT,
- `fc_target_ww_ns` TEXT,
- `fc_lun` INTEGER,
- `fc_ww_ids` TEXT,
- `azure_file_share_name` TEXT,
- `vsphere_volume_volume_path` TEXT,
- `vsphere_volume_storage_policy_name` TEXT,
- `vsphere_volume_storage_policy_id` TEXT,
- `quobyte_registry` TEXT,
- `quobyte_volume` TEXT,
- `quobyte_user` TEXT,
- `quobyte_group` TEXT,
- `quobyte_tenant` TEXT,
- `azure_disk_disk_name` TEXT,
- `azure_disk_data_disk_uri` TEXT,
- `azure_disk_caching_mode` TEXT,
- `azure_disk_kind` TEXT,
- `photon_persistent_disk_pd_id` TEXT,
- `portworx_volume_id` TEXT,
- `scale_io_gateway` TEXT,
- `scale_io_system` TEXT,
- `scale_iossl_enabled` INTEGER,
- `scale_io_protection_domain` TEXT,
- `scale_io_storage_pool` TEXT,
- `scale_io_storage_mode` TEXT,
- `scale_io_volume_name` TEXT,
- `storage_os_volume_name` TEXT,
- `storage_os_volume_namespace` TEXT,
- `csi_driver` TEXT,
- `csi_volume_attributes` TEXT
-);
-
-CREATE TABLE kubernetes_pod_templates (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `namespace` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `se_linux_options_user` TEXT,
- `se_linux_options_role` TEXT,
- `se_linux_options_type` TEXT,
- `se_linux_options_level` TEXT,
- `windows_options_gmsa_credential_spec_name` TEXT,
- `windows_options_gmsa_credential_spec` TEXT,
- `windows_options_run_as_user_name` TEXT,
- `seccomp_profile_type` TEXT,
- `seccomp_profile_localhost_profile` TEXT,
- `run_as_user` BIGINT,
- `run_as_group` BIGINT,
- `run_as_non_root` INTEGER,
- `supplemental_groups` TEXT,
- `fs_group` BIGINT,
- `sysctls` TEXT,
- `fs_group_change_policy` TEXT,
- `node_affinity` TEXT,
- `pod_affinity` TEXT,
- `pod_anti_affinity` TEXT,
- `dns_config_nameservers` TEXT,
- `dns_config_searches` TEXT,
- `dns_config_options` TEXT,
- `node_selector` TEXT,
- `restart_policy` TEXT,
- `termination_grace_period_seconds` BIGINT,
- `active_deadline_seconds` BIGINT,
- `dns_policy` TEXT,
- `service_account_name` TEXT,
- `automount_service_account_token` INTEGER,
- `node_name` TEXT,
- `host_network` INTEGER,
- `host_pid` INTEGER,
- `host_ipc` INTEGER,
- `share_process_namespace` INTEGER,
- `image_pull_secrets` TEXT,
- `hostname` TEXT,
- `subdomain` TEXT,
- `scheduler_name` TEXT,
- `tolerations` TEXT,
- `host_aliases` TEXT,
- `priority_class_name` TEXT,
- `priority` INTEGER,
- `readiness_gates` TEXT,
- `runtime_class_name` TEXT,
- `enable_service_links` INTEGER,
- `preemption_policy` TEXT,
- `overhead` TEXT,
- `topology_spread_constraints` TEXT,
- `set_hostname_as_fqdn` INTEGER
-);
-
-CREATE TABLE kubernetes_pod_template_containers (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `namespace` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `se_linux_options_user` TEXT,
- `se_linux_options_role` TEXT,
- `se_linux_options_type` TEXT,
- `se_linux_options_level` TEXT,
- `windows_options_gmsa_credential_spec_name` TEXT,
- `windows_options_gmsa_credential_spec` TEXT,
- `windows_options_run_as_user_name` TEXT,
- `seccomp_profile_type` TEXT,
- `seccomp_profile_localhost_profile` TEXT,
- `run_as_user` BIGINT,
- `run_as_group` BIGINT,
- `run_as_non_root` INTEGER,
- `capabilities_add` TEXT,
- `capabilities_drop` TEXT,
- `privileged` INTEGER,
- `read_only_root_filesystem` INTEGER,
- `allow_privilege_escalation` INTEGER,
- `proc_mount` TEXT,
- `target_container_name` TEXT,
- `image` TEXT,
- `command` TEXT,
- `args` TEXT,
- `working_dir` TEXT,
- `ports` TEXT,
- `env_from` TEXT,
- `env` TEXT,
- `resource_limits` TEXT,
- `resource_requests` TEXT,
- `volume_mounts` TEXT,
- `volume_devices` TEXT,
- `liveness_probe` TEXT,
- `readiness_probe` TEXT,
- `startup_probe` TEXT,
- `lifecycle` TEXT,
- `termination_message_path` TEXT,
- `termination_message_policy` TEXT,
- `image_pull_policy` TEXT,
- `stdin` INTEGER,
- `stdin_once` INTEGER,
- `tty` INTEGER,
- `pod_template_name` TEXT,
- `container_type` TEXT
-);
-
-CREATE TABLE kubernetes_pod_templates_volumes (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `namespace` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `volume_type` TEXT,
- `fs_type` TEXT,
- `read_only` INTEGER,
- `secret_name` TEXT,
- `host_path_path` TEXT,
- `host_path_type` TEXT,
- `empty_dir_medium` TEXT,
- `empty_dir_size_limit` TEXT,
- `gce_persistent_disk_pd_name` TEXT,
- `gce_persistent_disk_partition` INTEGER,
- `aws_elastic_block_store_volume_id` TEXT,
- `aws_elastic_block_store_partition` INTEGER,
- `git_repo_repository` TEXT,
- `git_repo_revision` TEXT,
- `git_repo_directory` TEXT,
- `secret_items` TEXT,
- `secret_default_mode` INTEGER,
- `secret_optional` INTEGER,
- `nfs_server` TEXT,
- `nfs_path` TEXT,
- `iscsi_target_portal` TEXT,
- `iscsi_iqn` TEXT,
- `iscsi_lun` INTEGER,
- `iscsi_interface` TEXT,
- `iscsi_portals` TEXT,
- `iscsi_discovery_chap_auth` INTEGER,
- `iscsi_session_chap_auth` INTEGER,
- `iscsi_initiator_name` TEXT,
- `glusterfs_endpoints_name` TEXT,
- `glusterfs_path` TEXT,
- `persistent_volume_claim_name` TEXT,
- `rbd_ceph_monitors` TEXT,
- `rbd_image` TEXT,
- `rbd_pool` TEXT,
- `rbd_rados_user` TEXT,
- `rbd_keyring` TEXT,
- `flex_volume_driver` TEXT,
- `flex_volume_options` TEXT,
- `cinder_volume_id` TEXT,
- `ceph_fs_monitors` TEXT,
- `ceph_fs_path` TEXT,
- `ceph_fs_user` TEXT,
- `ceph_fs_secret_file` TEXT,
- `flocker_dataset_name` TEXT,
- `flocker_dataset_uuid` TEXT,
- `downward_api_items` TEXT,
- `downward_api_default_mode` INTEGER,
- `fc_target_ww_ns` TEXT,
- `fc_lun` INTEGER,
- `fc_ww_ids` TEXT,
- `azure_file_share_name` TEXT,
- `config_map_name` TEXT,
- `config_map_items` TEXT,
- `config_map_default_mode` INTEGER,
- `config_map_optional` INTEGER,
- `vsphere_volume_volume_path` TEXT,
- `vsphere_volume_storage_policy_name` TEXT,
- `vsphere_volume_storage_policy_id` TEXT,
- `quobyte_registry` TEXT,
- `quobyte_volume` TEXT,
- `quobyte_user` TEXT,
- `quobyte_group` TEXT,
- `quobyte_tenant` TEXT,
- `azure_disk_disk_name` TEXT,
- `azure_disk_data_disk_uri` TEXT,
- `azure_disk_caching_mode` TEXT,
- `azure_disk_kind` TEXT,
- `photon_persistent_disk_pd_id` TEXT,
- `projected_sources` TEXT,
- `projected_default_mode` INTEGER,
- `portworx_volume_id` TEXT,
- `scale_io_gateway` TEXT,
- `scale_io_system` TEXT,
- `scale_iossl_enabled` INTEGER,
- `scale_io_protection_domain` TEXT,
- `scale_io_storage_pool` TEXT,
- `scale_io_storage_mode` TEXT,
- `scale_io_volume_name` TEXT,
- `storage_os_volume_name` TEXT,
- `storage_os_volume_namespace` TEXT,
- `csi_driver` TEXT,
- `csi_volume_attributes` TEXT,
- `ephemeral_volume_claim_template` TEXT,
- `pod_template_name` TEXT
-);
-
-CREATE TABLE kubernetes_pods (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `namespace` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `se_linux_options_user` TEXT,
- `se_linux_options_role` TEXT,
- `se_linux_options_type` TEXT,
- `se_linux_options_level` TEXT,
- `windows_options_gmsa_credential_spec_name` TEXT,
- `windows_options_gmsa_credential_spec` TEXT,
- `windows_options_run_as_user_name` TEXT,
- `seccomp_profile_type` TEXT,
- `seccomp_profile_localhost_profile` TEXT,
- `run_as_user` BIGINT,
- `run_as_group` BIGINT,
- `run_as_non_root` INTEGER,
- `supplemental_groups` TEXT,
- `fs_group` BIGINT,
- `sysctls` TEXT,
- `fs_group_change_policy` TEXT,
- `node_affinity` TEXT,
- `pod_affinity` TEXT,
- `pod_anti_affinity` TEXT,
- `dns_config_nameservers` TEXT,
- `dns_config_searches` TEXT,
- `dns_config_options` TEXT,
- `node_selector` TEXT,
- `restart_policy` TEXT,
- `termination_grace_period_seconds` BIGINT,
- `active_deadline_seconds` BIGINT,
- `dns_policy` TEXT,
- `service_account_name` TEXT,
- `automount_service_account_token` INTEGER,
- `node_name` TEXT,
- `host_network` INTEGER,
- `host_pid` INTEGER,
- `host_ipc` INTEGER,
- `share_process_namespace` INTEGER,
- `image_pull_secrets` TEXT,
- `hostname` TEXT,
- `subdomain` TEXT,
- `scheduler_name` TEXT,
- `tolerations` TEXT,
- `host_aliases` TEXT,
- `priority_class_name` TEXT,
- `priority` INTEGER,
- `readiness_gates` TEXT,
- `runtime_class_name` TEXT,
- `enable_service_links` INTEGER,
- `preemption_policy` TEXT,
- `overhead` TEXT,
- `topology_spread_constraints` TEXT,
- `set_hostname_as_fqdn` INTEGER,
- `phase` TEXT,
- `conditions` TEXT,
- `message` TEXT,
- `reason` TEXT,
- `nominated_node_name` TEXT,
- `host_ip` TEXT,
- `pod_ip` TEXT,
- `pod_ips` TEXT,
- `start_time` BIGINT,
- `init_container_statuses` TEXT,
- `container_statuses` TEXT,
- `qos_class` TEXT,
- `ephemeral_container_statuses` TEXT
-);
-
-CREATE TABLE kubernetes_pod_containers (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `namespace` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `se_linux_options_user` TEXT,
- `se_linux_options_role` TEXT,
- `se_linux_options_type` TEXT,
- `se_linux_options_level` TEXT,
- `windows_options_gmsa_credential_spec_name` TEXT,
- `windows_options_gmsa_credential_spec` TEXT,
- `windows_options_run_as_user_name` TEXT,
- `seccomp_profile_type` TEXT,
- `seccomp_profile_localhost_profile` TEXT,
- `run_as_user` BIGINT,
- `run_as_group` BIGINT,
- `run_as_non_root` INTEGER,
- `capabilities_add` TEXT,
- `capabilities_drop` TEXT,
- `privileged` INTEGER,
- `read_only_root_filesystem` INTEGER,
- `allow_privilege_escalation` INTEGER,
- `proc_mount` TEXT,
- `target_container_name` TEXT,
- `image` TEXT,
- `command` TEXT,
- `args` TEXT,
- `working_dir` TEXT,
- `ports` TEXT,
- `env_from` TEXT,
- `env` TEXT,
- `resource_limits` TEXT,
- `resource_requests` TEXT,
- `volume_mounts` TEXT,
- `volume_devices` TEXT,
- `liveness_probe` TEXT,
- `readiness_probe` TEXT,
- `startup_probe` TEXT,
- `lifecycle` TEXT,
- `termination_message_path` TEXT,
- `termination_message_policy` TEXT,
- `image_pull_policy` TEXT,
- `stdin` INTEGER,
- `stdin_once` INTEGER,
- `tty` INTEGER,
- `pod_name` TEXT,
- `container_type` TEXT,
- `state` TEXT,
- `last_termination_state` TEXT,
- `ready` INTEGER,
- `restart_count` INTEGER,
- `image_repo` TEXT,
- `image_id` TEXT,
- `container_id` TEXT,
- `started` INTEGER
-);
-
-CREATE TABLE kubernetes_pod_volumes (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `namespace` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `volume_type` TEXT,
- `fs_type` TEXT,
- `read_only` INTEGER,
- `secret_name` TEXT,
- `host_path_path` TEXT,
- `host_path_type` TEXT,
- `empty_dir_medium` TEXT,
- `empty_dir_size_limit` TEXT,
- `gce_persistent_disk_pd_name` TEXT,
- `gce_persistent_disk_partition` INTEGER,
- `aws_elastic_block_store_volume_id` TEXT,
- `aws_elastic_block_store_partition` INTEGER,
- `git_repo_repository` TEXT,
- `git_repo_revision` TEXT,
- `git_repo_directory` TEXT,
- `secret_items` TEXT,
- `secret_default_mode` INTEGER,
- `secret_optional` INTEGER,
- `nfs_server` TEXT,
- `nfs_path` TEXT,
- `iscsi_target_portal` TEXT,
- `iscsi_iqn` TEXT,
- `iscsi_lun` INTEGER,
- `iscsi_interface` TEXT,
- `iscsi_portals` TEXT,
- `iscsi_discovery_chap_auth` INTEGER,
- `iscsi_session_chap_auth` INTEGER,
- `iscsi_initiator_name` TEXT,
- `glusterfs_endpoints_name` TEXT,
- `glusterfs_path` TEXT,
- `persistent_volume_claim_name` TEXT,
- `rbd_ceph_monitors` TEXT,
- `rbd_image` TEXT,
- `rbd_pool` TEXT,
- `rbd_rados_user` TEXT,
- `rbd_keyring` TEXT,
- `flex_volume_driver` TEXT,
- `flex_volume_options` TEXT,
- `cinder_volume_id` TEXT,
- `ceph_fs_monitors` TEXT,
- `ceph_fs_path` TEXT,
- `ceph_fs_user` TEXT,
- `ceph_fs_secret_file` TEXT,
- `flocker_dataset_name` TEXT,
- `flocker_dataset_uuid` TEXT,
- `downward_api_items` TEXT,
- `downward_api_default_mode` INTEGER,
- `fc_target_ww_ns` TEXT,
- `fc_lun` INTEGER,
- `fc_ww_ids` TEXT,
- `azure_file_share_name` TEXT,
- `config_map_name` TEXT,
- `config_map_items` TEXT,
- `config_map_default_mode` INTEGER,
- `config_map_optional` INTEGER,
- `vsphere_volume_volume_path` TEXT,
- `vsphere_volume_storage_policy_name` TEXT,
- `vsphere_volume_storage_policy_id` TEXT,
- `quobyte_registry` TEXT,
- `quobyte_volume` TEXT,
- `quobyte_user` TEXT,
- `quobyte_group` TEXT,
- `quobyte_tenant` TEXT,
- `azure_disk_disk_name` TEXT,
- `azure_disk_data_disk_uri` TEXT,
- `azure_disk_caching_mode` TEXT,
- `azure_disk_kind` TEXT,
- `photon_persistent_disk_pd_id` TEXT,
- `projected_sources` TEXT,
- `projected_default_mode` INTEGER,
- `portworx_volume_id` TEXT,
- `scale_io_gateway` TEXT,
- `scale_io_system` TEXT,
- `scale_iossl_enabled` INTEGER,
- `scale_io_protection_domain` TEXT,
- `scale_io_storage_pool` TEXT,
- `scale_io_storage_mode` TEXT,
- `scale_io_volume_name` TEXT,
- `storage_os_volume_name` TEXT,
- `storage_os_volume_namespace` TEXT,
- `csi_driver` TEXT,
- `csi_volume_attributes` TEXT,
- `ephemeral_volume_claim_template` TEXT,
- `pod_name` TEXT
-);
-
-CREATE TABLE kubernetes_resource_quotas (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `namespace` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `hard` TEXT,
- `scopes` TEXT,
- `scope_selector` TEXT,
- `status_hard` TEXT,
- `status_used` TEXT
-);
-
-CREATE TABLE kubernetes_secrets (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `namespace` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `immutable` INTEGER,
- `type` TEXT
-);
-
-CREATE TABLE kubernetes_service_accounts (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `namespace` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `secrets` TEXT,
- `image_pull_secrets` TEXT,
- `automount_service_account_token` INTEGER
-);
-
-CREATE TABLE kubernetes_services (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `namespace` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `ports` TEXT,
- `selector` TEXT,
- `cluster_ip` TEXT,
- `cluster_ips` TEXT,
- `type` TEXT,
- `external_ips` TEXT,
- `session_affinity` TEXT,
- `load_balancer_ip` TEXT,
- `load_balancer_source_ranges` TEXT,
- `external_name` TEXT,
- `external_traffic_policy` TEXT,
- `health_check_node_port` INTEGER,
- `publish_not_ready_addresses` INTEGER,
- `session_affinity_config` TEXT,
- `ip_families` TEXT,
- `ip_family_policy` TEXT,
- `allocate_load_balancer_node_ports` INTEGER,
- `load_balancer_class` TEXT,
- `internal_traffic_policy` TEXT,
- `load_balancer` TEXT,
- `conditions` TEXT
-);
-
-CREATE TABLE kubernetes_api_resources (
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `singular_name` TEXT,
- `namespaced` INTEGER,
- `group` TEXT,
- `version` TEXT,
- `kind` TEXT,
- `verbs` TEXT,
- `short_names` TEXT,
- `categories` TEXT,
- `storage_version_hash` TEXT,
- `group_version` TEXT
-);
-
-CREATE TABLE kubernetes_info (
- `cluster_uid` TEXT,
- `cluster_name` TEXT,
- `major` TEXT,
- `minor` TEXT,
- `git_version` TEXT,
- `git_commit` TEXT,
- `git_tree_state` TEXT,
- `build_date` TEXT,
- `go_version` TEXT,
- `compiler` TEXT,
- `platform` TEXT
-);
-
-CREATE TABLE kubernetes_events (
- `time` BIGINT,
- `event_type` TEXT,
- `cluster_uid` TEXT,
- `cluster_name` TEXT,
- `name` TEXT,
- `namespace` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `reporting_controller` TEXT,
- `reporting_instance` TEXT,
- `action` TEXT,
- `reason` TEXT,
- `note` TEXT,
- `type` TEXT,
- `regarding_kind` TEXT,
- `regarding_namespace` TEXT,
- `regarding_name` TEXT,
- `regarding_uid` TEXT,
- `related_kind` TEXT,
- `related_namespace` TEXT,
- `related_name` TEXT,
- `related_uid` TEXT
-);
-
-CREATE TABLE kubernetes_ingress_classes (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `controller` TEXT,
- `parameters` TEXT
-);
-
-CREATE TABLE kubernetes_ingresses (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `namespace` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `ingress_class_name` TEXT,
- `default_backend` TEXT,
- `tls` TEXT,
- `rules` TEXT,
- `load_balancer` TEXT
-);
-
-CREATE TABLE kubernetes_network_policies (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `namespace` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `pod_selector` TEXT,
- `policy_types` TEXT,
- `type` TEXT,
- `ports` TEXT,
- `from_to` TEXT
-);
-
-CREATE TABLE kubernetes_pod_disruption_budgets (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `namespace` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `min_available` TEXT,
- `selector` TEXT,
- `max_unavailable` TEXT,
- `observed_generation` BIGINT,
- `disrupted_pods` TEXT,
- `disruptions_allowed` INTEGER,
- `current_healthy` INTEGER,
- `desired_healthy` INTEGER,
- `expected_pods` INTEGER,
- `conditions` TEXT
-);
-
-CREATE TABLE kubernetes_pod_security_policies (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `privileged` INTEGER,
- `default_add_capabilities` TEXT,
- `required_drop_capabilities` TEXT,
- `allowed_capabilities` TEXT,
- `volumes` TEXT,
- `host_network` INTEGER,
- `host_ports` TEXT,
- `host_pid` INTEGER,
- `host_ipc` INTEGER,
- `se_linux` TEXT,
- `run_as_user` TEXT,
- `run_as_group` TEXT,
- `supplemental_groups` TEXT,
- `fs_group` TEXT,
- `read_only_root_filesystem` INTEGER,
- `default_allow_privilege_escalation` INTEGER,
- `allow_privilege_escalation` INTEGER,
- `allowed_host_paths` TEXT,
- `allowed_flex_volumes` TEXT,
- `allowed_csi_drivers` TEXT,
- `allowed_unsafe_sysctls` TEXT,
- `forbidden_sysctls` TEXT,
- `allowed_proc_mount_types` TEXT,
- `runtime_class` TEXT
-);
-
-CREATE TABLE kubernetes_cluster_role_binding_subjects (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `role_api_group` TEXT,
- `role_name` TEXT,
- `role_kind` TEXT,
- `subject_name` TEXT,
- `subject_kind` TEXT,
- `subject_namespace` TEXT
-);
-
-CREATE TABLE kubernetes_cluster_role_policy_rules (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `verbs` TEXT,
- `api_groups` TEXT,
- `resources` TEXT,
- `resource_names` TEXT,
- `non_resource_urls` TEXT,
- `aggregation_rule` TEXT
-);
-
-CREATE TABLE kubernetes_role_binding_subjects (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `namespace` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `role_name` TEXT,
- `role_kind` TEXT,
- `subject_name` TEXT,
- `subject_kind` TEXT,
- `subject_namespace` TEXT
-);
-
-CREATE TABLE kubernetes_role_policy_rules (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `namespace` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `verbs` TEXT,
- `api_groups` TEXT,
- `resources` TEXT,
- `resource_names` TEXT,
- `non_resource_urls` TEXT
-);
-
-CREATE TABLE kubernetes_csi_drivers (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `attach_required` INTEGER,
- `pod_info_on_mount` INTEGER,
- `volume_lifecycle_modes` TEXT,
- `storage_capacity` INTEGER,
- `fs_group_policy` TEXT,
- `token_requests` TEXT,
- `requires_republish` INTEGER
-);
-
-CREATE TABLE kubernetes_csi_node_drivers (
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `node_id` TEXT,
- `topology_keys` TEXT,
- `allocatable` TEXT
-);
-
-CREATE TABLE kubernetes_storage_classes (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `provisioner` TEXT,
- `parameters` TEXT,
- `reclaim_policy` TEXT,
- `mount_options` TEXT,
- `allow_volume_expansion` INTEGER,
- `volume_binding_mode` TEXT,
- `allowed_topologies` TEXT
-);
-
-CREATE TABLE kubernetes_volume_attachments (
- `uid` TEXT,
- `cluster_name` TEXT,
- `cluster_uid` TEXT,
- `name` TEXT,
- `creation_timestamp` BIGINT,
- `labels` TEXT,
- `annotations` TEXT,
- `attacher` TEXT,
- `source` TEXT,
- `node_name` TEXT,
- `attached` INTEGER,
- `attachment_metadata` TEXT,
- `attach_error` TEXT,
- `detach_error` TEXT
-);
-
-```
diff --git a/infrastructure/kubequery/docs/tables.json b/infrastructure/kubequery/docs/tables.json
deleted file mode 100644
index 584da6d0a6..0000000000
--- a/infrastructure/kubequery/docs/tables.json
+++ /dev/null
@@ -1,7970 +0,0 @@
-{
- "tables": [ {
- "name": "kubernetes_mutating_webhooks",
- "columns": [
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "client_config",
- "type": "TEXT"
- },
- {
- "name": "rules",
- "type": "TEXT"
- },
- {
- "name": "failure_policy",
- "type": "TEXT"
- },
- {
- "name": "match_policy",
- "type": "TEXT"
- },
- {
- "name": "namespace_selector",
- "type": "TEXT"
- },
- {
- "name": "object_selector",
- "type": "TEXT"
- },
- {
- "name": "side_effects",
- "type": "TEXT"
- },
- {
- "name": "timeout_seconds",
- "type": "INTEGER"
- },
- {
- "name": "admission_review_versions",
- "type": "TEXT"
- },
- {
- "name": "reinvocation_policy",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_validating_webhooks",
- "columns": [
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "client_config",
- "type": "TEXT"
- },
- {
- "name": "rules",
- "type": "TEXT"
- },
- {
- "name": "failure_policy",
- "type": "TEXT"
- },
- {
- "name": "match_policy",
- "type": "TEXT"
- },
- {
- "name": "namespace_selector",
- "type": "TEXT"
- },
- {
- "name": "object_selector",
- "type": "TEXT"
- },
- {
- "name": "side_effects",
- "type": "TEXT"
- },
- {
- "name": "timeout_seconds",
- "type": "INTEGER"
- },
- {
- "name": "admission_review_versions",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_daemon_sets",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "namespace",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_user",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_role",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_type",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_level",
- "type": "TEXT"
- },
- {
- "name": "windows_options_gmsa_credential_spec_name",
- "type": "TEXT"
- },
- {
- "name": "windows_options_gmsa_credential_spec",
- "type": "TEXT"
- },
- {
- "name": "windows_options_run_as_user_name",
- "type": "TEXT"
- },
- {
- "name": "seccomp_profile_type",
- "type": "TEXT"
- },
- {
- "name": "seccomp_profile_localhost_profile",
- "type": "TEXT"
- },
- {
- "name": "run_as_user",
- "type": "BIGINT"
- },
- {
- "name": "run_as_group",
- "type": "BIGINT"
- },
- {
- "name": "run_as_non_root",
- "type": "INTEGER"
- },
- {
- "name": "supplemental_groups",
- "type": "TEXT"
- },
- {
- "name": "fs_group",
- "type": "BIGINT"
- },
- {
- "name": "sysctls",
- "type": "TEXT"
- },
- {
- "name": "fs_group_change_policy",
- "type": "TEXT"
- },
- {
- "name": "node_affinity",
- "type": "TEXT"
- },
- {
- "name": "pod_affinity",
- "type": "TEXT"
- },
- {
- "name": "pod_anti_affinity",
- "type": "TEXT"
- },
- {
- "name": "dns_config_nameservers",
- "type": "TEXT"
- },
- {
- "name": "dns_config_searches",
- "type": "TEXT"
- },
- {
- "name": "dns_config_options",
- "type": "TEXT"
- },
- {
- "name": "node_selector",
- "type": "TEXT"
- },
- {
- "name": "restart_policy",
- "type": "TEXT"
- },
- {
- "name": "termination_grace_period_seconds",
- "type": "BIGINT"
- },
- {
- "name": "active_deadline_seconds",
- "type": "BIGINT"
- },
- {
- "name": "dns_policy",
- "type": "TEXT"
- },
- {
- "name": "service_account_name",
- "type": "TEXT"
- },
- {
- "name": "automount_service_account_token",
- "type": "INTEGER"
- },
- {
- "name": "node_name",
- "type": "TEXT"
- },
- {
- "name": "host_network",
- "type": "INTEGER"
- },
- {
- "name": "host_pid",
- "type": "INTEGER"
- },
- {
- "name": "host_ipc",
- "type": "INTEGER"
- },
- {
- "name": "share_process_namespace",
- "type": "INTEGER"
- },
- {
- "name": "image_pull_secrets",
- "type": "TEXT"
- },
- {
- "name": "hostname",
- "type": "TEXT"
- },
- {
- "name": "subdomain",
- "type": "TEXT"
- },
- {
- "name": "scheduler_name",
- "type": "TEXT"
- },
- {
- "name": "tolerations",
- "type": "TEXT"
- },
- {
- "name": "host_aliases",
- "type": "TEXT"
- },
- {
- "name": "priority_class_name",
- "type": "TEXT"
- },
- {
- "name": "priority",
- "type": "INTEGER"
- },
- {
- "name": "readiness_gates",
- "type": "TEXT"
- },
- {
- "name": "runtime_class_name",
- "type": "TEXT"
- },
- {
- "name": "enable_service_links",
- "type": "INTEGER"
- },
- {
- "name": "preemption_policy",
- "type": "TEXT"
- },
- {
- "name": "overhead",
- "type": "TEXT"
- },
- {
- "name": "topology_spread_constraints",
- "type": "TEXT"
- },
- {
- "name": "set_hostname_as_fqdn",
- "type": "INTEGER"
- },
- {
- "name": "current_number_scheduled",
- "type": "INTEGER"
- },
- {
- "name": "number_misscheduled",
- "type": "INTEGER"
- },
- {
- "name": "desired_number_scheduled",
- "type": "INTEGER"
- },
- {
- "name": "number_ready",
- "type": "INTEGER"
- },
- {
- "name": "observed_generation",
- "type": "BIGINT"
- },
- {
- "name": "updated_number_scheduled",
- "type": "INTEGER"
- },
- {
- "name": "number_available",
- "type": "INTEGER"
- },
- {
- "name": "number_unavailable",
- "type": "INTEGER"
- },
- {
- "name": "collision_count",
- "type": "INTEGER"
- },
- {
- "name": "conditions",
- "type": "TEXT"
- },
- {
- "name": "selector",
- "type": "TEXT"
- },
- {
- "name": "update_strategy",
- "type": "TEXT"
- },
- {
- "name": "min_ready_seconds",
- "type": "INTEGER"
- },
- {
- "name": "revision_history_limit",
- "type": "INTEGER"
- }
- ]
- },
- {
- "name": "kubernetes_daemon_set_containers",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "namespace",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_user",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_role",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_type",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_level",
- "type": "TEXT"
- },
- {
- "name": "windows_options_gmsa_credential_spec_name",
- "type": "TEXT"
- },
- {
- "name": "windows_options_gmsa_credential_spec",
- "type": "TEXT"
- },
- {
- "name": "windows_options_run_as_user_name",
- "type": "TEXT"
- },
- {
- "name": "seccomp_profile_type",
- "type": "TEXT"
- },
- {
- "name": "seccomp_profile_localhost_profile",
- "type": "TEXT"
- },
- {
- "name": "run_as_user",
- "type": "BIGINT"
- },
- {
- "name": "run_as_group",
- "type": "BIGINT"
- },
- {
- "name": "run_as_non_root",
- "type": "INTEGER"
- },
- {
- "name": "capabilities_add",
- "type": "TEXT"
- },
- {
- "name": "capabilities_drop",
- "type": "TEXT"
- },
- {
- "name": "privileged",
- "type": "INTEGER"
- },
- {
- "name": "read_only_root_filesystem",
- "type": "INTEGER"
- },
- {
- "name": "allow_privilege_escalation",
- "type": "INTEGER"
- },
- {
- "name": "proc_mount",
- "type": "TEXT"
- },
- {
- "name": "target_container_name",
- "type": "TEXT"
- },
- {
- "name": "image",
- "type": "TEXT"
- },
- {
- "name": "command",
- "type": "TEXT"
- },
- {
- "name": "args",
- "type": "TEXT"
- },
- {
- "name": "working_dir",
- "type": "TEXT"
- },
- {
- "name": "ports",
- "type": "TEXT"
- },
- {
- "name": "env_from",
- "type": "TEXT"
- },
- {
- "name": "env",
- "type": "TEXT"
- },
- {
- "name": "resource_limits",
- "type": "TEXT"
- },
- {
- "name": "resource_requests",
- "type": "TEXT"
- },
- {
- "name": "volume_mounts",
- "type": "TEXT"
- },
- {
- "name": "volume_devices",
- "type": "TEXT"
- },
- {
- "name": "liveness_probe",
- "type": "TEXT"
- },
- {
- "name": "readiness_probe",
- "type": "TEXT"
- },
- {
- "name": "startup_probe",
- "type": "TEXT"
- },
- {
- "name": "lifecycle",
- "type": "TEXT"
- },
- {
- "name": "termination_message_path",
- "type": "TEXT"
- },
- {
- "name": "termination_message_policy",
- "type": "TEXT"
- },
- {
- "name": "image_pull_policy",
- "type": "TEXT"
- },
- {
- "name": "stdin",
- "type": "INTEGER"
- },
- {
- "name": "stdin_once",
- "type": "INTEGER"
- },
- {
- "name": "tty",
- "type": "INTEGER"
- },
- {
- "name": "daemon_set_name",
- "type": "TEXT"
- },
- {
- "name": "container_type",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_daemon_set_volumes",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "namespace",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "volume_type",
- "type": "TEXT"
- },
- {
- "name": "fs_type",
- "type": "TEXT"
- },
- {
- "name": "read_only",
- "type": "INTEGER"
- },
- {
- "name": "secret_name",
- "type": "TEXT"
- },
- {
- "name": "host_path_path",
- "type": "TEXT"
- },
- {
- "name": "host_path_type",
- "type": "TEXT"
- },
- {
- "name": "empty_dir_medium",
- "type": "TEXT"
- },
- {
- "name": "empty_dir_size_limit",
- "type": "TEXT"
- },
- {
- "name": "gce_persistent_disk_pd_name",
- "type": "TEXT"
- },
- {
- "name": "gce_persistent_disk_partition",
- "type": "INTEGER"
- },
- {
- "name": "aws_elastic_block_store_volume_id",
- "type": "TEXT"
- },
- {
- "name": "aws_elastic_block_store_partition",
- "type": "INTEGER"
- },
- {
- "name": "git_repo_repository",
- "type": "TEXT"
- },
- {
- "name": "git_repo_revision",
- "type": "TEXT"
- },
- {
- "name": "git_repo_directory",
- "type": "TEXT"
- },
- {
- "name": "secret_items",
- "type": "TEXT"
- },
- {
- "name": "secret_default_mode",
- "type": "INTEGER"
- },
- {
- "name": "secret_optional",
- "type": "INTEGER"
- },
- {
- "name": "nfs_server",
- "type": "TEXT"
- },
- {
- "name": "nfs_path",
- "type": "TEXT"
- },
- {
- "name": "iscsi_target_portal",
- "type": "TEXT"
- },
- {
- "name": "iscsi_iqn",
- "type": "TEXT"
- },
- {
- "name": "iscsi_lun",
- "type": "INTEGER"
- },
- {
- "name": "iscsi_interface",
- "type": "TEXT"
- },
- {
- "name": "iscsi_portals",
- "type": "TEXT"
- },
- {
- "name": "iscsi_discovery_chap_auth",
- "type": "INTEGER"
- },
- {
- "name": "iscsi_session_chap_auth",
- "type": "INTEGER"
- },
- {
- "name": "iscsi_initiator_name",
- "type": "TEXT"
- },
- {
- "name": "glusterfs_endpoints_name",
- "type": "TEXT"
- },
- {
- "name": "glusterfs_path",
- "type": "TEXT"
- },
- {
- "name": "persistent_volume_claim_name",
- "type": "TEXT"
- },
- {
- "name": "rbd_ceph_monitors",
- "type": "TEXT"
- },
- {
- "name": "rbd_image",
- "type": "TEXT"
- },
- {
- "name": "rbd_pool",
- "type": "TEXT"
- },
- {
- "name": "rbd_rados_user",
- "type": "TEXT"
- },
- {
- "name": "rbd_keyring",
- "type": "TEXT"
- },
- {
- "name": "flex_volume_driver",
- "type": "TEXT"
- },
- {
- "name": "flex_volume_options",
- "type": "TEXT"
- },
- {
- "name": "cinder_volume_id",
- "type": "TEXT"
- },
- {
- "name": "ceph_fs_monitors",
- "type": "TEXT"
- },
- {
- "name": "ceph_fs_path",
- "type": "TEXT"
- },
- {
- "name": "ceph_fs_user",
- "type": "TEXT"
- },
- {
- "name": "ceph_fs_secret_file",
- "type": "TEXT"
- },
- {
- "name": "flocker_dataset_name",
- "type": "TEXT"
- },
- {
- "name": "flocker_dataset_uuid",
- "type": "TEXT"
- },
- {
- "name": "downward_api_items",
- "type": "TEXT"
- },
- {
- "name": "downward_api_default_mode",
- "type": "INTEGER"
- },
- {
- "name": "fc_target_ww_ns",
- "type": "TEXT"
- },
- {
- "name": "fc_lun",
- "type": "INTEGER"
- },
- {
- "name": "fc_ww_ids",
- "type": "TEXT"
- },
- {
- "name": "azure_file_share_name",
- "type": "TEXT"
- },
- {
- "name": "config_map_name",
- "type": "TEXT"
- },
- {
- "name": "config_map_items",
- "type": "TEXT"
- },
- {
- "name": "config_map_default_mode",
- "type": "INTEGER"
- },
- {
- "name": "config_map_optional",
- "type": "INTEGER"
- },
- {
- "name": "vsphere_volume_volume_path",
- "type": "TEXT"
- },
- {
- "name": "vsphere_volume_storage_policy_name",
- "type": "TEXT"
- },
- {
- "name": "vsphere_volume_storage_policy_id",
- "type": "TEXT"
- },
- {
- "name": "quobyte_registry",
- "type": "TEXT"
- },
- {
- "name": "quobyte_volume",
- "type": "TEXT"
- },
- {
- "name": "quobyte_user",
- "type": "TEXT"
- },
- {
- "name": "quobyte_group",
- "type": "TEXT"
- },
- {
- "name": "quobyte_tenant",
- "type": "TEXT"
- },
- {
- "name": "azure_disk_disk_name",
- "type": "TEXT"
- },
- {
- "name": "azure_disk_data_disk_uri",
- "type": "TEXT"
- },
- {
- "name": "azure_disk_caching_mode",
- "type": "TEXT"
- },
- {
- "name": "azure_disk_kind",
- "type": "TEXT"
- },
- {
- "name": "photon_persistent_disk_pd_id",
- "type": "TEXT"
- },
- {
- "name": "projected_sources",
- "type": "TEXT"
- },
- {
- "name": "projected_default_mode",
- "type": "INTEGER"
- },
- {
- "name": "portworx_volume_id",
- "type": "TEXT"
- },
- {
- "name": "scale_io_gateway",
- "type": "TEXT"
- },
- {
- "name": "scale_io_system",
- "type": "TEXT"
- },
- {
- "name": "scale_iossl_enabled",
- "type": "INTEGER"
- },
- {
- "name": "scale_io_protection_domain",
- "type": "TEXT"
- },
- {
- "name": "scale_io_storage_pool",
- "type": "TEXT"
- },
- {
- "name": "scale_io_storage_mode",
- "type": "TEXT"
- },
- {
- "name": "scale_io_volume_name",
- "type": "TEXT"
- },
- {
- "name": "storage_os_volume_name",
- "type": "TEXT"
- },
- {
- "name": "storage_os_volume_namespace",
- "type": "TEXT"
- },
- {
- "name": "csi_driver",
- "type": "TEXT"
- },
- {
- "name": "csi_volume_attributes",
- "type": "TEXT"
- },
- {
- "name": "ephemeral_volume_claim_template",
- "type": "TEXT"
- },
- {
- "name": "daemon_set_name",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_deployments",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "namespace",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_user",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_role",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_type",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_level",
- "type": "TEXT"
- },
- {
- "name": "windows_options_gmsa_credential_spec_name",
- "type": "TEXT"
- },
- {
- "name": "windows_options_gmsa_credential_spec",
- "type": "TEXT"
- },
- {
- "name": "windows_options_run_as_user_name",
- "type": "TEXT"
- },
- {
- "name": "seccomp_profile_type",
- "type": "TEXT"
- },
- {
- "name": "seccomp_profile_localhost_profile",
- "type": "TEXT"
- },
- {
- "name": "run_as_user",
- "type": "BIGINT"
- },
- {
- "name": "run_as_group",
- "type": "BIGINT"
- },
- {
- "name": "run_as_non_root",
- "type": "INTEGER"
- },
- {
- "name": "supplemental_groups",
- "type": "TEXT"
- },
- {
- "name": "fs_group",
- "type": "BIGINT"
- },
- {
- "name": "sysctls",
- "type": "TEXT"
- },
- {
- "name": "fs_group_change_policy",
- "type": "TEXT"
- },
- {
- "name": "node_affinity",
- "type": "TEXT"
- },
- {
- "name": "pod_affinity",
- "type": "TEXT"
- },
- {
- "name": "pod_anti_affinity",
- "type": "TEXT"
- },
- {
- "name": "dns_config_nameservers",
- "type": "TEXT"
- },
- {
- "name": "dns_config_searches",
- "type": "TEXT"
- },
- {
- "name": "dns_config_options",
- "type": "TEXT"
- },
- {
- "name": "node_selector",
- "type": "TEXT"
- },
- {
- "name": "restart_policy",
- "type": "TEXT"
- },
- {
- "name": "termination_grace_period_seconds",
- "type": "BIGINT"
- },
- {
- "name": "active_deadline_seconds",
- "type": "BIGINT"
- },
- {
- "name": "dns_policy",
- "type": "TEXT"
- },
- {
- "name": "service_account_name",
- "type": "TEXT"
- },
- {
- "name": "automount_service_account_token",
- "type": "INTEGER"
- },
- {
- "name": "node_name",
- "type": "TEXT"
- },
- {
- "name": "host_network",
- "type": "INTEGER"
- },
- {
- "name": "host_pid",
- "type": "INTEGER"
- },
- {
- "name": "host_ipc",
- "type": "INTEGER"
- },
- {
- "name": "share_process_namespace",
- "type": "INTEGER"
- },
- {
- "name": "image_pull_secrets",
- "type": "TEXT"
- },
- {
- "name": "hostname",
- "type": "TEXT"
- },
- {
- "name": "subdomain",
- "type": "TEXT"
- },
- {
- "name": "scheduler_name",
- "type": "TEXT"
- },
- {
- "name": "tolerations",
- "type": "TEXT"
- },
- {
- "name": "host_aliases",
- "type": "TEXT"
- },
- {
- "name": "priority_class_name",
- "type": "TEXT"
- },
- {
- "name": "priority",
- "type": "INTEGER"
- },
- {
- "name": "readiness_gates",
- "type": "TEXT"
- },
- {
- "name": "runtime_class_name",
- "type": "TEXT"
- },
- {
- "name": "enable_service_links",
- "type": "INTEGER"
- },
- {
- "name": "preemption_policy",
- "type": "TEXT"
- },
- {
- "name": "overhead",
- "type": "TEXT"
- },
- {
- "name": "topology_spread_constraints",
- "type": "TEXT"
- },
- {
- "name": "set_hostname_as_fqdn",
- "type": "INTEGER"
- },
- {
- "name": "observed_generation",
- "type": "BIGINT"
- },
- {
- "name": "replicas",
- "type": "INTEGER"
- },
- {
- "name": "updated_replicas",
- "type": "INTEGER"
- },
- {
- "name": "ready_replicas",
- "type": "INTEGER"
- },
- {
- "name": "available_replicas",
- "type": "INTEGER"
- },
- {
- "name": "unavailable_replicas",
- "type": "INTEGER"
- },
- {
- "name": "conditions",
- "type": "TEXT"
- },
- {
- "name": "collision_count",
- "type": "INTEGER"
- },
- {
- "name": "deployment_replicas",
- "type": "INTEGER"
- },
- {
- "name": "selector",
- "type": "TEXT"
- },
- {
- "name": "strategy",
- "type": "TEXT"
- },
- {
- "name": "min_ready_seconds",
- "type": "INTEGER"
- },
- {
- "name": "revision_history_limit",
- "type": "INTEGER"
- },
- {
- "name": "paused",
- "type": "INTEGER"
- },
- {
- "name": "progress_deadline_seconds",
- "type": "INTEGER"
- }
- ]
- },
- {
- "name": "kubernetes_deployments_containers",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "namespace",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_user",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_role",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_type",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_level",
- "type": "TEXT"
- },
- {
- "name": "windows_options_gmsa_credential_spec_name",
- "type": "TEXT"
- },
- {
- "name": "windows_options_gmsa_credential_spec",
- "type": "TEXT"
- },
- {
- "name": "windows_options_run_as_user_name",
- "type": "TEXT"
- },
- {
- "name": "seccomp_profile_type",
- "type": "TEXT"
- },
- {
- "name": "seccomp_profile_localhost_profile",
- "type": "TEXT"
- },
- {
- "name": "run_as_user",
- "type": "BIGINT"
- },
- {
- "name": "run_as_group",
- "type": "BIGINT"
- },
- {
- "name": "run_as_non_root",
- "type": "INTEGER"
- },
- {
- "name": "capabilities_add",
- "type": "TEXT"
- },
- {
- "name": "capabilities_drop",
- "type": "TEXT"
- },
- {
- "name": "privileged",
- "type": "INTEGER"
- },
- {
- "name": "read_only_root_filesystem",
- "type": "INTEGER"
- },
- {
- "name": "allow_privilege_escalation",
- "type": "INTEGER"
- },
- {
- "name": "proc_mount",
- "type": "TEXT"
- },
- {
- "name": "target_container_name",
- "type": "TEXT"
- },
- {
- "name": "image",
- "type": "TEXT"
- },
- {
- "name": "command",
- "type": "TEXT"
- },
- {
- "name": "args",
- "type": "TEXT"
- },
- {
- "name": "working_dir",
- "type": "TEXT"
- },
- {
- "name": "ports",
- "type": "TEXT"
- },
- {
- "name": "env_from",
- "type": "TEXT"
- },
- {
- "name": "env",
- "type": "TEXT"
- },
- {
- "name": "resource_limits",
- "type": "TEXT"
- },
- {
- "name": "resource_requests",
- "type": "TEXT"
- },
- {
- "name": "volume_mounts",
- "type": "TEXT"
- },
- {
- "name": "volume_devices",
- "type": "TEXT"
- },
- {
- "name": "liveness_probe",
- "type": "TEXT"
- },
- {
- "name": "readiness_probe",
- "type": "TEXT"
- },
- {
- "name": "startup_probe",
- "type": "TEXT"
- },
- {
- "name": "lifecycle",
- "type": "TEXT"
- },
- {
- "name": "termination_message_path",
- "type": "TEXT"
- },
- {
- "name": "termination_message_policy",
- "type": "TEXT"
- },
- {
- "name": "image_pull_policy",
- "type": "TEXT"
- },
- {
- "name": "stdin",
- "type": "INTEGER"
- },
- {
- "name": "stdin_once",
- "type": "INTEGER"
- },
- {
- "name": "tty",
- "type": "INTEGER"
- },
- {
- "name": "deployment_name",
- "type": "TEXT"
- },
- {
- "name": "container_type",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_deployments_volumes",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "namespace",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "volume_type",
- "type": "TEXT"
- },
- {
- "name": "fs_type",
- "type": "TEXT"
- },
- {
- "name": "read_only",
- "type": "INTEGER"
- },
- {
- "name": "secret_name",
- "type": "TEXT"
- },
- {
- "name": "host_path_path",
- "type": "TEXT"
- },
- {
- "name": "host_path_type",
- "type": "TEXT"
- },
- {
- "name": "empty_dir_medium",
- "type": "TEXT"
- },
- {
- "name": "empty_dir_size_limit",
- "type": "TEXT"
- },
- {
- "name": "gce_persistent_disk_pd_name",
- "type": "TEXT"
- },
- {
- "name": "gce_persistent_disk_partition",
- "type": "INTEGER"
- },
- {
- "name": "aws_elastic_block_store_volume_id",
- "type": "TEXT"
- },
- {
- "name": "aws_elastic_block_store_partition",
- "type": "INTEGER"
- },
- {
- "name": "git_repo_repository",
- "type": "TEXT"
- },
- {
- "name": "git_repo_revision",
- "type": "TEXT"
- },
- {
- "name": "git_repo_directory",
- "type": "TEXT"
- },
- {
- "name": "secret_items",
- "type": "TEXT"
- },
- {
- "name": "secret_default_mode",
- "type": "INTEGER"
- },
- {
- "name": "secret_optional",
- "type": "INTEGER"
- },
- {
- "name": "nfs_server",
- "type": "TEXT"
- },
- {
- "name": "nfs_path",
- "type": "TEXT"
- },
- {
- "name": "iscsi_target_portal",
- "type": "TEXT"
- },
- {
- "name": "iscsi_iqn",
- "type": "TEXT"
- },
- {
- "name": "iscsi_lun",
- "type": "INTEGER"
- },
- {
- "name": "iscsi_interface",
- "type": "TEXT"
- },
- {
- "name": "iscsi_portals",
- "type": "TEXT"
- },
- {
- "name": "iscsi_discovery_chap_auth",
- "type": "INTEGER"
- },
- {
- "name": "iscsi_session_chap_auth",
- "type": "INTEGER"
- },
- {
- "name": "iscsi_initiator_name",
- "type": "TEXT"
- },
- {
- "name": "glusterfs_endpoints_name",
- "type": "TEXT"
- },
- {
- "name": "glusterfs_path",
- "type": "TEXT"
- },
- {
- "name": "persistent_volume_claim_name",
- "type": "TEXT"
- },
- {
- "name": "rbd_ceph_monitors",
- "type": "TEXT"
- },
- {
- "name": "rbd_image",
- "type": "TEXT"
- },
- {
- "name": "rbd_pool",
- "type": "TEXT"
- },
- {
- "name": "rbd_rados_user",
- "type": "TEXT"
- },
- {
- "name": "rbd_keyring",
- "type": "TEXT"
- },
- {
- "name": "flex_volume_driver",
- "type": "TEXT"
- },
- {
- "name": "flex_volume_options",
- "type": "TEXT"
- },
- {
- "name": "cinder_volume_id",
- "type": "TEXT"
- },
- {
- "name": "ceph_fs_monitors",
- "type": "TEXT"
- },
- {
- "name": "ceph_fs_path",
- "type": "TEXT"
- },
- {
- "name": "ceph_fs_user",
- "type": "TEXT"
- },
- {
- "name": "ceph_fs_secret_file",
- "type": "TEXT"
- },
- {
- "name": "flocker_dataset_name",
- "type": "TEXT"
- },
- {
- "name": "flocker_dataset_uuid",
- "type": "TEXT"
- },
- {
- "name": "downward_api_items",
- "type": "TEXT"
- },
- {
- "name": "downward_api_default_mode",
- "type": "INTEGER"
- },
- {
- "name": "fc_target_ww_ns",
- "type": "TEXT"
- },
- {
- "name": "fc_lun",
- "type": "INTEGER"
- },
- {
- "name": "fc_ww_ids",
- "type": "TEXT"
- },
- {
- "name": "azure_file_share_name",
- "type": "TEXT"
- },
- {
- "name": "config_map_name",
- "type": "TEXT"
- },
- {
- "name": "config_map_items",
- "type": "TEXT"
- },
- {
- "name": "config_map_default_mode",
- "type": "INTEGER"
- },
- {
- "name": "config_map_optional",
- "type": "INTEGER"
- },
- {
- "name": "vsphere_volume_volume_path",
- "type": "TEXT"
- },
- {
- "name": "vsphere_volume_storage_policy_name",
- "type": "TEXT"
- },
- {
- "name": "vsphere_volume_storage_policy_id",
- "type": "TEXT"
- },
- {
- "name": "quobyte_registry",
- "type": "TEXT"
- },
- {
- "name": "quobyte_volume",
- "type": "TEXT"
- },
- {
- "name": "quobyte_user",
- "type": "TEXT"
- },
- {
- "name": "quobyte_group",
- "type": "TEXT"
- },
- {
- "name": "quobyte_tenant",
- "type": "TEXT"
- },
- {
- "name": "azure_disk_disk_name",
- "type": "TEXT"
- },
- {
- "name": "azure_disk_data_disk_uri",
- "type": "TEXT"
- },
- {
- "name": "azure_disk_caching_mode",
- "type": "TEXT"
- },
- {
- "name": "azure_disk_kind",
- "type": "TEXT"
- },
- {
- "name": "photon_persistent_disk_pd_id",
- "type": "TEXT"
- },
- {
- "name": "projected_sources",
- "type": "TEXT"
- },
- {
- "name": "projected_default_mode",
- "type": "INTEGER"
- },
- {
- "name": "portworx_volume_id",
- "type": "TEXT"
- },
- {
- "name": "scale_io_gateway",
- "type": "TEXT"
- },
- {
- "name": "scale_io_system",
- "type": "TEXT"
- },
- {
- "name": "scale_iossl_enabled",
- "type": "INTEGER"
- },
- {
- "name": "scale_io_protection_domain",
- "type": "TEXT"
- },
- {
- "name": "scale_io_storage_pool",
- "type": "TEXT"
- },
- {
- "name": "scale_io_storage_mode",
- "type": "TEXT"
- },
- {
- "name": "scale_io_volume_name",
- "type": "TEXT"
- },
- {
- "name": "storage_os_volume_name",
- "type": "TEXT"
- },
- {
- "name": "storage_os_volume_namespace",
- "type": "TEXT"
- },
- {
- "name": "csi_driver",
- "type": "TEXT"
- },
- {
- "name": "csi_volume_attributes",
- "type": "TEXT"
- },
- {
- "name": "ephemeral_volume_claim_template",
- "type": "TEXT"
- },
- {
- "name": "deployment_name",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_replica_sets",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "namespace",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_user",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_role",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_type",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_level",
- "type": "TEXT"
- },
- {
- "name": "windows_options_gmsa_credential_spec_name",
- "type": "TEXT"
- },
- {
- "name": "windows_options_gmsa_credential_spec",
- "type": "TEXT"
- },
- {
- "name": "windows_options_run_as_user_name",
- "type": "TEXT"
- },
- {
- "name": "seccomp_profile_type",
- "type": "TEXT"
- },
- {
- "name": "seccomp_profile_localhost_profile",
- "type": "TEXT"
- },
- {
- "name": "run_as_user",
- "type": "BIGINT"
- },
- {
- "name": "run_as_group",
- "type": "BIGINT"
- },
- {
- "name": "run_as_non_root",
- "type": "INTEGER"
- },
- {
- "name": "supplemental_groups",
- "type": "TEXT"
- },
- {
- "name": "fs_group",
- "type": "BIGINT"
- },
- {
- "name": "sysctls",
- "type": "TEXT"
- },
- {
- "name": "fs_group_change_policy",
- "type": "TEXT"
- },
- {
- "name": "node_affinity",
- "type": "TEXT"
- },
- {
- "name": "pod_affinity",
- "type": "TEXT"
- },
- {
- "name": "pod_anti_affinity",
- "type": "TEXT"
- },
- {
- "name": "dns_config_nameservers",
- "type": "TEXT"
- },
- {
- "name": "dns_config_searches",
- "type": "TEXT"
- },
- {
- "name": "dns_config_options",
- "type": "TEXT"
- },
- {
- "name": "node_selector",
- "type": "TEXT"
- },
- {
- "name": "restart_policy",
- "type": "TEXT"
- },
- {
- "name": "termination_grace_period_seconds",
- "type": "BIGINT"
- },
- {
- "name": "active_deadline_seconds",
- "type": "BIGINT"
- },
- {
- "name": "dns_policy",
- "type": "TEXT"
- },
- {
- "name": "service_account_name",
- "type": "TEXT"
- },
- {
- "name": "automount_service_account_token",
- "type": "INTEGER"
- },
- {
- "name": "node_name",
- "type": "TEXT"
- },
- {
- "name": "host_network",
- "type": "INTEGER"
- },
- {
- "name": "host_pid",
- "type": "INTEGER"
- },
- {
- "name": "host_ipc",
- "type": "INTEGER"
- },
- {
- "name": "share_process_namespace",
- "type": "INTEGER"
- },
- {
- "name": "image_pull_secrets",
- "type": "TEXT"
- },
- {
- "name": "hostname",
- "type": "TEXT"
- },
- {
- "name": "subdomain",
- "type": "TEXT"
- },
- {
- "name": "scheduler_name",
- "type": "TEXT"
- },
- {
- "name": "tolerations",
- "type": "TEXT"
- },
- {
- "name": "host_aliases",
- "type": "TEXT"
- },
- {
- "name": "priority_class_name",
- "type": "TEXT"
- },
- {
- "name": "priority",
- "type": "INTEGER"
- },
- {
- "name": "readiness_gates",
- "type": "TEXT"
- },
- {
- "name": "runtime_class_name",
- "type": "TEXT"
- },
- {
- "name": "enable_service_links",
- "type": "INTEGER"
- },
- {
- "name": "preemption_policy",
- "type": "TEXT"
- },
- {
- "name": "overhead",
- "type": "TEXT"
- },
- {
- "name": "topology_spread_constraints",
- "type": "TEXT"
- },
- {
- "name": "set_hostname_as_fqdn",
- "type": "INTEGER"
- },
- {
- "name": "replicas",
- "type": "INTEGER"
- },
- {
- "name": "fully_labeled_replicas",
- "type": "INTEGER"
- },
- {
- "name": "ready_replicas",
- "type": "INTEGER"
- },
- {
- "name": "available_replicas",
- "type": "INTEGER"
- },
- {
- "name": "observed_generation",
- "type": "BIGINT"
- },
- {
- "name": "conditions",
- "type": "TEXT"
- },
- {
- "name": "replica_set_replicas",
- "type": "INTEGER"
- },
- {
- "name": "min_ready_seconds",
- "type": "INTEGER"
- },
- {
- "name": "selector",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_replica_set_containers",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "namespace",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_user",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_role",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_type",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_level",
- "type": "TEXT"
- },
- {
- "name": "windows_options_gmsa_credential_spec_name",
- "type": "TEXT"
- },
- {
- "name": "windows_options_gmsa_credential_spec",
- "type": "TEXT"
- },
- {
- "name": "windows_options_run_as_user_name",
- "type": "TEXT"
- },
- {
- "name": "seccomp_profile_type",
- "type": "TEXT"
- },
- {
- "name": "seccomp_profile_localhost_profile",
- "type": "TEXT"
- },
- {
- "name": "run_as_user",
- "type": "BIGINT"
- },
- {
- "name": "run_as_group",
- "type": "BIGINT"
- },
- {
- "name": "run_as_non_root",
- "type": "INTEGER"
- },
- {
- "name": "capabilities_add",
- "type": "TEXT"
- },
- {
- "name": "capabilities_drop",
- "type": "TEXT"
- },
- {
- "name": "privileged",
- "type": "INTEGER"
- },
- {
- "name": "read_only_root_filesystem",
- "type": "INTEGER"
- },
- {
- "name": "allow_privilege_escalation",
- "type": "INTEGER"
- },
- {
- "name": "proc_mount",
- "type": "TEXT"
- },
- {
- "name": "target_container_name",
- "type": "TEXT"
- },
- {
- "name": "image",
- "type": "TEXT"
- },
- {
- "name": "command",
- "type": "TEXT"
- },
- {
- "name": "args",
- "type": "TEXT"
- },
- {
- "name": "working_dir",
- "type": "TEXT"
- },
- {
- "name": "ports",
- "type": "TEXT"
- },
- {
- "name": "env_from",
- "type": "TEXT"
- },
- {
- "name": "env",
- "type": "TEXT"
- },
- {
- "name": "resource_limits",
- "type": "TEXT"
- },
- {
- "name": "resource_requests",
- "type": "TEXT"
- },
- {
- "name": "volume_mounts",
- "type": "TEXT"
- },
- {
- "name": "volume_devices",
- "type": "TEXT"
- },
- {
- "name": "liveness_probe",
- "type": "TEXT"
- },
- {
- "name": "readiness_probe",
- "type": "TEXT"
- },
- {
- "name": "startup_probe",
- "type": "TEXT"
- },
- {
- "name": "lifecycle",
- "type": "TEXT"
- },
- {
- "name": "termination_message_path",
- "type": "TEXT"
- },
- {
- "name": "termination_message_policy",
- "type": "TEXT"
- },
- {
- "name": "image_pull_policy",
- "type": "TEXT"
- },
- {
- "name": "stdin",
- "type": "INTEGER"
- },
- {
- "name": "stdin_once",
- "type": "INTEGER"
- },
- {
- "name": "tty",
- "type": "INTEGER"
- },
- {
- "name": "replica_set_name",
- "type": "TEXT"
- },
- {
- "name": "container_type",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_replica_set_volumes",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "namespace",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "volume_type",
- "type": "TEXT"
- },
- {
- "name": "fs_type",
- "type": "TEXT"
- },
- {
- "name": "read_only",
- "type": "INTEGER"
- },
- {
- "name": "secret_name",
- "type": "TEXT"
- },
- {
- "name": "host_path_path",
- "type": "TEXT"
- },
- {
- "name": "host_path_type",
- "type": "TEXT"
- },
- {
- "name": "empty_dir_medium",
- "type": "TEXT"
- },
- {
- "name": "empty_dir_size_limit",
- "type": "TEXT"
- },
- {
- "name": "gce_persistent_disk_pd_name",
- "type": "TEXT"
- },
- {
- "name": "gce_persistent_disk_partition",
- "type": "INTEGER"
- },
- {
- "name": "aws_elastic_block_store_volume_id",
- "type": "TEXT"
- },
- {
- "name": "aws_elastic_block_store_partition",
- "type": "INTEGER"
- },
- {
- "name": "git_repo_repository",
- "type": "TEXT"
- },
- {
- "name": "git_repo_revision",
- "type": "TEXT"
- },
- {
- "name": "git_repo_directory",
- "type": "TEXT"
- },
- {
- "name": "secret_items",
- "type": "TEXT"
- },
- {
- "name": "secret_default_mode",
- "type": "INTEGER"
- },
- {
- "name": "secret_optional",
- "type": "INTEGER"
- },
- {
- "name": "nfs_server",
- "type": "TEXT"
- },
- {
- "name": "nfs_path",
- "type": "TEXT"
- },
- {
- "name": "iscsi_target_portal",
- "type": "TEXT"
- },
- {
- "name": "iscsi_iqn",
- "type": "TEXT"
- },
- {
- "name": "iscsi_lun",
- "type": "INTEGER"
- },
- {
- "name": "iscsi_interface",
- "type": "TEXT"
- },
- {
- "name": "iscsi_portals",
- "type": "TEXT"
- },
- {
- "name": "iscsi_discovery_chap_auth",
- "type": "INTEGER"
- },
- {
- "name": "iscsi_session_chap_auth",
- "type": "INTEGER"
- },
- {
- "name": "iscsi_initiator_name",
- "type": "TEXT"
- },
- {
- "name": "glusterfs_endpoints_name",
- "type": "TEXT"
- },
- {
- "name": "glusterfs_path",
- "type": "TEXT"
- },
- {
- "name": "persistent_volume_claim_name",
- "type": "TEXT"
- },
- {
- "name": "rbd_ceph_monitors",
- "type": "TEXT"
- },
- {
- "name": "rbd_image",
- "type": "TEXT"
- },
- {
- "name": "rbd_pool",
- "type": "TEXT"
- },
- {
- "name": "rbd_rados_user",
- "type": "TEXT"
- },
- {
- "name": "rbd_keyring",
- "type": "TEXT"
- },
- {
- "name": "flex_volume_driver",
- "type": "TEXT"
- },
- {
- "name": "flex_volume_options",
- "type": "TEXT"
- },
- {
- "name": "cinder_volume_id",
- "type": "TEXT"
- },
- {
- "name": "ceph_fs_monitors",
- "type": "TEXT"
- },
- {
- "name": "ceph_fs_path",
- "type": "TEXT"
- },
- {
- "name": "ceph_fs_user",
- "type": "TEXT"
- },
- {
- "name": "ceph_fs_secret_file",
- "type": "TEXT"
- },
- {
- "name": "flocker_dataset_name",
- "type": "TEXT"
- },
- {
- "name": "flocker_dataset_uuid",
- "type": "TEXT"
- },
- {
- "name": "downward_api_items",
- "type": "TEXT"
- },
- {
- "name": "downward_api_default_mode",
- "type": "INTEGER"
- },
- {
- "name": "fc_target_ww_ns",
- "type": "TEXT"
- },
- {
- "name": "fc_lun",
- "type": "INTEGER"
- },
- {
- "name": "fc_ww_ids",
- "type": "TEXT"
- },
- {
- "name": "azure_file_share_name",
- "type": "TEXT"
- },
- {
- "name": "config_map_name",
- "type": "TEXT"
- },
- {
- "name": "config_map_items",
- "type": "TEXT"
- },
- {
- "name": "config_map_default_mode",
- "type": "INTEGER"
- },
- {
- "name": "config_map_optional",
- "type": "INTEGER"
- },
- {
- "name": "vsphere_volume_volume_path",
- "type": "TEXT"
- },
- {
- "name": "vsphere_volume_storage_policy_name",
- "type": "TEXT"
- },
- {
- "name": "vsphere_volume_storage_policy_id",
- "type": "TEXT"
- },
- {
- "name": "quobyte_registry",
- "type": "TEXT"
- },
- {
- "name": "quobyte_volume",
- "type": "TEXT"
- },
- {
- "name": "quobyte_user",
- "type": "TEXT"
- },
- {
- "name": "quobyte_group",
- "type": "TEXT"
- },
- {
- "name": "quobyte_tenant",
- "type": "TEXT"
- },
- {
- "name": "azure_disk_disk_name",
- "type": "TEXT"
- },
- {
- "name": "azure_disk_data_disk_uri",
- "type": "TEXT"
- },
- {
- "name": "azure_disk_caching_mode",
- "type": "TEXT"
- },
- {
- "name": "azure_disk_kind",
- "type": "TEXT"
- },
- {
- "name": "photon_persistent_disk_pd_id",
- "type": "TEXT"
- },
- {
- "name": "projected_sources",
- "type": "TEXT"
- },
- {
- "name": "projected_default_mode",
- "type": "INTEGER"
- },
- {
- "name": "portworx_volume_id",
- "type": "TEXT"
- },
- {
- "name": "scale_io_gateway",
- "type": "TEXT"
- },
- {
- "name": "scale_io_system",
- "type": "TEXT"
- },
- {
- "name": "scale_iossl_enabled",
- "type": "INTEGER"
- },
- {
- "name": "scale_io_protection_domain",
- "type": "TEXT"
- },
- {
- "name": "scale_io_storage_pool",
- "type": "TEXT"
- },
- {
- "name": "scale_io_storage_mode",
- "type": "TEXT"
- },
- {
- "name": "scale_io_volume_name",
- "type": "TEXT"
- },
- {
- "name": "storage_os_volume_name",
- "type": "TEXT"
- },
- {
- "name": "storage_os_volume_namespace",
- "type": "TEXT"
- },
- {
- "name": "csi_driver",
- "type": "TEXT"
- },
- {
- "name": "csi_volume_attributes",
- "type": "TEXT"
- },
- {
- "name": "ephemeral_volume_claim_template",
- "type": "TEXT"
- },
- {
- "name": "replica_set_name",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_stateful_sets",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "namespace",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_user",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_role",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_type",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_level",
- "type": "TEXT"
- },
- {
- "name": "windows_options_gmsa_credential_spec_name",
- "type": "TEXT"
- },
- {
- "name": "windows_options_gmsa_credential_spec",
- "type": "TEXT"
- },
- {
- "name": "windows_options_run_as_user_name",
- "type": "TEXT"
- },
- {
- "name": "seccomp_profile_type",
- "type": "TEXT"
- },
- {
- "name": "seccomp_profile_localhost_profile",
- "type": "TEXT"
- },
- {
- "name": "run_as_user",
- "type": "BIGINT"
- },
- {
- "name": "run_as_group",
- "type": "BIGINT"
- },
- {
- "name": "run_as_non_root",
- "type": "INTEGER"
- },
- {
- "name": "supplemental_groups",
- "type": "TEXT"
- },
- {
- "name": "fs_group",
- "type": "BIGINT"
- },
- {
- "name": "sysctls",
- "type": "TEXT"
- },
- {
- "name": "fs_group_change_policy",
- "type": "TEXT"
- },
- {
- "name": "node_affinity",
- "type": "TEXT"
- },
- {
- "name": "pod_affinity",
- "type": "TEXT"
- },
- {
- "name": "pod_anti_affinity",
- "type": "TEXT"
- },
- {
- "name": "dns_config_nameservers",
- "type": "TEXT"
- },
- {
- "name": "dns_config_searches",
- "type": "TEXT"
- },
- {
- "name": "dns_config_options",
- "type": "TEXT"
- },
- {
- "name": "node_selector",
- "type": "TEXT"
- },
- {
- "name": "restart_policy",
- "type": "TEXT"
- },
- {
- "name": "termination_grace_period_seconds",
- "type": "BIGINT"
- },
- {
- "name": "active_deadline_seconds",
- "type": "BIGINT"
- },
- {
- "name": "dns_policy",
- "type": "TEXT"
- },
- {
- "name": "service_account_name",
- "type": "TEXT"
- },
- {
- "name": "automount_service_account_token",
- "type": "INTEGER"
- },
- {
- "name": "node_name",
- "type": "TEXT"
- },
- {
- "name": "host_network",
- "type": "INTEGER"
- },
- {
- "name": "host_pid",
- "type": "INTEGER"
- },
- {
- "name": "host_ipc",
- "type": "INTEGER"
- },
- {
- "name": "share_process_namespace",
- "type": "INTEGER"
- },
- {
- "name": "image_pull_secrets",
- "type": "TEXT"
- },
- {
- "name": "hostname",
- "type": "TEXT"
- },
- {
- "name": "subdomain",
- "type": "TEXT"
- },
- {
- "name": "scheduler_name",
- "type": "TEXT"
- },
- {
- "name": "tolerations",
- "type": "TEXT"
- },
- {
- "name": "host_aliases",
- "type": "TEXT"
- },
- {
- "name": "priority_class_name",
- "type": "TEXT"
- },
- {
- "name": "priority",
- "type": "INTEGER"
- },
- {
- "name": "readiness_gates",
- "type": "TEXT"
- },
- {
- "name": "runtime_class_name",
- "type": "TEXT"
- },
- {
- "name": "enable_service_links",
- "type": "INTEGER"
- },
- {
- "name": "preemption_policy",
- "type": "TEXT"
- },
- {
- "name": "overhead",
- "type": "TEXT"
- },
- {
- "name": "topology_spread_constraints",
- "type": "TEXT"
- },
- {
- "name": "set_hostname_as_fqdn",
- "type": "INTEGER"
- },
- {
- "name": "observed_generation",
- "type": "BIGINT"
- },
- {
- "name": "replicas",
- "type": "INTEGER"
- },
- {
- "name": "ready_replicas",
- "type": "INTEGER"
- },
- {
- "name": "current_replicas",
- "type": "INTEGER"
- },
- {
- "name": "updated_replicas",
- "type": "INTEGER"
- },
- {
- "name": "current_revision",
- "type": "TEXT"
- },
- {
- "name": "update_revision",
- "type": "TEXT"
- },
- {
- "name": "collision_count",
- "type": "INTEGER"
- },
- {
- "name": "conditions",
- "type": "TEXT"
- },
- {
- "name": "available_replicas",
- "type": "INTEGER"
- },
- {
- "name": "stateful_set_replicas",
- "type": "INTEGER"
- },
- {
- "name": "selector",
- "type": "TEXT"
- },
- {
- "name": "volume_claim_templates",
- "type": "TEXT"
- },
- {
- "name": "service_name",
- "type": "TEXT"
- },
- {
- "name": "pod_management_policy",
- "type": "TEXT"
- },
- {
- "name": "update_strategy",
- "type": "TEXT"
- },
- {
- "name": "revision_history_limit",
- "type": "INTEGER"
- }
- ]
- },
- {
- "name": "kubernetes_stateful_set_containers",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "namespace",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_user",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_role",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_type",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_level",
- "type": "TEXT"
- },
- {
- "name": "windows_options_gmsa_credential_spec_name",
- "type": "TEXT"
- },
- {
- "name": "windows_options_gmsa_credential_spec",
- "type": "TEXT"
- },
- {
- "name": "windows_options_run_as_user_name",
- "type": "TEXT"
- },
- {
- "name": "seccomp_profile_type",
- "type": "TEXT"
- },
- {
- "name": "seccomp_profile_localhost_profile",
- "type": "TEXT"
- },
- {
- "name": "run_as_user",
- "type": "BIGINT"
- },
- {
- "name": "run_as_group",
- "type": "BIGINT"
- },
- {
- "name": "run_as_non_root",
- "type": "INTEGER"
- },
- {
- "name": "capabilities_add",
- "type": "TEXT"
- },
- {
- "name": "capabilities_drop",
- "type": "TEXT"
- },
- {
- "name": "privileged",
- "type": "INTEGER"
- },
- {
- "name": "read_only_root_filesystem",
- "type": "INTEGER"
- },
- {
- "name": "allow_privilege_escalation",
- "type": "INTEGER"
- },
- {
- "name": "proc_mount",
- "type": "TEXT"
- },
- {
- "name": "target_container_name",
- "type": "TEXT"
- },
- {
- "name": "image",
- "type": "TEXT"
- },
- {
- "name": "command",
- "type": "TEXT"
- },
- {
- "name": "args",
- "type": "TEXT"
- },
- {
- "name": "working_dir",
- "type": "TEXT"
- },
- {
- "name": "ports",
- "type": "TEXT"
- },
- {
- "name": "env_from",
- "type": "TEXT"
- },
- {
- "name": "env",
- "type": "TEXT"
- },
- {
- "name": "resource_limits",
- "type": "TEXT"
- },
- {
- "name": "resource_requests",
- "type": "TEXT"
- },
- {
- "name": "volume_mounts",
- "type": "TEXT"
- },
- {
- "name": "volume_devices",
- "type": "TEXT"
- },
- {
- "name": "liveness_probe",
- "type": "TEXT"
- },
- {
- "name": "readiness_probe",
- "type": "TEXT"
- },
- {
- "name": "startup_probe",
- "type": "TEXT"
- },
- {
- "name": "lifecycle",
- "type": "TEXT"
- },
- {
- "name": "termination_message_path",
- "type": "TEXT"
- },
- {
- "name": "termination_message_policy",
- "type": "TEXT"
- },
- {
- "name": "image_pull_policy",
- "type": "TEXT"
- },
- {
- "name": "stdin",
- "type": "INTEGER"
- },
- {
- "name": "stdin_once",
- "type": "INTEGER"
- },
- {
- "name": "tty",
- "type": "INTEGER"
- },
- {
- "name": "stateful_set_name",
- "type": "TEXT"
- },
- {
- "name": "container_type",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_stateful_set_volumes",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "namespace",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "volume_type",
- "type": "TEXT"
- },
- {
- "name": "fs_type",
- "type": "TEXT"
- },
- {
- "name": "read_only",
- "type": "INTEGER"
- },
- {
- "name": "secret_name",
- "type": "TEXT"
- },
- {
- "name": "host_path_path",
- "type": "TEXT"
- },
- {
- "name": "host_path_type",
- "type": "TEXT"
- },
- {
- "name": "empty_dir_medium",
- "type": "TEXT"
- },
- {
- "name": "empty_dir_size_limit",
- "type": "TEXT"
- },
- {
- "name": "gce_persistent_disk_pd_name",
- "type": "TEXT"
- },
- {
- "name": "gce_persistent_disk_partition",
- "type": "INTEGER"
- },
- {
- "name": "aws_elastic_block_store_volume_id",
- "type": "TEXT"
- },
- {
- "name": "aws_elastic_block_store_partition",
- "type": "INTEGER"
- },
- {
- "name": "git_repo_repository",
- "type": "TEXT"
- },
- {
- "name": "git_repo_revision",
- "type": "TEXT"
- },
- {
- "name": "git_repo_directory",
- "type": "TEXT"
- },
- {
- "name": "secret_items",
- "type": "TEXT"
- },
- {
- "name": "secret_default_mode",
- "type": "INTEGER"
- },
- {
- "name": "secret_optional",
- "type": "INTEGER"
- },
- {
- "name": "nfs_server",
- "type": "TEXT"
- },
- {
- "name": "nfs_path",
- "type": "TEXT"
- },
- {
- "name": "iscsi_target_portal",
- "type": "TEXT"
- },
- {
- "name": "iscsi_iqn",
- "type": "TEXT"
- },
- {
- "name": "iscsi_lun",
- "type": "INTEGER"
- },
- {
- "name": "iscsi_interface",
- "type": "TEXT"
- },
- {
- "name": "iscsi_portals",
- "type": "TEXT"
- },
- {
- "name": "iscsi_discovery_chap_auth",
- "type": "INTEGER"
- },
- {
- "name": "iscsi_session_chap_auth",
- "type": "INTEGER"
- },
- {
- "name": "iscsi_initiator_name",
- "type": "TEXT"
- },
- {
- "name": "glusterfs_endpoints_name",
- "type": "TEXT"
- },
- {
- "name": "glusterfs_path",
- "type": "TEXT"
- },
- {
- "name": "persistent_volume_claim_name",
- "type": "TEXT"
- },
- {
- "name": "rbd_ceph_monitors",
- "type": "TEXT"
- },
- {
- "name": "rbd_image",
- "type": "TEXT"
- },
- {
- "name": "rbd_pool",
- "type": "TEXT"
- },
- {
- "name": "rbd_rados_user",
- "type": "TEXT"
- },
- {
- "name": "rbd_keyring",
- "type": "TEXT"
- },
- {
- "name": "flex_volume_driver",
- "type": "TEXT"
- },
- {
- "name": "flex_volume_options",
- "type": "TEXT"
- },
- {
- "name": "cinder_volume_id",
- "type": "TEXT"
- },
- {
- "name": "ceph_fs_monitors",
- "type": "TEXT"
- },
- {
- "name": "ceph_fs_path",
- "type": "TEXT"
- },
- {
- "name": "ceph_fs_user",
- "type": "TEXT"
- },
- {
- "name": "ceph_fs_secret_file",
- "type": "TEXT"
- },
- {
- "name": "flocker_dataset_name",
- "type": "TEXT"
- },
- {
- "name": "flocker_dataset_uuid",
- "type": "TEXT"
- },
- {
- "name": "downward_api_items",
- "type": "TEXT"
- },
- {
- "name": "downward_api_default_mode",
- "type": "INTEGER"
- },
- {
- "name": "fc_target_ww_ns",
- "type": "TEXT"
- },
- {
- "name": "fc_lun",
- "type": "INTEGER"
- },
- {
- "name": "fc_ww_ids",
- "type": "TEXT"
- },
- {
- "name": "azure_file_share_name",
- "type": "TEXT"
- },
- {
- "name": "config_map_name",
- "type": "TEXT"
- },
- {
- "name": "config_map_items",
- "type": "TEXT"
- },
- {
- "name": "config_map_default_mode",
- "type": "INTEGER"
- },
- {
- "name": "config_map_optional",
- "type": "INTEGER"
- },
- {
- "name": "vsphere_volume_volume_path",
- "type": "TEXT"
- },
- {
- "name": "vsphere_volume_storage_policy_name",
- "type": "TEXT"
- },
- {
- "name": "vsphere_volume_storage_policy_id",
- "type": "TEXT"
- },
- {
- "name": "quobyte_registry",
- "type": "TEXT"
- },
- {
- "name": "quobyte_volume",
- "type": "TEXT"
- },
- {
- "name": "quobyte_user",
- "type": "TEXT"
- },
- {
- "name": "quobyte_group",
- "type": "TEXT"
- },
- {
- "name": "quobyte_tenant",
- "type": "TEXT"
- },
- {
- "name": "azure_disk_disk_name",
- "type": "TEXT"
- },
- {
- "name": "azure_disk_data_disk_uri",
- "type": "TEXT"
- },
- {
- "name": "azure_disk_caching_mode",
- "type": "TEXT"
- },
- {
- "name": "azure_disk_kind",
- "type": "TEXT"
- },
- {
- "name": "photon_persistent_disk_pd_id",
- "type": "TEXT"
- },
- {
- "name": "projected_sources",
- "type": "TEXT"
- },
- {
- "name": "projected_default_mode",
- "type": "INTEGER"
- },
- {
- "name": "portworx_volume_id",
- "type": "TEXT"
- },
- {
- "name": "scale_io_gateway",
- "type": "TEXT"
- },
- {
- "name": "scale_io_system",
- "type": "TEXT"
- },
- {
- "name": "scale_iossl_enabled",
- "type": "INTEGER"
- },
- {
- "name": "scale_io_protection_domain",
- "type": "TEXT"
- },
- {
- "name": "scale_io_storage_pool",
- "type": "TEXT"
- },
- {
- "name": "scale_io_storage_mode",
- "type": "TEXT"
- },
- {
- "name": "scale_io_volume_name",
- "type": "TEXT"
- },
- {
- "name": "storage_os_volume_name",
- "type": "TEXT"
- },
- {
- "name": "storage_os_volume_namespace",
- "type": "TEXT"
- },
- {
- "name": "csi_driver",
- "type": "TEXT"
- },
- {
- "name": "csi_volume_attributes",
- "type": "TEXT"
- },
- {
- "name": "ephemeral_volume_claim_template",
- "type": "TEXT"
- },
- {
- "name": "stateful_set_name",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_horizontal_pod_autoscalers",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "namespace",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "scale_target_ref",
- "type": "TEXT"
- },
- {
- "name": "min_replicas",
- "type": "INTEGER"
- },
- {
- "name": "max_replicas",
- "type": "INTEGER"
- },
- {
- "name": "target_cpu_utilization_percentage",
- "type": "INTEGER"
- },
- {
- "name": "observed_generation",
- "type": "BIGINT"
- },
- {
- "name": "last_scale_time",
- "type": "BIGINT"
- },
- {
- "name": "current_replicas",
- "type": "INTEGER"
- },
- {
- "name": "desired_replicas",
- "type": "INTEGER"
- },
- {
- "name": "current_cpu_utilization_percentage",
- "type": "INTEGER"
- }
- ]
- },
- {
- "name": "kubernetes_cron_jobs",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "namespace",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_user",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_role",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_type",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_level",
- "type": "TEXT"
- },
- {
- "name": "windows_options_gmsa_credential_spec_name",
- "type": "TEXT"
- },
- {
- "name": "windows_options_gmsa_credential_spec",
- "type": "TEXT"
- },
- {
- "name": "windows_options_run_as_user_name",
- "type": "TEXT"
- },
- {
- "name": "seccomp_profile_type",
- "type": "TEXT"
- },
- {
- "name": "seccomp_profile_localhost_profile",
- "type": "TEXT"
- },
- {
- "name": "run_as_user",
- "type": "BIGINT"
- },
- {
- "name": "run_as_group",
- "type": "BIGINT"
- },
- {
- "name": "run_as_non_root",
- "type": "INTEGER"
- },
- {
- "name": "supplemental_groups",
- "type": "TEXT"
- },
- {
- "name": "fs_group",
- "type": "BIGINT"
- },
- {
- "name": "sysctls",
- "type": "TEXT"
- },
- {
- "name": "fs_group_change_policy",
- "type": "TEXT"
- },
- {
- "name": "node_affinity",
- "type": "TEXT"
- },
- {
- "name": "pod_affinity",
- "type": "TEXT"
- },
- {
- "name": "pod_anti_affinity",
- "type": "TEXT"
- },
- {
- "name": "dns_config_nameservers",
- "type": "TEXT"
- },
- {
- "name": "dns_config_searches",
- "type": "TEXT"
- },
- {
- "name": "dns_config_options",
- "type": "TEXT"
- },
- {
- "name": "node_selector",
- "type": "TEXT"
- },
- {
- "name": "restart_policy",
- "type": "TEXT"
- },
- {
- "name": "termination_grace_period_seconds",
- "type": "BIGINT"
- },
- {
- "name": "active_deadline_seconds",
- "type": "BIGINT"
- },
- {
- "name": "dns_policy",
- "type": "TEXT"
- },
- {
- "name": "service_account_name",
- "type": "TEXT"
- },
- {
- "name": "automount_service_account_token",
- "type": "INTEGER"
- },
- {
- "name": "node_name",
- "type": "TEXT"
- },
- {
- "name": "host_network",
- "type": "INTEGER"
- },
- {
- "name": "host_pid",
- "type": "INTEGER"
- },
- {
- "name": "host_ipc",
- "type": "INTEGER"
- },
- {
- "name": "share_process_namespace",
- "type": "INTEGER"
- },
- {
- "name": "image_pull_secrets",
- "type": "TEXT"
- },
- {
- "name": "hostname",
- "type": "TEXT"
- },
- {
- "name": "subdomain",
- "type": "TEXT"
- },
- {
- "name": "scheduler_name",
- "type": "TEXT"
- },
- {
- "name": "tolerations",
- "type": "TEXT"
- },
- {
- "name": "host_aliases",
- "type": "TEXT"
- },
- {
- "name": "priority_class_name",
- "type": "TEXT"
- },
- {
- "name": "priority",
- "type": "INTEGER"
- },
- {
- "name": "readiness_gates",
- "type": "TEXT"
- },
- {
- "name": "runtime_class_name",
- "type": "TEXT"
- },
- {
- "name": "enable_service_links",
- "type": "INTEGER"
- },
- {
- "name": "preemption_policy",
- "type": "TEXT"
- },
- {
- "name": "overhead",
- "type": "TEXT"
- },
- {
- "name": "topology_spread_constraints",
- "type": "TEXT"
- },
- {
- "name": "set_hostname_as_fqdn",
- "type": "INTEGER"
- },
- {
- "name": "active",
- "type": "TEXT"
- },
- {
- "name": "last_schedule_time",
- "type": "BIGINT"
- },
- {
- "name": "last_successful_time",
- "type": "BIGINT"
- },
- {
- "name": "schedule",
- "type": "TEXT"
- },
- {
- "name": "starting_deadline_seconds",
- "type": "BIGINT"
- },
- {
- "name": "concurrency_policy",
- "type": "TEXT"
- },
- {
- "name": "suspend",
- "type": "INTEGER"
- },
- {
- "name": "successful_jobs_history_limit",
- "type": "INTEGER"
- },
- {
- "name": "failed_jobs_history_limit",
- "type": "INTEGER"
- },
- {
- "name": "parallelism",
- "type": "INTEGER"
- },
- {
- "name": "completions",
- "type": "INTEGER"
- },
- {
- "name": "job_active_deadline_seconds",
- "type": "BIGINT"
- },
- {
- "name": "backoff_limit",
- "type": "INTEGER"
- },
- {
- "name": "selector",
- "type": "TEXT"
- },
- {
- "name": "manual_selector",
- "type": "INTEGER"
- },
- {
- "name": "ttl_seconds_after_finished",
- "type": "INTEGER"
- }
- ]
- },
- {
- "name": "kubernetes_jobs",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "namespace",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_user",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_role",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_type",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_level",
- "type": "TEXT"
- },
- {
- "name": "windows_options_gmsa_credential_spec_name",
- "type": "TEXT"
- },
- {
- "name": "windows_options_gmsa_credential_spec",
- "type": "TEXT"
- },
- {
- "name": "windows_options_run_as_user_name",
- "type": "TEXT"
- },
- {
- "name": "seccomp_profile_type",
- "type": "TEXT"
- },
- {
- "name": "seccomp_profile_localhost_profile",
- "type": "TEXT"
- },
- {
- "name": "run_as_user",
- "type": "BIGINT"
- },
- {
- "name": "run_as_group",
- "type": "BIGINT"
- },
- {
- "name": "run_as_non_root",
- "type": "INTEGER"
- },
- {
- "name": "supplemental_groups",
- "type": "TEXT"
- },
- {
- "name": "fs_group",
- "type": "BIGINT"
- },
- {
- "name": "sysctls",
- "type": "TEXT"
- },
- {
- "name": "fs_group_change_policy",
- "type": "TEXT"
- },
- {
- "name": "node_affinity",
- "type": "TEXT"
- },
- {
- "name": "pod_affinity",
- "type": "TEXT"
- },
- {
- "name": "pod_anti_affinity",
- "type": "TEXT"
- },
- {
- "name": "dns_config_nameservers",
- "type": "TEXT"
- },
- {
- "name": "dns_config_searches",
- "type": "TEXT"
- },
- {
- "name": "dns_config_options",
- "type": "TEXT"
- },
- {
- "name": "node_selector",
- "type": "TEXT"
- },
- {
- "name": "restart_policy",
- "type": "TEXT"
- },
- {
- "name": "termination_grace_period_seconds",
- "type": "BIGINT"
- },
- {
- "name": "active_deadline_seconds",
- "type": "BIGINT"
- },
- {
- "name": "dns_policy",
- "type": "TEXT"
- },
- {
- "name": "service_account_name",
- "type": "TEXT"
- },
- {
- "name": "automount_service_account_token",
- "type": "INTEGER"
- },
- {
- "name": "node_name",
- "type": "TEXT"
- },
- {
- "name": "host_network",
- "type": "INTEGER"
- },
- {
- "name": "host_pid",
- "type": "INTEGER"
- },
- {
- "name": "host_ipc",
- "type": "INTEGER"
- },
- {
- "name": "share_process_namespace",
- "type": "INTEGER"
- },
- {
- "name": "image_pull_secrets",
- "type": "TEXT"
- },
- {
- "name": "hostname",
- "type": "TEXT"
- },
- {
- "name": "subdomain",
- "type": "TEXT"
- },
- {
- "name": "scheduler_name",
- "type": "TEXT"
- },
- {
- "name": "tolerations",
- "type": "TEXT"
- },
- {
- "name": "host_aliases",
- "type": "TEXT"
- },
- {
- "name": "priority_class_name",
- "type": "TEXT"
- },
- {
- "name": "priority",
- "type": "INTEGER"
- },
- {
- "name": "readiness_gates",
- "type": "TEXT"
- },
- {
- "name": "runtime_class_name",
- "type": "TEXT"
- },
- {
- "name": "enable_service_links",
- "type": "INTEGER"
- },
- {
- "name": "preemption_policy",
- "type": "TEXT"
- },
- {
- "name": "overhead",
- "type": "TEXT"
- },
- {
- "name": "topology_spread_constraints",
- "type": "TEXT"
- },
- {
- "name": "set_hostname_as_fqdn",
- "type": "INTEGER"
- },
- {
- "name": "conditions",
- "type": "TEXT"
- },
- {
- "name": "start_time",
- "type": "BIGINT"
- },
- {
- "name": "completion_time",
- "type": "BIGINT"
- },
- {
- "name": "active",
- "type": "INTEGER"
- },
- {
- "name": "succeeded",
- "type": "INTEGER"
- },
- {
- "name": "failed",
- "type": "INTEGER"
- },
- {
- "name": "completed_indexes",
- "type": "TEXT"
- },
- {
- "name": "uncounted_terminated_pods",
- "type": "TEXT"
- },
- {
- "name": "parallelism",
- "type": "INTEGER"
- },
- {
- "name": "completions",
- "type": "INTEGER"
- },
- {
- "name": "job_active_deadline_seconds",
- "type": "BIGINT"
- },
- {
- "name": "backoff_limit",
- "type": "INTEGER"
- },
- {
- "name": "selector",
- "type": "TEXT"
- },
- {
- "name": "manual_selector",
- "type": "INTEGER"
- },
- {
- "name": "ttl_seconds_after_finished",
- "type": "INTEGER"
- }
- ]
- },
- {
- "name": "kubernetes_component_statuses",
- "columns": [
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "type",
- "type": "TEXT"
- },
- {
- "name": "status",
- "type": "TEXT"
- },
- {
- "name": "message",
- "type": "TEXT"
- },
- {
- "name": "error",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_config_maps",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "namespace",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "immutable",
- "type": "INTEGER"
- }
- ]
- },
- {
- "name": "kubernetes_endpoint_subsets",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "namespace",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "addresses",
- "type": "TEXT"
- },
- {
- "name": "not_ready_addresses",
- "type": "TEXT"
- },
- {
- "name": "ports",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_limit_ranges",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "namespace",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "type",
- "type": "TEXT"
- },
- {
- "name": "max",
- "type": "TEXT"
- },
- {
- "name": "min",
- "type": "TEXT"
- },
- {
- "name": "default",
- "type": "TEXT"
- },
- {
- "name": "default_request",
- "type": "TEXT"
- },
- {
- "name": "max_limit_request_ratio",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_namespaces",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "phase",
- "type": "TEXT"
- },
- {
- "name": "conditions",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_nodes",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "pod_cidr",
- "type": "TEXT"
- },
- {
- "name": "pod_cidrs",
- "type": "TEXT"
- },
- {
- "name": "provider_id",
- "type": "TEXT"
- },
- {
- "name": "unschedulable",
- "type": "INTEGER"
- },
- {
- "name": "taints",
- "type": "TEXT"
- },
- {
- "name": "config_source",
- "type": "TEXT"
- },
- {
- "name": "do_not_use_external_id",
- "type": "TEXT"
- },
- {
- "name": "capacity",
- "type": "TEXT"
- },
- {
- "name": "allocatable",
- "type": "TEXT"
- },
- {
- "name": "phase",
- "type": "TEXT"
- },
- {
- "name": "conditions",
- "type": "TEXT"
- },
- {
- "name": "addresses",
- "type": "TEXT"
- },
- {
- "name": "daemon_endpoints",
- "type": "TEXT"
- },
- {
- "name": "node_info",
- "type": "TEXT"
- },
- {
- "name": "images",
- "type": "TEXT"
- },
- {
- "name": "volumes_in_use",
- "type": "TEXT"
- },
- {
- "name": "volumes_attached",
- "type": "TEXT"
- },
- {
- "name": "config",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_persistent_volume_claims",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "access_modes",
- "type": "TEXT"
- },
- {
- "name": "selector",
- "type": "TEXT"
- },
- {
- "name": "resources",
- "type": "TEXT"
- },
- {
- "name": "volume_name",
- "type": "TEXT"
- },
- {
- "name": "storage_class_name",
- "type": "TEXT"
- },
- {
- "name": "volume_mode",
- "type": "TEXT"
- },
- {
- "name": "data_source",
- "type": "TEXT"
- },
- {
- "name": "data_source_ref",
- "type": "TEXT"
- },
- {
- "name": "phase",
- "type": "TEXT"
- },
- {
- "name": "capacity",
- "type": "TEXT"
- },
- {
- "name": "conditions",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_persistent_volumes",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "capacity",
- "type": "TEXT"
- },
- {
- "name": "access_modes",
- "type": "TEXT"
- },
- {
- "name": "claim_ref",
- "type": "TEXT"
- },
- {
- "name": "persistent_volume_reclaim_policy",
- "type": "TEXT"
- },
- {
- "name": "storage_class_name",
- "type": "TEXT"
- },
- {
- "name": "mount_options",
- "type": "TEXT"
- },
- {
- "name": "volume_mode",
- "type": "TEXT"
- },
- {
- "name": "node_affinity",
- "type": "TEXT"
- },
- {
- "name": "status_phase",
- "type": "TEXT"
- },
- {
- "name": "status_message",
- "type": "TEXT"
- },
- {
- "name": "status_reason",
- "type": "TEXT"
- },
- {
- "name": "volume_type",
- "type": "TEXT"
- },
- {
- "name": "fs_type",
- "type": "TEXT"
- },
- {
- "name": "read_only",
- "type": "INTEGER"
- },
- {
- "name": "secret_name",
- "type": "TEXT"
- },
- {
- "name": "host_path_path",
- "type": "TEXT"
- },
- {
- "name": "host_path_type",
- "type": "TEXT"
- },
- {
- "name": "gce_persistent_disk_pd_name",
- "type": "TEXT"
- },
- {
- "name": "gce_persistent_disk_partition",
- "type": "INTEGER"
- },
- {
- "name": "aws_elastic_block_store_volume_id",
- "type": "TEXT"
- },
- {
- "name": "aws_elastic_block_store_partition",
- "type": "INTEGER"
- },
- {
- "name": "nfs_server",
- "type": "TEXT"
- },
- {
- "name": "nfs_path",
- "type": "TEXT"
- },
- {
- "name": "iscsi_target_portal",
- "type": "TEXT"
- },
- {
- "name": "iscsi_iqn",
- "type": "TEXT"
- },
- {
- "name": "iscsi_lun",
- "type": "INTEGER"
- },
- {
- "name": "iscsi_interface",
- "type": "TEXT"
- },
- {
- "name": "iscsi_portals",
- "type": "TEXT"
- },
- {
- "name": "iscsi_discovery_chap_auth",
- "type": "INTEGER"
- },
- {
- "name": "iscsi_session_chap_auth",
- "type": "INTEGER"
- },
- {
- "name": "iscsi_initiator_name",
- "type": "TEXT"
- },
- {
- "name": "local_path",
- "type": "TEXT"
- },
- {
- "name": "glusterfs_endpoints_name",
- "type": "TEXT"
- },
- {
- "name": "glusterfs_path",
- "type": "TEXT"
- },
- {
- "name": "rbd_ceph_monitors",
- "type": "TEXT"
- },
- {
- "name": "rbd_image",
- "type": "TEXT"
- },
- {
- "name": "rbd_pool",
- "type": "TEXT"
- },
- {
- "name": "rbd_rados_user",
- "type": "TEXT"
- },
- {
- "name": "rbd_keyring",
- "type": "TEXT"
- },
- {
- "name": "flex_volume_driver",
- "type": "TEXT"
- },
- {
- "name": "flex_volume_options",
- "type": "TEXT"
- },
- {
- "name": "cinder_volume_id",
- "type": "TEXT"
- },
- {
- "name": "ceph_fs_monitors",
- "type": "TEXT"
- },
- {
- "name": "ceph_fs_path",
- "type": "TEXT"
- },
- {
- "name": "ceph_fs_user",
- "type": "TEXT"
- },
- {
- "name": "ceph_fs_secret_file",
- "type": "TEXT"
- },
- {
- "name": "flocker_dataset_name",
- "type": "TEXT"
- },
- {
- "name": "flocker_dataset_uuid",
- "type": "TEXT"
- },
- {
- "name": "fc_target_ww_ns",
- "type": "TEXT"
- },
- {
- "name": "fc_lun",
- "type": "INTEGER"
- },
- {
- "name": "fc_ww_ids",
- "type": "TEXT"
- },
- {
- "name": "azure_file_share_name",
- "type": "TEXT"
- },
- {
- "name": "vsphere_volume_volume_path",
- "type": "TEXT"
- },
- {
- "name": "vsphere_volume_storage_policy_name",
- "type": "TEXT"
- },
- {
- "name": "vsphere_volume_storage_policy_id",
- "type": "TEXT"
- },
- {
- "name": "quobyte_registry",
- "type": "TEXT"
- },
- {
- "name": "quobyte_volume",
- "type": "TEXT"
- },
- {
- "name": "quobyte_user",
- "type": "TEXT"
- },
- {
- "name": "quobyte_group",
- "type": "TEXT"
- },
- {
- "name": "quobyte_tenant",
- "type": "TEXT"
- },
- {
- "name": "azure_disk_disk_name",
- "type": "TEXT"
- },
- {
- "name": "azure_disk_data_disk_uri",
- "type": "TEXT"
- },
- {
- "name": "azure_disk_caching_mode",
- "type": "TEXT"
- },
- {
- "name": "azure_disk_kind",
- "type": "TEXT"
- },
- {
- "name": "photon_persistent_disk_pd_id",
- "type": "TEXT"
- },
- {
- "name": "portworx_volume_id",
- "type": "TEXT"
- },
- {
- "name": "scale_io_gateway",
- "type": "TEXT"
- },
- {
- "name": "scale_io_system",
- "type": "TEXT"
- },
- {
- "name": "scale_iossl_enabled",
- "type": "INTEGER"
- },
- {
- "name": "scale_io_protection_domain",
- "type": "TEXT"
- },
- {
- "name": "scale_io_storage_pool",
- "type": "TEXT"
- },
- {
- "name": "scale_io_storage_mode",
- "type": "TEXT"
- },
- {
- "name": "scale_io_volume_name",
- "type": "TEXT"
- },
- {
- "name": "storage_os_volume_name",
- "type": "TEXT"
- },
- {
- "name": "storage_os_volume_namespace",
- "type": "TEXT"
- },
- {
- "name": "csi_driver",
- "type": "TEXT"
- },
- {
- "name": "csi_volume_attributes",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_pod_templates",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "namespace",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_user",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_role",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_type",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_level",
- "type": "TEXT"
- },
- {
- "name": "windows_options_gmsa_credential_spec_name",
- "type": "TEXT"
- },
- {
- "name": "windows_options_gmsa_credential_spec",
- "type": "TEXT"
- },
- {
- "name": "windows_options_run_as_user_name",
- "type": "TEXT"
- },
- {
- "name": "seccomp_profile_type",
- "type": "TEXT"
- },
- {
- "name": "seccomp_profile_localhost_profile",
- "type": "TEXT"
- },
- {
- "name": "run_as_user",
- "type": "BIGINT"
- },
- {
- "name": "run_as_group",
- "type": "BIGINT"
- },
- {
- "name": "run_as_non_root",
- "type": "INTEGER"
- },
- {
- "name": "supplemental_groups",
- "type": "TEXT"
- },
- {
- "name": "fs_group",
- "type": "BIGINT"
- },
- {
- "name": "sysctls",
- "type": "TEXT"
- },
- {
- "name": "fs_group_change_policy",
- "type": "TEXT"
- },
- {
- "name": "node_affinity",
- "type": "TEXT"
- },
- {
- "name": "pod_affinity",
- "type": "TEXT"
- },
- {
- "name": "pod_anti_affinity",
- "type": "TEXT"
- },
- {
- "name": "dns_config_nameservers",
- "type": "TEXT"
- },
- {
- "name": "dns_config_searches",
- "type": "TEXT"
- },
- {
- "name": "dns_config_options",
- "type": "TEXT"
- },
- {
- "name": "node_selector",
- "type": "TEXT"
- },
- {
- "name": "restart_policy",
- "type": "TEXT"
- },
- {
- "name": "termination_grace_period_seconds",
- "type": "BIGINT"
- },
- {
- "name": "active_deadline_seconds",
- "type": "BIGINT"
- },
- {
- "name": "dns_policy",
- "type": "TEXT"
- },
- {
- "name": "service_account_name",
- "type": "TEXT"
- },
- {
- "name": "automount_service_account_token",
- "type": "INTEGER"
- },
- {
- "name": "node_name",
- "type": "TEXT"
- },
- {
- "name": "host_network",
- "type": "INTEGER"
- },
- {
- "name": "host_pid",
- "type": "INTEGER"
- },
- {
- "name": "host_ipc",
- "type": "INTEGER"
- },
- {
- "name": "share_process_namespace",
- "type": "INTEGER"
- },
- {
- "name": "image_pull_secrets",
- "type": "TEXT"
- },
- {
- "name": "hostname",
- "type": "TEXT"
- },
- {
- "name": "subdomain",
- "type": "TEXT"
- },
- {
- "name": "scheduler_name",
- "type": "TEXT"
- },
- {
- "name": "tolerations",
- "type": "TEXT"
- },
- {
- "name": "host_aliases",
- "type": "TEXT"
- },
- {
- "name": "priority_class_name",
- "type": "TEXT"
- },
- {
- "name": "priority",
- "type": "INTEGER"
- },
- {
- "name": "readiness_gates",
- "type": "TEXT"
- },
- {
- "name": "runtime_class_name",
- "type": "TEXT"
- },
- {
- "name": "enable_service_links",
- "type": "INTEGER"
- },
- {
- "name": "preemption_policy",
- "type": "TEXT"
- },
- {
- "name": "overhead",
- "type": "TEXT"
- },
- {
- "name": "topology_spread_constraints",
- "type": "TEXT"
- },
- {
- "name": "set_hostname_as_fqdn",
- "type": "INTEGER"
- }
- ]
- },
- {
- "name": "kubernetes_pod_template_containers",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "namespace",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_user",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_role",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_type",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_level",
- "type": "TEXT"
- },
- {
- "name": "windows_options_gmsa_credential_spec_name",
- "type": "TEXT"
- },
- {
- "name": "windows_options_gmsa_credential_spec",
- "type": "TEXT"
- },
- {
- "name": "windows_options_run_as_user_name",
- "type": "TEXT"
- },
- {
- "name": "seccomp_profile_type",
- "type": "TEXT"
- },
- {
- "name": "seccomp_profile_localhost_profile",
- "type": "TEXT"
- },
- {
- "name": "run_as_user",
- "type": "BIGINT"
- },
- {
- "name": "run_as_group",
- "type": "BIGINT"
- },
- {
- "name": "run_as_non_root",
- "type": "INTEGER"
- },
- {
- "name": "capabilities_add",
- "type": "TEXT"
- },
- {
- "name": "capabilities_drop",
- "type": "TEXT"
- },
- {
- "name": "privileged",
- "type": "INTEGER"
- },
- {
- "name": "read_only_root_filesystem",
- "type": "INTEGER"
- },
- {
- "name": "allow_privilege_escalation",
- "type": "INTEGER"
- },
- {
- "name": "proc_mount",
- "type": "TEXT"
- },
- {
- "name": "target_container_name",
- "type": "TEXT"
- },
- {
- "name": "image",
- "type": "TEXT"
- },
- {
- "name": "command",
- "type": "TEXT"
- },
- {
- "name": "args",
- "type": "TEXT"
- },
- {
- "name": "working_dir",
- "type": "TEXT"
- },
- {
- "name": "ports",
- "type": "TEXT"
- },
- {
- "name": "env_from",
- "type": "TEXT"
- },
- {
- "name": "env",
- "type": "TEXT"
- },
- {
- "name": "resource_limits",
- "type": "TEXT"
- },
- {
- "name": "resource_requests",
- "type": "TEXT"
- },
- {
- "name": "volume_mounts",
- "type": "TEXT"
- },
- {
- "name": "volume_devices",
- "type": "TEXT"
- },
- {
- "name": "liveness_probe",
- "type": "TEXT"
- },
- {
- "name": "readiness_probe",
- "type": "TEXT"
- },
- {
- "name": "startup_probe",
- "type": "TEXT"
- },
- {
- "name": "lifecycle",
- "type": "TEXT"
- },
- {
- "name": "termination_message_path",
- "type": "TEXT"
- },
- {
- "name": "termination_message_policy",
- "type": "TEXT"
- },
- {
- "name": "image_pull_policy",
- "type": "TEXT"
- },
- {
- "name": "stdin",
- "type": "INTEGER"
- },
- {
- "name": "stdin_once",
- "type": "INTEGER"
- },
- {
- "name": "tty",
- "type": "INTEGER"
- },
- {
- "name": "pod_template_name",
- "type": "TEXT"
- },
- {
- "name": "container_type",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_pod_templates_volumes",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "namespace",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "volume_type",
- "type": "TEXT"
- },
- {
- "name": "fs_type",
- "type": "TEXT"
- },
- {
- "name": "read_only",
- "type": "INTEGER"
- },
- {
- "name": "secret_name",
- "type": "TEXT"
- },
- {
- "name": "host_path_path",
- "type": "TEXT"
- },
- {
- "name": "host_path_type",
- "type": "TEXT"
- },
- {
- "name": "empty_dir_medium",
- "type": "TEXT"
- },
- {
- "name": "empty_dir_size_limit",
- "type": "TEXT"
- },
- {
- "name": "gce_persistent_disk_pd_name",
- "type": "TEXT"
- },
- {
- "name": "gce_persistent_disk_partition",
- "type": "INTEGER"
- },
- {
- "name": "aws_elastic_block_store_volume_id",
- "type": "TEXT"
- },
- {
- "name": "aws_elastic_block_store_partition",
- "type": "INTEGER"
- },
- {
- "name": "git_repo_repository",
- "type": "TEXT"
- },
- {
- "name": "git_repo_revision",
- "type": "TEXT"
- },
- {
- "name": "git_repo_directory",
- "type": "TEXT"
- },
- {
- "name": "secret_items",
- "type": "TEXT"
- },
- {
- "name": "secret_default_mode",
- "type": "INTEGER"
- },
- {
- "name": "secret_optional",
- "type": "INTEGER"
- },
- {
- "name": "nfs_server",
- "type": "TEXT"
- },
- {
- "name": "nfs_path",
- "type": "TEXT"
- },
- {
- "name": "iscsi_target_portal",
- "type": "TEXT"
- },
- {
- "name": "iscsi_iqn",
- "type": "TEXT"
- },
- {
- "name": "iscsi_lun",
- "type": "INTEGER"
- },
- {
- "name": "iscsi_interface",
- "type": "TEXT"
- },
- {
- "name": "iscsi_portals",
- "type": "TEXT"
- },
- {
- "name": "iscsi_discovery_chap_auth",
- "type": "INTEGER"
- },
- {
- "name": "iscsi_session_chap_auth",
- "type": "INTEGER"
- },
- {
- "name": "iscsi_initiator_name",
- "type": "TEXT"
- },
- {
- "name": "glusterfs_endpoints_name",
- "type": "TEXT"
- },
- {
- "name": "glusterfs_path",
- "type": "TEXT"
- },
- {
- "name": "persistent_volume_claim_name",
- "type": "TEXT"
- },
- {
- "name": "rbd_ceph_monitors",
- "type": "TEXT"
- },
- {
- "name": "rbd_image",
- "type": "TEXT"
- },
- {
- "name": "rbd_pool",
- "type": "TEXT"
- },
- {
- "name": "rbd_rados_user",
- "type": "TEXT"
- },
- {
- "name": "rbd_keyring",
- "type": "TEXT"
- },
- {
- "name": "flex_volume_driver",
- "type": "TEXT"
- },
- {
- "name": "flex_volume_options",
- "type": "TEXT"
- },
- {
- "name": "cinder_volume_id",
- "type": "TEXT"
- },
- {
- "name": "ceph_fs_monitors",
- "type": "TEXT"
- },
- {
- "name": "ceph_fs_path",
- "type": "TEXT"
- },
- {
- "name": "ceph_fs_user",
- "type": "TEXT"
- },
- {
- "name": "ceph_fs_secret_file",
- "type": "TEXT"
- },
- {
- "name": "flocker_dataset_name",
- "type": "TEXT"
- },
- {
- "name": "flocker_dataset_uuid",
- "type": "TEXT"
- },
- {
- "name": "downward_api_items",
- "type": "TEXT"
- },
- {
- "name": "downward_api_default_mode",
- "type": "INTEGER"
- },
- {
- "name": "fc_target_ww_ns",
- "type": "TEXT"
- },
- {
- "name": "fc_lun",
- "type": "INTEGER"
- },
- {
- "name": "fc_ww_ids",
- "type": "TEXT"
- },
- {
- "name": "azure_file_share_name",
- "type": "TEXT"
- },
- {
- "name": "config_map_name",
- "type": "TEXT"
- },
- {
- "name": "config_map_items",
- "type": "TEXT"
- },
- {
- "name": "config_map_default_mode",
- "type": "INTEGER"
- },
- {
- "name": "config_map_optional",
- "type": "INTEGER"
- },
- {
- "name": "vsphere_volume_volume_path",
- "type": "TEXT"
- },
- {
- "name": "vsphere_volume_storage_policy_name",
- "type": "TEXT"
- },
- {
- "name": "vsphere_volume_storage_policy_id",
- "type": "TEXT"
- },
- {
- "name": "quobyte_registry",
- "type": "TEXT"
- },
- {
- "name": "quobyte_volume",
- "type": "TEXT"
- },
- {
- "name": "quobyte_user",
- "type": "TEXT"
- },
- {
- "name": "quobyte_group",
- "type": "TEXT"
- },
- {
- "name": "quobyte_tenant",
- "type": "TEXT"
- },
- {
- "name": "azure_disk_disk_name",
- "type": "TEXT"
- },
- {
- "name": "azure_disk_data_disk_uri",
- "type": "TEXT"
- },
- {
- "name": "azure_disk_caching_mode",
- "type": "TEXT"
- },
- {
- "name": "azure_disk_kind",
- "type": "TEXT"
- },
- {
- "name": "photon_persistent_disk_pd_id",
- "type": "TEXT"
- },
- {
- "name": "projected_sources",
- "type": "TEXT"
- },
- {
- "name": "projected_default_mode",
- "type": "INTEGER"
- },
- {
- "name": "portworx_volume_id",
- "type": "TEXT"
- },
- {
- "name": "scale_io_gateway",
- "type": "TEXT"
- },
- {
- "name": "scale_io_system",
- "type": "TEXT"
- },
- {
- "name": "scale_iossl_enabled",
- "type": "INTEGER"
- },
- {
- "name": "scale_io_protection_domain",
- "type": "TEXT"
- },
- {
- "name": "scale_io_storage_pool",
- "type": "TEXT"
- },
- {
- "name": "scale_io_storage_mode",
- "type": "TEXT"
- },
- {
- "name": "scale_io_volume_name",
- "type": "TEXT"
- },
- {
- "name": "storage_os_volume_name",
- "type": "TEXT"
- },
- {
- "name": "storage_os_volume_namespace",
- "type": "TEXT"
- },
- {
- "name": "csi_driver",
- "type": "TEXT"
- },
- {
- "name": "csi_volume_attributes",
- "type": "TEXT"
- },
- {
- "name": "ephemeral_volume_claim_template",
- "type": "TEXT"
- },
- {
- "name": "pod_template_name",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_pods",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "namespace",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_user",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_role",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_type",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_level",
- "type": "TEXT"
- },
- {
- "name": "windows_options_gmsa_credential_spec_name",
- "type": "TEXT"
- },
- {
- "name": "windows_options_gmsa_credential_spec",
- "type": "TEXT"
- },
- {
- "name": "windows_options_run_as_user_name",
- "type": "TEXT"
- },
- {
- "name": "seccomp_profile_type",
- "type": "TEXT"
- },
- {
- "name": "seccomp_profile_localhost_profile",
- "type": "TEXT"
- },
- {
- "name": "run_as_user",
- "type": "BIGINT"
- },
- {
- "name": "run_as_group",
- "type": "BIGINT"
- },
- {
- "name": "run_as_non_root",
- "type": "INTEGER"
- },
- {
- "name": "supplemental_groups",
- "type": "TEXT"
- },
- {
- "name": "fs_group",
- "type": "BIGINT"
- },
- {
- "name": "sysctls",
- "type": "TEXT"
- },
- {
- "name": "fs_group_change_policy",
- "type": "TEXT"
- },
- {
- "name": "node_affinity",
- "type": "TEXT"
- },
- {
- "name": "pod_affinity",
- "type": "TEXT"
- },
- {
- "name": "pod_anti_affinity",
- "type": "TEXT"
- },
- {
- "name": "dns_config_nameservers",
- "type": "TEXT"
- },
- {
- "name": "dns_config_searches",
- "type": "TEXT"
- },
- {
- "name": "dns_config_options",
- "type": "TEXT"
- },
- {
- "name": "node_selector",
- "type": "TEXT"
- },
- {
- "name": "restart_policy",
- "type": "TEXT"
- },
- {
- "name": "termination_grace_period_seconds",
- "type": "BIGINT"
- },
- {
- "name": "active_deadline_seconds",
- "type": "BIGINT"
- },
- {
- "name": "dns_policy",
- "type": "TEXT"
- },
- {
- "name": "service_account_name",
- "type": "TEXT"
- },
- {
- "name": "automount_service_account_token",
- "type": "INTEGER"
- },
- {
- "name": "node_name",
- "type": "TEXT"
- },
- {
- "name": "host_network",
- "type": "INTEGER"
- },
- {
- "name": "host_pid",
- "type": "INTEGER"
- },
- {
- "name": "host_ipc",
- "type": "INTEGER"
- },
- {
- "name": "share_process_namespace",
- "type": "INTEGER"
- },
- {
- "name": "image_pull_secrets",
- "type": "TEXT"
- },
- {
- "name": "hostname",
- "type": "TEXT"
- },
- {
- "name": "subdomain",
- "type": "TEXT"
- },
- {
- "name": "scheduler_name",
- "type": "TEXT"
- },
- {
- "name": "tolerations",
- "type": "TEXT"
- },
- {
- "name": "host_aliases",
- "type": "TEXT"
- },
- {
- "name": "priority_class_name",
- "type": "TEXT"
- },
- {
- "name": "priority",
- "type": "INTEGER"
- },
- {
- "name": "readiness_gates",
- "type": "TEXT"
- },
- {
- "name": "runtime_class_name",
- "type": "TEXT"
- },
- {
- "name": "enable_service_links",
- "type": "INTEGER"
- },
- {
- "name": "preemption_policy",
- "type": "TEXT"
- },
- {
- "name": "overhead",
- "type": "TEXT"
- },
- {
- "name": "topology_spread_constraints",
- "type": "TEXT"
- },
- {
- "name": "set_hostname_as_fqdn",
- "type": "INTEGER"
- },
- {
- "name": "phase",
- "type": "TEXT"
- },
- {
- "name": "conditions",
- "type": "TEXT"
- },
- {
- "name": "message",
- "type": "TEXT"
- },
- {
- "name": "reason",
- "type": "TEXT"
- },
- {
- "name": "nominated_node_name",
- "type": "TEXT"
- },
- {
- "name": "host_ip",
- "type": "TEXT"
- },
- {
- "name": "pod_ip",
- "type": "TEXT"
- },
- {
- "name": "pod_ips",
- "type": "TEXT"
- },
- {
- "name": "start_time",
- "type": "BIGINT"
- },
- {
- "name": "init_container_statuses",
- "type": "TEXT"
- },
- {
- "name": "container_statuses",
- "type": "TEXT"
- },
- {
- "name": "qos_class",
- "type": "TEXT"
- },
- {
- "name": "ephemeral_container_statuses",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_pod_containers",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "namespace",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_user",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_role",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_type",
- "type": "TEXT"
- },
- {
- "name": "se_linux_options_level",
- "type": "TEXT"
- },
- {
- "name": "windows_options_gmsa_credential_spec_name",
- "type": "TEXT"
- },
- {
- "name": "windows_options_gmsa_credential_spec",
- "type": "TEXT"
- },
- {
- "name": "windows_options_run_as_user_name",
- "type": "TEXT"
- },
- {
- "name": "seccomp_profile_type",
- "type": "TEXT"
- },
- {
- "name": "seccomp_profile_localhost_profile",
- "type": "TEXT"
- },
- {
- "name": "run_as_user",
- "type": "BIGINT"
- },
- {
- "name": "run_as_group",
- "type": "BIGINT"
- },
- {
- "name": "run_as_non_root",
- "type": "INTEGER"
- },
- {
- "name": "capabilities_add",
- "type": "TEXT"
- },
- {
- "name": "capabilities_drop",
- "type": "TEXT"
- },
- {
- "name": "privileged",
- "type": "INTEGER"
- },
- {
- "name": "read_only_root_filesystem",
- "type": "INTEGER"
- },
- {
- "name": "allow_privilege_escalation",
- "type": "INTEGER"
- },
- {
- "name": "proc_mount",
- "type": "TEXT"
- },
- {
- "name": "target_container_name",
- "type": "TEXT"
- },
- {
- "name": "image",
- "type": "TEXT"
- },
- {
- "name": "command",
- "type": "TEXT"
- },
- {
- "name": "args",
- "type": "TEXT"
- },
- {
- "name": "working_dir",
- "type": "TEXT"
- },
- {
- "name": "ports",
- "type": "TEXT"
- },
- {
- "name": "env_from",
- "type": "TEXT"
- },
- {
- "name": "env",
- "type": "TEXT"
- },
- {
- "name": "resource_limits",
- "type": "TEXT"
- },
- {
- "name": "resource_requests",
- "type": "TEXT"
- },
- {
- "name": "volume_mounts",
- "type": "TEXT"
- },
- {
- "name": "volume_devices",
- "type": "TEXT"
- },
- {
- "name": "liveness_probe",
- "type": "TEXT"
- },
- {
- "name": "readiness_probe",
- "type": "TEXT"
- },
- {
- "name": "startup_probe",
- "type": "TEXT"
- },
- {
- "name": "lifecycle",
- "type": "TEXT"
- },
- {
- "name": "termination_message_path",
- "type": "TEXT"
- },
- {
- "name": "termination_message_policy",
- "type": "TEXT"
- },
- {
- "name": "image_pull_policy",
- "type": "TEXT"
- },
- {
- "name": "stdin",
- "type": "INTEGER"
- },
- {
- "name": "stdin_once",
- "type": "INTEGER"
- },
- {
- "name": "tty",
- "type": "INTEGER"
- },
- {
- "name": "pod_name",
- "type": "TEXT"
- },
- {
- "name": "container_type",
- "type": "TEXT"
- },
- {
- "name": "state",
- "type": "TEXT"
- },
- {
- "name": "last_termination_state",
- "type": "TEXT"
- },
- {
- "name": "ready",
- "type": "INTEGER"
- },
- {
- "name": "restart_count",
- "type": "INTEGER"
- },
- {
- "name": "image_repo",
- "type": "TEXT"
- },
- {
- "name": "image_id",
- "type": "TEXT"
- },
- {
- "name": "container_id",
- "type": "TEXT"
- },
- {
- "name": "started",
- "type": "INTEGER"
- }
- ]
- },
- {
- "name": "kubernetes_pod_volumes",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "namespace",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "volume_type",
- "type": "TEXT"
- },
- {
- "name": "fs_type",
- "type": "TEXT"
- },
- {
- "name": "read_only",
- "type": "INTEGER"
- },
- {
- "name": "secret_name",
- "type": "TEXT"
- },
- {
- "name": "host_path_path",
- "type": "TEXT"
- },
- {
- "name": "host_path_type",
- "type": "TEXT"
- },
- {
- "name": "empty_dir_medium",
- "type": "TEXT"
- },
- {
- "name": "empty_dir_size_limit",
- "type": "TEXT"
- },
- {
- "name": "gce_persistent_disk_pd_name",
- "type": "TEXT"
- },
- {
- "name": "gce_persistent_disk_partition",
- "type": "INTEGER"
- },
- {
- "name": "aws_elastic_block_store_volume_id",
- "type": "TEXT"
- },
- {
- "name": "aws_elastic_block_store_partition",
- "type": "INTEGER"
- },
- {
- "name": "git_repo_repository",
- "type": "TEXT"
- },
- {
- "name": "git_repo_revision",
- "type": "TEXT"
- },
- {
- "name": "git_repo_directory",
- "type": "TEXT"
- },
- {
- "name": "secret_items",
- "type": "TEXT"
- },
- {
- "name": "secret_default_mode",
- "type": "INTEGER"
- },
- {
- "name": "secret_optional",
- "type": "INTEGER"
- },
- {
- "name": "nfs_server",
- "type": "TEXT"
- },
- {
- "name": "nfs_path",
- "type": "TEXT"
- },
- {
- "name": "iscsi_target_portal",
- "type": "TEXT"
- },
- {
- "name": "iscsi_iqn",
- "type": "TEXT"
- },
- {
- "name": "iscsi_lun",
- "type": "INTEGER"
- },
- {
- "name": "iscsi_interface",
- "type": "TEXT"
- },
- {
- "name": "iscsi_portals",
- "type": "TEXT"
- },
- {
- "name": "iscsi_discovery_chap_auth",
- "type": "INTEGER"
- },
- {
- "name": "iscsi_session_chap_auth",
- "type": "INTEGER"
- },
- {
- "name": "iscsi_initiator_name",
- "type": "TEXT"
- },
- {
- "name": "glusterfs_endpoints_name",
- "type": "TEXT"
- },
- {
- "name": "glusterfs_path",
- "type": "TEXT"
- },
- {
- "name": "persistent_volume_claim_name",
- "type": "TEXT"
- },
- {
- "name": "rbd_ceph_monitors",
- "type": "TEXT"
- },
- {
- "name": "rbd_image",
- "type": "TEXT"
- },
- {
- "name": "rbd_pool",
- "type": "TEXT"
- },
- {
- "name": "rbd_rados_user",
- "type": "TEXT"
- },
- {
- "name": "rbd_keyring",
- "type": "TEXT"
- },
- {
- "name": "flex_volume_driver",
- "type": "TEXT"
- },
- {
- "name": "flex_volume_options",
- "type": "TEXT"
- },
- {
- "name": "cinder_volume_id",
- "type": "TEXT"
- },
- {
- "name": "ceph_fs_monitors",
- "type": "TEXT"
- },
- {
- "name": "ceph_fs_path",
- "type": "TEXT"
- },
- {
- "name": "ceph_fs_user",
- "type": "TEXT"
- },
- {
- "name": "ceph_fs_secret_file",
- "type": "TEXT"
- },
- {
- "name": "flocker_dataset_name",
- "type": "TEXT"
- },
- {
- "name": "flocker_dataset_uuid",
- "type": "TEXT"
- },
- {
- "name": "downward_api_items",
- "type": "TEXT"
- },
- {
- "name": "downward_api_default_mode",
- "type": "INTEGER"
- },
- {
- "name": "fc_target_ww_ns",
- "type": "TEXT"
- },
- {
- "name": "fc_lun",
- "type": "INTEGER"
- },
- {
- "name": "fc_ww_ids",
- "type": "TEXT"
- },
- {
- "name": "azure_file_share_name",
- "type": "TEXT"
- },
- {
- "name": "config_map_name",
- "type": "TEXT"
- },
- {
- "name": "config_map_items",
- "type": "TEXT"
- },
- {
- "name": "config_map_default_mode",
- "type": "INTEGER"
- },
- {
- "name": "config_map_optional",
- "type": "INTEGER"
- },
- {
- "name": "vsphere_volume_volume_path",
- "type": "TEXT"
- },
- {
- "name": "vsphere_volume_storage_policy_name",
- "type": "TEXT"
- },
- {
- "name": "vsphere_volume_storage_policy_id",
- "type": "TEXT"
- },
- {
- "name": "quobyte_registry",
- "type": "TEXT"
- },
- {
- "name": "quobyte_volume",
- "type": "TEXT"
- },
- {
- "name": "quobyte_user",
- "type": "TEXT"
- },
- {
- "name": "quobyte_group",
- "type": "TEXT"
- },
- {
- "name": "quobyte_tenant",
- "type": "TEXT"
- },
- {
- "name": "azure_disk_disk_name",
- "type": "TEXT"
- },
- {
- "name": "azure_disk_data_disk_uri",
- "type": "TEXT"
- },
- {
- "name": "azure_disk_caching_mode",
- "type": "TEXT"
- },
- {
- "name": "azure_disk_kind",
- "type": "TEXT"
- },
- {
- "name": "photon_persistent_disk_pd_id",
- "type": "TEXT"
- },
- {
- "name": "projected_sources",
- "type": "TEXT"
- },
- {
- "name": "projected_default_mode",
- "type": "INTEGER"
- },
- {
- "name": "portworx_volume_id",
- "type": "TEXT"
- },
- {
- "name": "scale_io_gateway",
- "type": "TEXT"
- },
- {
- "name": "scale_io_system",
- "type": "TEXT"
- },
- {
- "name": "scale_iossl_enabled",
- "type": "INTEGER"
- },
- {
- "name": "scale_io_protection_domain",
- "type": "TEXT"
- },
- {
- "name": "scale_io_storage_pool",
- "type": "TEXT"
- },
- {
- "name": "scale_io_storage_mode",
- "type": "TEXT"
- },
- {
- "name": "scale_io_volume_name",
- "type": "TEXT"
- },
- {
- "name": "storage_os_volume_name",
- "type": "TEXT"
- },
- {
- "name": "storage_os_volume_namespace",
- "type": "TEXT"
- },
- {
- "name": "csi_driver",
- "type": "TEXT"
- },
- {
- "name": "csi_volume_attributes",
- "type": "TEXT"
- },
- {
- "name": "ephemeral_volume_claim_template",
- "type": "TEXT"
- },
- {
- "name": "pod_name",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_resource_quotas",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "namespace",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "hard",
- "type": "TEXT"
- },
- {
- "name": "scopes",
- "type": "TEXT"
- },
- {
- "name": "scope_selector",
- "type": "TEXT"
- },
- {
- "name": "status_hard",
- "type": "TEXT"
- },
- {
- "name": "status_used",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_secrets",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "namespace",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "immutable",
- "type": "INTEGER"
- },
- {
- "name": "type",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_service_accounts",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "namespace",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "secrets",
- "type": "TEXT"
- },
- {
- "name": "image_pull_secrets",
- "type": "TEXT"
- },
- {
- "name": "automount_service_account_token",
- "type": "INTEGER"
- }
- ]
- },
- {
- "name": "kubernetes_services",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "namespace",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "ports",
- "type": "TEXT"
- },
- {
- "name": "selector",
- "type": "TEXT"
- },
- {
- "name": "cluster_ip",
- "type": "TEXT"
- },
- {
- "name": "cluster_ips",
- "type": "TEXT"
- },
- {
- "name": "type",
- "type": "TEXT"
- },
- {
- "name": "external_ips",
- "type": "TEXT"
- },
- {
- "name": "session_affinity",
- "type": "TEXT"
- },
- {
- "name": "load_balancer_ip",
- "type": "TEXT"
- },
- {
- "name": "load_balancer_source_ranges",
- "type": "TEXT"
- },
- {
- "name": "external_name",
- "type": "TEXT"
- },
- {
- "name": "external_traffic_policy",
- "type": "TEXT"
- },
- {
- "name": "health_check_node_port",
- "type": "INTEGER"
- },
- {
- "name": "publish_not_ready_addresses",
- "type": "INTEGER"
- },
- {
- "name": "session_affinity_config",
- "type": "TEXT"
- },
- {
- "name": "ip_families",
- "type": "TEXT"
- },
- {
- "name": "ip_family_policy",
- "type": "TEXT"
- },
- {
- "name": "allocate_load_balancer_node_ports",
- "type": "INTEGER"
- },
- {
- "name": "load_balancer_class",
- "type": "TEXT"
- },
- {
- "name": "internal_traffic_policy",
- "type": "TEXT"
- },
- {
- "name": "load_balancer",
- "type": "TEXT"
- },
- {
- "name": "conditions",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_api_resources",
- "columns": [
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "singular_name",
- "type": "TEXT"
- },
- {
- "name": "namespaced",
- "type": "INTEGER"
- },
- {
- "name": "group",
- "type": "TEXT"
- },
- {
- "name": "version",
- "type": "TEXT"
- },
- {
- "name": "kind",
- "type": "TEXT"
- },
- {
- "name": "verbs",
- "type": "TEXT"
- },
- {
- "name": "short_names",
- "type": "TEXT"
- },
- {
- "name": "categories",
- "type": "TEXT"
- },
- {
- "name": "storage_version_hash",
- "type": "TEXT"
- },
- {
- "name": "group_version",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_info",
- "columns": [
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "major",
- "type": "TEXT"
- },
- {
- "name": "minor",
- "type": "TEXT"
- },
- {
- "name": "git_version",
- "type": "TEXT"
- },
- {
- "name": "git_commit",
- "type": "TEXT"
- },
- {
- "name": "git_tree_state",
- "type": "TEXT"
- },
- {
- "name": "build_date",
- "type": "TEXT"
- },
- {
- "name": "go_version",
- "type": "TEXT"
- },
- {
- "name": "compiler",
- "type": "TEXT"
- },
- {
- "name": "platform",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_events",
- "columns": [
- {
- "name": "time",
- "type": "BIGINT"
- },
- {
- "name": "event_type",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "namespace",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "reporting_controller",
- "type": "TEXT"
- },
- {
- "name": "reporting_instance",
- "type": "TEXT"
- },
- {
- "name": "action",
- "type": "TEXT"
- },
- {
- "name": "reason",
- "type": "TEXT"
- },
- {
- "name": "note",
- "type": "TEXT"
- },
- {
- "name": "type",
- "type": "TEXT"
- },
- {
- "name": "regarding_kind",
- "type": "TEXT"
- },
- {
- "name": "regarding_namespace",
- "type": "TEXT"
- },
- {
- "name": "regarding_name",
- "type": "TEXT"
- },
- {
- "name": "regarding_uid",
- "type": "TEXT"
- },
- {
- "name": "related_kind",
- "type": "TEXT"
- },
- {
- "name": "related_namespace",
- "type": "TEXT"
- },
- {
- "name": "related_name",
- "type": "TEXT"
- },
- {
- "name": "related_uid",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_ingress_classes",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "controller",
- "type": "TEXT"
- },
- {
- "name": "parameters",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_ingresses",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "namespace",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "ingress_class_name",
- "type": "TEXT"
- },
- {
- "name": "default_backend",
- "type": "TEXT"
- },
- {
- "name": "tls",
- "type": "TEXT"
- },
- {
- "name": "rules",
- "type": "TEXT"
- },
- {
- "name": "load_balancer",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_network_policies",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "namespace",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "pod_selector",
- "type": "TEXT"
- },
- {
- "name": "policy_types",
- "type": "TEXT"
- },
- {
- "name": "type",
- "type": "TEXT"
- },
- {
- "name": "ports",
- "type": "TEXT"
- },
- {
- "name": "from_to",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_pod_disruption_budgets",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "namespace",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "min_available",
- "type": "TEXT"
- },
- {
- "name": "selector",
- "type": "TEXT"
- },
- {
- "name": "max_unavailable",
- "type": "TEXT"
- },
- {
- "name": "observed_generation",
- "type": "BIGINT"
- },
- {
- "name": "disrupted_pods",
- "type": "TEXT"
- },
- {
- "name": "disruptions_allowed",
- "type": "INTEGER"
- },
- {
- "name": "current_healthy",
- "type": "INTEGER"
- },
- {
- "name": "desired_healthy",
- "type": "INTEGER"
- },
- {
- "name": "expected_pods",
- "type": "INTEGER"
- },
- {
- "name": "conditions",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_pod_security_policies",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "privileged",
- "type": "INTEGER"
- },
- {
- "name": "default_add_capabilities",
- "type": "TEXT"
- },
- {
- "name": "required_drop_capabilities",
- "type": "TEXT"
- },
- {
- "name": "allowed_capabilities",
- "type": "TEXT"
- },
- {
- "name": "volumes",
- "type": "TEXT"
- },
- {
- "name": "host_network",
- "type": "INTEGER"
- },
- {
- "name": "host_ports",
- "type": "TEXT"
- },
- {
- "name": "host_pid",
- "type": "INTEGER"
- },
- {
- "name": "host_ipc",
- "type": "INTEGER"
- },
- {
- "name": "se_linux",
- "type": "TEXT"
- },
- {
- "name": "run_as_user",
- "type": "TEXT"
- },
- {
- "name": "run_as_group",
- "type": "TEXT"
- },
- {
- "name": "supplemental_groups",
- "type": "TEXT"
- },
- {
- "name": "fs_group",
- "type": "TEXT"
- },
- {
- "name": "read_only_root_filesystem",
- "type": "INTEGER"
- },
- {
- "name": "default_allow_privilege_escalation",
- "type": "INTEGER"
- },
- {
- "name": "allow_privilege_escalation",
- "type": "INTEGER"
- },
- {
- "name": "allowed_host_paths",
- "type": "TEXT"
- },
- {
- "name": "allowed_flex_volumes",
- "type": "TEXT"
- },
- {
- "name": "allowed_csi_drivers",
- "type": "TEXT"
- },
- {
- "name": "allowed_unsafe_sysctls",
- "type": "TEXT"
- },
- {
- "name": "forbidden_sysctls",
- "type": "TEXT"
- },
- {
- "name": "allowed_proc_mount_types",
- "type": "TEXT"
- },
- {
- "name": "runtime_class",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_cluster_role_binding_subjects",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "role_api_group",
- "type": "TEXT"
- },
- {
- "name": "role_name",
- "type": "TEXT"
- },
- {
- "name": "role_kind",
- "type": "TEXT"
- },
- {
- "name": "subject_name",
- "type": "TEXT"
- },
- {
- "name": "subject_kind",
- "type": "TEXT"
- },
- {
- "name": "subject_namespace",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_cluster_role_policy_rules",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "verbs",
- "type": "TEXT"
- },
- {
- "name": "api_groups",
- "type": "TEXT"
- },
- {
- "name": "resources",
- "type": "TEXT"
- },
- {
- "name": "resource_names",
- "type": "TEXT"
- },
- {
- "name": "non_resource_urls",
- "type": "TEXT"
- },
- {
- "name": "aggregation_rule",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_role_binding_subjects",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "namespace",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "role_name",
- "type": "TEXT"
- },
- {
- "name": "role_kind",
- "type": "TEXT"
- },
- {
- "name": "subject_name",
- "type": "TEXT"
- },
- {
- "name": "subject_kind",
- "type": "TEXT"
- },
- {
- "name": "subject_namespace",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_role_policy_rules",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "namespace",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "verbs",
- "type": "TEXT"
- },
- {
- "name": "api_groups",
- "type": "TEXT"
- },
- {
- "name": "resources",
- "type": "TEXT"
- },
- {
- "name": "resource_names",
- "type": "TEXT"
- },
- {
- "name": "non_resource_urls",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_csi_drivers",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "attach_required",
- "type": "INTEGER"
- },
- {
- "name": "pod_info_on_mount",
- "type": "INTEGER"
- },
- {
- "name": "volume_lifecycle_modes",
- "type": "TEXT"
- },
- {
- "name": "storage_capacity",
- "type": "INTEGER"
- },
- {
- "name": "fs_group_policy",
- "type": "TEXT"
- },
- {
- "name": "token_requests",
- "type": "TEXT"
- },
- {
- "name": "requires_republish",
- "type": "INTEGER"
- }
- ]
- },
- {
- "name": "kubernetes_csi_node_drivers",
- "columns": [
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "node_id",
- "type": "TEXT"
- },
- {
- "name": "topology_keys",
- "type": "TEXT"
- },
- {
- "name": "allocatable",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_storage_classes",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "provisioner",
- "type": "TEXT"
- },
- {
- "name": "parameters",
- "type": "TEXT"
- },
- {
- "name": "reclaim_policy",
- "type": "TEXT"
- },
- {
- "name": "mount_options",
- "type": "TEXT"
- },
- {
- "name": "allow_volume_expansion",
- "type": "INTEGER"
- },
- {
- "name": "volume_binding_mode",
- "type": "TEXT"
- },
- {
- "name": "allowed_topologies",
- "type": "TEXT"
- }
- ]
- },
- {
- "name": "kubernetes_volume_attachments",
- "columns": [
- {
- "name": "uid",
- "type": "TEXT"
- },
- {
- "name": "cluster_name",
- "type": "TEXT"
- },
- {
- "name": "cluster_uid",
- "type": "TEXT"
- },
- {
- "name": "name",
- "type": "TEXT"
- },
- {
- "name": "creation_timestamp",
- "type": "BIGINT"
- },
- {
- "name": "labels",
- "type": "TEXT"
- },
- {
- "name": "annotations",
- "type": "TEXT"
- },
- {
- "name": "attacher",
- "type": "TEXT"
- },
- {
- "name": "source",
- "type": "TEXT"
- },
- {
- "name": "node_name",
- "type": "TEXT"
- },
- {
- "name": "attached",
- "type": "INTEGER"
- },
- {
- "name": "attachment_metadata",
- "type": "TEXT"
- },
- {
- "name": "attach_error",
- "type": "TEXT"
- },
- {
- "name": "detach_error",
- "type": "TEXT"
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/infrastructure/kubequery/etc/kubequery.conf b/infrastructure/kubequery/etc/kubequery.conf
deleted file mode 100644
index 5edb025ef4..0000000000
--- a/infrastructure/kubequery/etc/kubequery.conf
+++ /dev/null
@@ -1,206 +0,0 @@
-{
- "schedule": {
- "kubernetes_api_resources": {
- "query": "SELECT * FROM kubernetes_api_resources",
- "interval": 43200
- },
- "kubernetes_cluster_role_policy_rules": {
- "query": "SELECT * FROM kubernetes_cluster_role_policy_rules",
- "interval": 1800
- },
- "kubernetes_cluster_role_binding_subjects": {
- "query": "SELECT * FROM kubernetes_cluster_role_binding_subjects",
- "interval": 1800
- },
- "kubernetes_component_statuses": {
- "query": "SELECT * FROM kubernetes_component_statuses",
- "interval": 3600
- },
- "kubernetes_config_maps": {
- "query": "SELECT * FROM kubernetes_config_maps",
- "interval": 600
- },
- "kubernetes_cron_jobs": {
- "query": "SELECT * FROM kubernetes_cron_jobs",
- "interval": 600
- },
- "kubernetes_csi_drivers": {
- "query": "SELECT * FROM kubernetes_csi_drivers",
- "interval": 43200
- },
- "kubernetes_csi_node_drivers": {
- "query": "SELECT * FROM kubernetes_csi_node_drivers",
- "interval": 43200
- },
- "kubernetes_daemon_set_containers": {
- "query": "SELECT * FROM kubernetes_daemon_set_containers",
- "interval": 600
- },
- "kubernetes_daemon_sets": {
- "query": "SELECT * FROM kubernetes_daemon_sets",
- "interval": 600
- },
- "kubernetes_daemon_set_volumes": {
- "query": "SELECT * FROM kubernetes_daemon_set_volumes",
- "interval": 600
- },
- "kubernetes_deployments": {
- "query": "SELECT * FROM kubernetes_deployments",
- "interval": 600
- },
- "kubernetes_deployments_containers": {
- "query": "SELECT * FROM kubernetes_deployments_containers",
- "interval": 600
- },
- "kubernetes_deployments_volumes": {
- "query": "SELECT * FROM kubernetes_deployments_volumes",
- "interval": 600
- },
- "kubernetes_endpoint_subsets": {
- "query": "SELECT * FROM kubernetes_endpoint_subsets",
- "interval": 1800
- },
- "kubernetes_horizontal_pod_autoscalers": {
- "query": "SELECT * FROM kubernetes_horizontal_pod_autoscalers",
- "interval": 7200
- },
- "kubernetes_info": {
- "query": "SELECT * FROM kubernetes_info",
- "interval": 43200
- },
- "kubernetes_ingress_classes": {
- "query": "SELECT * FROM kubernetes_ingress_classes",
- "interval": 21600
- },
- "kubernetes_ingresses": {
- "query": "SELECT * FROM kubernetes_ingresses",
- "interval": 21600
- },
- "kubernetes_jobs": {
- "query": "SELECT * FROM kubernetes_jobs",
- "interval": 600
- },
- "kubernetes_limit_ranges": {
- "query": "SELECT * FROM kubernetes_limit_ranges",
- "interval": 21600
- },
- "kubernetes_mutating_webhooks": {
- "query": "SELECT * FROM kubernetes_mutating_webhooks",
- "interval": 7200
- },
- "kubernetes_namespaces": {
- "query": "SELECT * FROM kubernetes_namespaces",
- "interval": 3600
- },
- "kubernetes_network_policies": {
- "query": "SELECT * FROM kubernetes_network_policies",
- "interval": 1800
- },
- "kubernetes_nodes": {
- "query": "SELECT * FROM kubernetes_nodes",
- "interval": 600
- },
- "kubernetes_persistent_volume_claims": {
- "query": "SELECT * FROM kubernetes_persistent_volume_claims",
- "interval": 1800
- },
- "kubernetes_persistent_volumes": {
- "query": "SELECT * FROM kubernetes_persistent_volumes",
- "interval": 1800
- },
- "kubernetes_pod_containers": {
- "query": "SELECT * FROM kubernetes_pod_containers",
- "interval": 600
- },
- "kubernetes_pod_disruption_budgets": {
- "query": "SELECT * FROM kubernetes_pod_disruption_budgets",
- "interval": 1800
- },
- "kubernetes_pods": {
- "query": "SELECT * FROM kubernetes_pods",
- "interval": 600
- },
- "kubernetes_pod_security_policies": {
- "query": "SELECT * FROM kubernetes_pod_security_policies",
- "interval": 600
- },
- "kubernetes_pod_template_containers": {
- "query": "SELECT * FROM kubernetes_pod_template_containers",
- "interval": 1800
- },
- "kubernetes_pod_templates": {
- "query": "SELECT * FROM kubernetes_pod_templates",
- "interval": 1800
- },
- "kubernetes_pod_templates_volumes": {
- "query": "SELECT * FROM kubernetes_pod_templates_volumes",
- "interval": 1800
- },
- "kubernetes_pod_volumes": {
- "query": "SELECT * FROM kubernetes_pod_volumes",
- "interval": 600
- },
- "kubernetes_replica_set_containers": {
- "query": "SELECT * FROM kubernetes_replica_set_containers",
- "interval": 600
- },
- "kubernetes_replica_sets": {
- "query": "SELECT * FROM kubernetes_replica_sets",
- "interval": 600
- },
- "kubernetes_replica_set_volumes": {
- "query": "SELECT * FROM kubernetes_replica_set_volumes",
- "interval": 600
- },
- "kubernetes_resource_quotas": {
- "query": "SELECT * FROM kubernetes_resource_quotas",
- "interval": 3600
- },
- "kubernetes_role_binding_subjects": {
- "query": "SELECT * FROM kubernetes_role_binding_subjects",
- "interval": 600
- },
- "kubernetes_role_policy_rules": {
- "query": "SELECT * FROM kubernetes_role_policy_rules",
- "interval": 600
- },
- "kubernetes_secrets": {
- "query": "SELECT * FROM kubernetes_secrets",
- "interval": 600
- },
- "kubernetes_service_accounts": {
- "query": "SELECT * FROM kubernetes_service_accounts",
- "interval": 600
- },
- "kubernetes_services": {
- "query": "SELECT * FROM kubernetes_services",
- "interval": 900
- },
- "kubernetes_stateful_set_containers": {
- "query": "SELECT * FROM kubernetes_stateful_set_containers",
- "interval": 600
- },
- "kubernetes_stateful_sets": {
- "query": "SELECT * FROM kubernetes_stateful_sets",
- "interval": 600
- },
- "kubernetes_stateful_set_volumes": {
- "query": "SELECT * FROM kubernetes_stateful_set_volumes",
- "interval": 600
- },
- "kubernetes_storage_classes": {
- "query": "SELECT * FROM kubernetes_storage_classes",
- "interval": 21600
- },
- "kubernetes_validating_webhooks": {
- "query": "SELECT * FROM kubernetes_validating_webhooks",
- "interval": 7200
- },
- "kubernetes_volume_attachments": {
- "query": "SELECT * FROM kubernetes_volume_attachments",
- "interval": 3600
- }
- },
- "options":{
- }
-}
diff --git a/infrastructure/kubequery/etc/kubequery.flags b/infrastructure/kubequery/etc/kubequery.flags
deleted file mode 100644
index 3cbeacc6a5..0000000000
--- a/infrastructure/kubequery/etc/kubequery.flags
+++ /dev/null
@@ -1,2 +0,0 @@
---disable_events_staging=true
---schedule_splay_percent=50
diff --git a/infrastructure/kubequery/etc/kubequery.flags.tls b/infrastructure/kubequery/etc/kubequery.flags.tls
deleted file mode 100644
index 6237b08afd..0000000000
--- a/infrastructure/kubequery/etc/kubequery.flags.tls
+++ /dev/null
@@ -1,9 +0,0 @@
---schedule_splay_percent=50
---disable_watchdog=true
---tls_hostname=z6c0b1jca0.execute-api.us-west-2.amazonaws.com
---tls_server_certs=/opt/uptycs/etc/certs.pem
---enroll_secret_path=/opt/uptycs/config/enroll.secret
---enroll_tls_endpoint=/default/enroll
---logger_plugin=tls
---logger_tls_endpoint=/default/log
---logger_tls_compress=true
diff --git a/infrastructure/kubequery/go.mod b/infrastructure/kubequery/go.mod
deleted file mode 100644
index f152612265..0000000000
--- a/infrastructure/kubequery/go.mod
+++ /dev/null
@@ -1,58 +0,0 @@
-module github.com/Uptycs/kubequery
-
-go 1.17
-
-require (
- github.com/Uptycs/basequery-go v0.8.0
- github.com/google/uuid v1.3.0
- github.com/iancoleman/strcase v0.2.0
- github.com/stretchr/testify v1.7.0
- golang.org/x/lint v0.0.0-20210508222113-6edffad5e616
- k8s.io/api v0.22.4
- k8s.io/apimachinery v0.22.4
- k8s.io/client-go v0.22.4
-)
-
-require (
- github.com/Microsoft/go-winio v0.5.1 // indirect
- github.com/apache/thrift v0.15.0 // indirect
- github.com/beorn7/perks v1.0.1 // indirect
- github.com/cespare/xxhash/v2 v2.1.2 // indirect
- github.com/davecgh/go-spew v1.1.1 // indirect
- github.com/evanphx/json-patch v4.11.0+incompatible // indirect
- github.com/go-logr/logr v1.2.1 // indirect
- github.com/gogo/protobuf v1.3.2 // indirect
- github.com/golang/protobuf v1.5.2 // indirect
- github.com/google/go-cmp v0.5.6 // indirect
- github.com/google/gofuzz v1.2.0 // indirect
- github.com/googleapis/gnostic v0.5.5 // indirect
- github.com/imdario/mergo v0.3.12 // indirect
- github.com/json-iterator/go v1.1.12 // indirect
- github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
- github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
- github.com/modern-go/reflect2 v1.0.2 // indirect
- github.com/pkg/errors v0.9.1 // indirect
- github.com/pmezard/go-difflib v1.0.0 // indirect
- github.com/prometheus/client_golang v1.11.1 // indirect
- github.com/prometheus/client_model v0.2.0 // indirect
- github.com/prometheus/common v0.32.1 // indirect
- github.com/prometheus/procfs v0.7.3 // indirect
- github.com/spf13/pflag v1.0.5 // indirect
- golang.org/x/net v0.24.0 // indirect
- golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
- golang.org/x/sys v0.19.0 // indirect
- golang.org/x/term v0.19.0 // indirect
- golang.org/x/text v0.14.0 // indirect
- golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11 // indirect
- golang.org/x/tools v0.6.0 // indirect
- google.golang.org/appengine v1.6.7 // indirect
- google.golang.org/protobuf v1.33.0 // indirect
- gopkg.in/inf.v0 v0.9.1 // indirect
- gopkg.in/yaml.v2 v2.4.0 // indirect
- gopkg.in/yaml.v3 v3.0.0 // indirect
- k8s.io/klog/v2 v2.30.0 // indirect
- k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c // indirect
- k8s.io/utils v0.0.0-20211203121628-587287796c64 // indirect
- sigs.k8s.io/structured-merge-diff/v4 v4.2.0 // indirect
- sigs.k8s.io/yaml v1.3.0 // indirect
-)
diff --git a/infrastructure/kubequery/go.sum b/infrastructure/kubequery/go.sum
deleted file mode 100644
index 2876970659..0000000000
--- a/infrastructure/kubequery/go.sum
+++ /dev/null
@@ -1,673 +0,0 @@
-cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
-cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
-cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
-cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU=
-cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
-cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc=
-cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0=
-cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To=
-cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4=
-cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M=
-cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc=
-cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk=
-cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs=
-cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc=
-cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY=
-cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
-cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
-cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
-cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=
-cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=
-cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=
-cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
-cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
-cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
-cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=
-cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=
-cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU=
-cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
-cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=
-cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
-cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
-cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
-dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
-github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
-github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA=
-github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M=
-github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74=
-github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k=
-github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8=
-github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU=
-github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
-github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
-github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0=
-github.com/Microsoft/go-winio v0.5.1 h1:aPJp2QD7OOrhO5tQXqQoGSJc+DjDtWTGLOmNyAm6FgY=
-github.com/Microsoft/go-winio v0.5.1/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84=
-github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
-github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
-github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
-github.com/Uptycs/basequery-go v0.8.0 h1:a1g1ikKKOCnHGzqxfiXsvquUJU5hNcZkjtfTJXcEKcg=
-github.com/Uptycs/basequery-go v0.8.0/go.mod h1:U46Bme4Zi+bKG+wYVw2XFfk3bHs0WWzpWQ2R+ivgEd4=
-github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
-github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
-github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
-github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
-github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
-github.com/apache/thrift v0.14.2/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
-github.com/apache/thrift v0.15.0 h1:aGvdaR0v1t9XLgjtBYwxcBvBOTMqClzwE26CHOgjW1Y=
-github.com/apache/thrift v0.15.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU=
-github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
-github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
-github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
-github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
-github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
-github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
-github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
-github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
-github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
-github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
-github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
-github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
-github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
-github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
-github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
-github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
-github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
-github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
-github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
-github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
-github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
-github.com/evanphx/json-patch v4.11.0+incompatible h1:glyUF9yIYtMHzn8xaKw5rMhdWcwsYV8dZHIq5567/xs=
-github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
-github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
-github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
-github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
-github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
-github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
-github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
-github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
-github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
-github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
-github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
-github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
-github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
-github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
-github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
-github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas=
-github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=
-github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
-github.com/go-logr/logr v1.2.1 h1:DX7uPQ4WgAWfoh+NGGlbJQswnYIVvz0SRlLS3rPZQDA=
-github.com/go-logr/logr v1.2.1/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
-github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
-github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8=
-github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
-github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
-github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
-github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
-github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
-github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
-github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
-github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
-github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
-github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
-github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
-github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
-github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
-github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
-github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
-github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
-github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
-github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8=
-github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
-github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
-github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=
-github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
-github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
-github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
-github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
-github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
-github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
-github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
-github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
-github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
-github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
-github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
-github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
-github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
-github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA=
-github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
-github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
-github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
-github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
-github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
-github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
-github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
-github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
-github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
-github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
-github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
-github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
-github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
-github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
-github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
-github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
-github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
-github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
-github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
-github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
-github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
-github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
-github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
-github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
-github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU=
-github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw=
-github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA=
-github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
-github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
-github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
-github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
-github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
-github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0=
-github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho=
-github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
-github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
-github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU=
-github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
-github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
-github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
-github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
-github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
-github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
-github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
-github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
-github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
-github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
-github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
-github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
-github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
-github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
-github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
-github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
-github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
-github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
-github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
-github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
-github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
-github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
-github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
-github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
-github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
-github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
-github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
-github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
-github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
-github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
-github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
-github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
-github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
-github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
-github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
-github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
-github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
-github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
-github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
-github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
-github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78=
-github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
-github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
-github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
-github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
-github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA=
-github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
-github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
-github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
-github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE=
-github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
-github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
-github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
-github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
-github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
-github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
-github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
-github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
-github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0=
-github.com/prometheus/client_golang v1.11.1 h1:+4eQaD7vAZ6DsfsxB15hbE0odUjGI5ARs9yskGu1v4s=
-github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0=
-github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
-github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
-github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
-github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M=
-github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
-github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
-github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
-github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc=
-github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4=
-github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls=
-github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
-github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
-github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
-github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
-github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU=
-github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
-github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
-github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
-github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
-github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
-github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
-github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
-github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
-github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
-github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
-github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
-github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8=
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
-github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
-github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
-github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
-github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
-github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
-github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
-github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
-github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
-go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
-go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
-go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
-go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
-go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
-golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
-golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
-golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
-golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
-golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
-golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
-golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
-golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
-golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
-golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek=
-golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY=
-golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
-golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
-golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
-golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
-golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
-golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
-golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
-golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
-golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
-golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
-golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
-golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
-golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
-golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
-golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
-golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
-golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
-golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug=
-golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
-golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
-golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
-golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
-golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
-golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
-golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
-golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
-golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
-golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
-golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8=
-golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
-golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
-golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
-golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
-golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
-golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
-golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
-golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
-golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
-golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
-golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
-golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
-golang.org/x/net v0.0.0-20210520170846-37e1c6afe023/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
-golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
-golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
-golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
-golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
-golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w=
-golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
-golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
-golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
-golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
-golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
-golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
-golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 h1:RerP+noqYHUQ8CMRcPlC2nvTa4dcBIjegkuWdcUDuqg=
-golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
-golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
-golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
-golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
-golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
-golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
-golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
-golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek=
-golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
-golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk=
-golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
-golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
-golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
-golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
-golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
-golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
-golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
-golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
-golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
-golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
-golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
-golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11 h1:GZokNIeuVkl3aZHJchRrr13WCsols02MLUcz1U9is6M=
-golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
-golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
-golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
-golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
-golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
-golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
-golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
-golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
-golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
-golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
-golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
-golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
-golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
-golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
-golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
-golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
-golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
-golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
-golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
-golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
-golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
-golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
-golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
-golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
-golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM=
-golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
-golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
-golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
-google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
-google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
-google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
-google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
-google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
-google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
-google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
-google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
-google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
-google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
-google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
-google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
-google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
-google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM=
-google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc=
-google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
-google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
-google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
-google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
-google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
-google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
-google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c=
-google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
-google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
-google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
-google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
-google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
-google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
-google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
-google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
-google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
-google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
-google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
-google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
-google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
-google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
-google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
-google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA=
-google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=
-google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
-google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
-google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
-google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
-google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
-google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
-google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
-google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
-google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
-google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
-google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
-google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
-google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
-google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
-google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
-google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
-google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
-google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
-google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
-google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
-google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
-google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
-google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
-google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
-google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
-google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
-google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
-google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
-gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
-gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
-gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
-gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
-gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
-gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
-gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
-gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
-gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
-gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
-gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
-gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
-gopkg.in/yaml.v3 v3.0.0 h1:hjy8E9ON/egN1tAYqKb61G10WtihqetD4sz2H+8nIeA=
-gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
-honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
-honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
-honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
-honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
-honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
-honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
-honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
-k8s.io/api v0.22.4 h1:UvyHW0ezB2oIgHAxlYoo6UJQObYXU7awuNarwoHEOjw=
-k8s.io/api v0.22.4/go.mod h1:Rgs+9gIGYC5laXQSZZ9JqT5NevNgoGiOdVWi1BAB3qk=
-k8s.io/apimachinery v0.22.4 h1:9uwcvPpukBw/Ri0EUmWz+49cnFtaoiyEhQTK+xOe7Ck=
-k8s.io/apimachinery v0.22.4/go.mod h1:yU6oA6Gnax9RrxGzVvPFFJ+mpnW6PBSqp0sx0I0HHW0=
-k8s.io/client-go v0.22.4 h1:aAQ1Wk+I3bjCNk35YWUqbaueqrIonkfDPJSPDDe8Kfg=
-k8s.io/client-go v0.22.4/go.mod h1:Yzw4e5e7h1LNHA4uqnMVrpEpUs1hJOiuBsJKIlRCHDA=
-k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
-k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
-k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec=
-k8s.io/klog/v2 v2.30.0 h1:bUO6drIvCIsvZ/XFgfxoGFQU/a4Qkh0iAlvUR7vlHJw=
-k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
-k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c h1:jvamsI1tn9V0S8jicyX82qaFC0H/NKxv2e5mbqsgR80=
-k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw=
-k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
-k8s.io/utils v0.0.0-20211203121628-587287796c64 h1:EzpFOlqWaj9Qbd/q4TqWSSpaQ/3p30lV1hGvcMYKLWc=
-k8s.io/utils v0.0.0-20211203121628-587287796c64/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
-rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
-rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
-rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
-sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
-sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4=
-sigs.k8s.io/structured-merge-diff/v4 v4.2.0 h1:kDvPBbnPk+qYmkHmSo8vKGp438IASWofnbbUKDE/bv0=
-sigs.k8s.io/structured-merge-diff/v4 v4.2.0/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4=
-sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
-sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
-sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
diff --git a/infrastructure/kubequery/integration/index.js b/infrastructure/kubequery/integration/index.js
deleted file mode 100644
index b3622c3bbe..0000000000
--- a/infrastructure/kubequery/integration/index.js
+++ /dev/null
@@ -1,94 +0,0 @@
-'use strict';
-
-const util = require('util');
-const execFile = util.promisify(require('child_process').execFile);
-
-const EXEC_OPTIONS = { timeout: 10000, maxBuffer: 10 * 1024 * 1024 };
-
-const TABLES = [
- 'api_resources',
- 'cluster_role_binding_subjects',
- 'cluster_role_policy_rules',
- 'component_statuses',
- 'config_maps',
- 'cron_jobs',
- 'csi_drivers',
- 'csi_node_drivers',
- 'daemon_set_containers',
- 'daemon_set_volumes',
- 'daemon_sets',
- 'deployments',
- 'deployments_containers',
- 'deployments_volumes',
- 'endpoint_subsets',
- 'events',
- 'horizontal_pod_autoscalers',
- 'info',
- 'ingress_classes',
- 'ingresses',
- 'jobs',
- 'limit_ranges',
- 'mutating_webhooks',
- 'namespaces',
- 'network_policies',
- 'nodes',
- 'persistent_volume_claims',
- 'persistent_volumes',
- 'pod_containers',
- 'pod_disruption_budgets',
- 'pod_security_policies',
- 'pod_template_containers',
- 'pod_templates',
- 'pod_templates_volumes',
- 'pod_volumes',
- 'pods',
- 'replica_set_containers',
- 'replica_set_volumes',
- 'replica_sets',
- 'resource_quotas',
- 'role_binding_subjects',
- 'role_policy_rules',
- 'secrets',
- 'service_accounts',
- 'services',
- 'stateful_set_containers',
- 'stateful_set_volumes',
- 'stateful_sets',
- 'storage_classes',
- 'validating_webhooks',
- 'volume_attachments'
-];
-
-async function getPodName() {
- const { stdout, stderr } = await execFile('kubectl', ['get', 'pods', '-n', 'kubequery', '-o', "jsonpath={.items[0].metadata.name}"], EXEC_OPTIONS);
- if (stdout) {
- return stdout;
- }
- throw new Error('Failed to get kubequery pod name');
-}
-
-async function executeSQL(podName, sql) {
- const { stdout, stderr } = await execFile('kubectl', ['exec', '-it', podName, '-n', 'kubequery', '--', 'sh', '-c', `kubequeryi --json '${sql}'`], EXEC_OPTIONS);
- if (stdout) {
- return stdout;
- }
- throw new Error('Failed to execute SQL: ' + sql + '. Error: ' + stderr);
-}
-
-(async () => {
- try {
- const podName = await getPodName();
- for (const table of TABLES) {
- const output = await executeSQL(podName, 'SELECT * FROM kubernetes_' + table);
- console.assert(output !== '', 'Invalid output for table: ' + table);
-
- const json = JSON.parse(output);
- console.assert(Array.isArray(json), 'Table output is not an array: ' + table);
-
- console.info(table + ': ' + json.length);
- }
- } catch (err) {
- console.error(err);
- process.exit(1);
- }
-})();
diff --git a/infrastructure/kubequery/internal/k8s/admissionregistration/mutating_webhook.go b/infrastructure/kubequery/internal/k8s/admissionregistration/mutating_webhook.go
deleted file mode 100644
index ace121f184..0000000000
--- a/infrastructure/kubequery/internal/k8s/admissionregistration/mutating_webhook.go
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package admissionregistration
-
-import (
- "context"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/api/admissionregistration/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/types"
-)
-
-type mutatingWebhook struct {
- ClusterName string
- ClusterUID types.UID
- v1.MutatingWebhook
-}
-
-// MutatingWebhookColumns returns kubernetes mutating webhook fields as Osquery table columns.
-func MutatingWebhookColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&mutatingWebhook{})
-}
-
-// MutatingWebhooksGenerate generates the mutating webhook Osquery table data.
-func MutatingWebhooksGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- mwcs, err := k8s.GetClient().AdmissionregistrationV1().MutatingWebhookConfigurations().List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, mwc := range mwcs.Items {
- for _, mw := range mwc.Webhooks {
- item := &mutatingWebhook{
- ClusterName: k8s.GetClusterName(),
- ClusterUID: k8s.GetClusterUID(),
- MutatingWebhook: mw,
- }
- results = append(results, k8s.ToMap(item))
- }
- }
-
- if mwcs.Continue == "" {
- break
- }
- options.Continue = mwcs.Continue
- }
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/admissionregistration/mutating_webhook_test.go b/infrastructure/kubequery/internal/k8s/admissionregistration/mutating_webhook_test.go
deleted file mode 100644
index f9e90f3be5..0000000000
--- a/infrastructure/kubequery/internal/k8s/admissionregistration/mutating_webhook_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package admissionregistration
-
-import (
- "context"
- "testing"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- "github.com/stretchr/testify/assert"
- v1 "k8s.io/api/admissionregistration/v1"
- "k8s.io/apimachinery/pkg/types"
- "k8s.io/client-go/kubernetes/fake"
-)
-
-func TestMutatingWebhooksGenerate(t *testing.T) {
- i32 := int32(123)
- url := string("https://www.google.com")
- k8s.SetClient(fake.NewSimpleClientset(&v1.MutatingWebhookConfiguration{
- Webhooks: []v1.MutatingWebhook{
- {
- Name: "mw1",
- TimeoutSeconds: &i32,
- ClientConfig: v1.WebhookClientConfig{URL: &url},
- },
- {
- Name: "mw2",
- TimeoutSeconds: &i32,
- ClientConfig: v1.WebhookClientConfig{URL: &url},
- },
- },
- }), types.UID(""), "")
-
- mws, err := MutatingWebhooksGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{
- {
- "name": "mw1",
- "timeout_seconds": "123",
- "client_config": "{\"url\":\"https://www.google.com\"}",
- },
- {
- "name": "mw2",
- "timeout_seconds": "123",
- "client_config": "{\"url\":\"https://www.google.com\"}",
- },
- }, mws)
-}
diff --git a/infrastructure/kubequery/internal/k8s/admissionregistration/validating_webhook.go b/infrastructure/kubequery/internal/k8s/admissionregistration/validating_webhook.go
deleted file mode 100644
index 900c40be87..0000000000
--- a/infrastructure/kubequery/internal/k8s/admissionregistration/validating_webhook.go
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package admissionregistration
-
-import (
- "context"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/api/admissionregistration/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/types"
-)
-
-type validatingWebhook struct {
- ClusterName string
- ClusterUID types.UID
- v1.ValidatingWebhook
-}
-
-// ValidatingWebhookColumns returns kubernetes validating webhook fields as Osquery table columns.
-func ValidatingWebhookColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&validatingWebhook{})
-}
-
-// ValidatingWebhooksGenerate generates the kubernetes validating webhooks as Osquery table data.
-func ValidatingWebhooksGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- vwcs, err := k8s.GetClient().AdmissionregistrationV1().ValidatingWebhookConfigurations().List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, vwc := range vwcs.Items {
- for _, vw := range vwc.Webhooks {
- item := &validatingWebhook{
- ClusterName: k8s.GetClusterName(),
- ClusterUID: k8s.GetClusterUID(),
- ValidatingWebhook: vw,
- }
- results = append(results, k8s.ToMap(item))
- }
- }
-
- if vwcs.Continue == "" {
- break
- }
- options.Continue = vwcs.Continue
- }
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/admissionregistration/validating_webhook_test.go b/infrastructure/kubequery/internal/k8s/admissionregistration/validating_webhook_test.go
deleted file mode 100644
index 695b314c0e..0000000000
--- a/infrastructure/kubequery/internal/k8s/admissionregistration/validating_webhook_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package admissionregistration
-
-import (
- "context"
- "testing"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- "github.com/stretchr/testify/assert"
- v1 "k8s.io/api/admissionregistration/v1"
- "k8s.io/apimachinery/pkg/types"
- "k8s.io/client-go/kubernetes/fake"
-)
-
-func TestValidatingWebhooksGenerate(t *testing.T) {
- i32 := int32(123)
- url := string("https://www.google.com")
- k8s.SetClient(fake.NewSimpleClientset(&v1.ValidatingWebhookConfiguration{
- Webhooks: []v1.ValidatingWebhook{
- {
- Name: "vw1",
- TimeoutSeconds: &i32,
- ClientConfig: v1.WebhookClientConfig{URL: &url},
- },
- {
- Name: "vw2",
- TimeoutSeconds: &i32,
- ClientConfig: v1.WebhookClientConfig{URL: &url},
- },
- },
- }), types.UID(""), "")
-
- mws, err := ValidatingWebhooksGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{
- {
- "name": "vw1",
- "timeout_seconds": "123",
- "client_config": "{\"url\":\"https://www.google.com\"}",
- },
- {
- "name": "vw2",
- "timeout_seconds": "123",
- "client_config": "{\"url\":\"https://www.google.com\"}",
- },
- }, mws)
-}
diff --git a/infrastructure/kubequery/internal/k8s/apps/daemon_set.go b/infrastructure/kubequery/internal/k8s/apps/daemon_set.go
deleted file mode 100644
index 77db54c9c7..0000000000
--- a/infrastructure/kubequery/internal/k8s/apps/daemon_set.go
+++ /dev/null
@@ -1,175 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package apps
-
-import (
- "context"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/api/apps/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-type daemonSet struct {
- k8s.CommonNamespacedFields
- k8s.CommonPodFields
- v1.DaemonSetStatus
- Selector *metav1.LabelSelector
- UpdateStrategy v1.DaemonSetUpdateStrategy
- MinReadySeconds int32
- RevisionHistoryLimit *int32
-}
-
-// DaemonSetColumns returns kubernetes daemon set fields as Osquery table columns.
-func DaemonSetColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&daemonSet{})
-}
-
-// DaemonSetsGenerate generates the kubernetes daemon sets as Osquery table data.
-func DaemonSetsGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- dss, err := k8s.GetClient().AppsV1().DaemonSets(metav1.NamespaceAll).List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, ds := range dss.Items {
- item := &daemonSet{
- CommonNamespacedFields: k8s.GetCommonNamespacedFields(ds.ObjectMeta),
- CommonPodFields: k8s.GetCommonPodFields(ds.Spec.Template.Spec),
- DaemonSetStatus: ds.Status,
- Selector: ds.Spec.Selector,
- UpdateStrategy: ds.Spec.UpdateStrategy,
- MinReadySeconds: ds.Spec.MinReadySeconds,
- RevisionHistoryLimit: ds.Spec.RevisionHistoryLimit,
- }
- results = append(results, k8s.ToMap(item))
- }
-
- if dss.Continue == "" {
- break
- }
- options.Continue = dss.Continue
- }
-
- return results, nil
-}
-
-type daemonSetContainer struct {
- k8s.CommonNamespacedFields
- k8s.CommonContainerFields
- DaemonSetName string
- ContainerType string
-}
-
-// DaemonSetContainerColumns returns kubernetes daemon set container fields as Osquery table columns.
-func DaemonSetContainerColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&daemonSetContainer{})
-}
-
-// DaemonSetContainersGenerate generates the kubernetes daemon set containers as Osquery table data.
-func DaemonSetContainersGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- dss, err := k8s.GetClient().AppsV1().DaemonSets(metav1.NamespaceAll).List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, ds := range dss.Items {
- for _, c := range ds.Spec.Template.Spec.InitContainers {
- item := &daemonSetContainer{
- CommonNamespacedFields: k8s.GetParentCommonNamespacedFields(ds.ObjectMeta, c.Name),
- CommonContainerFields: k8s.GetCommonContainerFields(c),
- DaemonSetName: ds.Name,
- ContainerType: "init",
- }
- item.Name = c.Name
- results = append(results, k8s.ToMap(item))
- }
- for _, c := range ds.Spec.Template.Spec.Containers {
- item := &daemonSetContainer{
- CommonNamespacedFields: k8s.GetParentCommonNamespacedFields(ds.ObjectMeta, c.Name),
- CommonContainerFields: k8s.GetCommonContainerFields(c),
- DaemonSetName: ds.Name,
- ContainerType: "container",
- }
- item.Name = c.Name
- results = append(results, k8s.ToMap(item))
- }
- for _, c := range ds.Spec.Template.Spec.EphemeralContainers {
- item := &daemonSetContainer{
- CommonNamespacedFields: k8s.GetParentCommonNamespacedFields(ds.ObjectMeta, c.Name),
- CommonContainerFields: k8s.GetCommonEphemeralContainerFields(c),
- DaemonSetName: ds.Name,
- ContainerType: "ephemeral",
- }
- item.Name = c.Name
- results = append(results, k8s.ToMap(item))
- }
- }
-
- if dss.Continue == "" {
- break
- }
- options.Continue = dss.Continue
- }
-
- return results, nil
-}
-
-type daemonSetVolume struct {
- k8s.CommonNamespacedFields
- k8s.CommonVolumeFields
- DaemonSetName string
-}
-
-// DaemonSetVolumeColumns returns kubernetes daemon set volume fields as Osquery table columns.
-func DaemonSetVolumeColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&daemonSetVolume{})
-}
-
-// DaemonSetVolumesGenerate generates the kubernetes daemon set volumes as Osquery table data.
-func DaemonSetVolumesGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- dss, err := k8s.GetClient().AppsV1().DaemonSets(metav1.NamespaceAll).List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, ds := range dss.Items {
- for _, v := range ds.Spec.Template.Spec.Volumes {
- item := &daemonSetVolume{
- CommonNamespacedFields: k8s.GetCommonNamespacedFields(ds.ObjectMeta),
- CommonVolumeFields: k8s.GetCommonVolumeFields(v),
- DaemonSetName: ds.Name,
- }
- item.Name = v.Name
- results = append(results, k8s.ToMap(item))
- }
- }
-
- if dss.Continue == "" {
- break
- }
- options.Continue = dss.Continue
- }
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/apps/daemon_set_test.go b/infrastructure/kubequery/internal/k8s/apps/daemon_set_test.go
deleted file mode 100644
index b51692e2ae..0000000000
--- a/infrastructure/kubequery/internal/k8s/apps/daemon_set_test.go
+++ /dev/null
@@ -1,324 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package apps
-
-import (
- "context"
- "testing"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/stretchr/testify/assert"
-)
-
-func TestDaemonSetsGenerate(t *testing.T) {
- dss, err := DaemonSetsGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{
- {
- "annotations": "{\"deprecated.daemonset.template.generation\":\"1\"}",
- "cluster_uid": "blah",
- "creation_timestamp": "1610476216",
- "current_number_scheduled": "1",
- "desired_number_scheduled": "1",
- "dns_policy": "ClusterFirst",
- "host_ipc": "0",
- "host_network": "1",
- "host_pid": "0",
- "labels": "{\"k8s-app\":\"calico-node\"}",
- "min_ready_seconds": "0",
- "name": "calico-node",
- "namespace": "kube-system",
- "node_selector": "{\"kubernetes.io/os\":\"linux\"}",
- "number_available": "1",
- "number_misscheduled": "0",
- "number_ready": "1",
- "number_unavailable": "0",
- "observed_generation": "1",
- "priority_class_name": "system-node-critical",
- "restart_policy": "Always",
- "revision_history_limit": "10",
- "scheduler_name": "default-scheduler",
- "selector": "{\"matchLabels\":{\"k8s-app\":\"calico-node\"}}",
- "service_account_name": "calico-node",
- "termination_grace_period_seconds": "0",
- "tolerations": "[{\"operator\":\"Exists\",\"effect\":\"NoSchedule\"},{\"key\":\"CriticalAddonsOnly\",\"operator\":\"Exists\"},{\"operator\":\"Exists\",\"effect\":\"NoExecute\"}]",
- "uid": "e6fed7f0-f79a-464f-a3d2-b63247a1f590",
- "update_strategy": "{\"type\":\"RollingUpdate\",\"rollingUpdate\":{\"maxUnavailable\":1}}",
- "updated_number_scheduled": "1",
- },
- }, dss)
-}
-
-func TestDaemonSetContainersGenerate(t *testing.T) {
- dss, err := DaemonSetContainersGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{
- {
- "annotations": "{\"deprecated.daemonset.template.generation\":\"1\"}",
- "cluster_uid": "blah",
- "command": "[\"/opt/cni/bin/calico-ipam\",\"-upgrade\"]",
- "container_type": "init",
- "creation_timestamp": "1610476216",
- "daemon_set_name": "calico-node",
- "env": "[{\"name\":\"KUBERNETES_NODE_NAME\",\"valueFrom\":{\"fieldRef\":{\"apiVersion\":\"v1\",\"fieldPath\":\"spec.nodeName\"}}},{\"name\":\"CALICO_NETWORKING_BACKEND\",\"valueFrom\":{\"configMapKeyRef\":{\"name\":\"calico-config\",\"key\":\"calico_backend\"}}}]",
- "image": "calico/cni:v3.13.2",
- "image_pull_policy": "IfNotPresent",
- "labels": "{\"k8s-app\":\"calico-node\"}",
- "name": "upgrade-ipam",
- "namespace": "kube-system",
- "privileged": "1",
- "stdin": "0",
- "stdin_once": "0",
- "termination_message_path": "/dev/termination-log",
- "termination_message_policy": "File",
- "tty": "0",
- "uid": "8b0b4bb2-1703-551e-9e14-af10886a5eec",
- "volume_mounts": "[{\"name\":\"host-local-net-dir\",\"mountPath\":\"/var/lib/cni/networks\"},{\"name\":\"cni-bin-dir\",\"mountPath\":\"/host/opt/cni/bin\"}]",
- },
- {
- "annotations": "{\"deprecated.daemonset.template.generation\":\"1\"}",
- "cluster_uid": "blah",
- "command": "[\"/install-cni.sh\"]",
- "container_type": "init",
- "creation_timestamp": "1610476216",
- "daemon_set_name": "calico-node",
- "env": "[{\"name\":\"CNI_CONF_NAME\",\"value\":\"10-calico.conflist\"},{\"name\":\"CNI_NETWORK_CONFIG\",\"valueFrom\":{\"configMapKeyRef\":{\"name\":\"calico-config\",\"key\":\"cni_network_config\"}}},{\"name\":\"KUBERNETES_NODE_NAME\",\"valueFrom\":{\"fieldRef\":{\"apiVersion\":\"v1\",\"fieldPath\":\"spec.nodeName\"}}},{\"name\":\"CNI_MTU\",\"valueFrom\":{\"configMapKeyRef\":{\"name\":\"calico-config\",\"key\":\"veth_mtu\"}}},{\"name\":\"SLEEP\",\"value\":\"false\"},{\"name\":\"CNI_NET_DIR\",\"value\":\"/var/snap/microk8s/current/args/cni-network\"}]",
- "image": "calico/cni:v3.13.2",
- "image_pull_policy": "IfNotPresent",
- "labels": "{\"k8s-app\":\"calico-node\"}",
- "name": "install-cni",
- "namespace": "kube-system",
- "privileged": "1",
- "stdin": "0",
- "stdin_once": "0",
- "termination_message_path": "/dev/termination-log",
- "termination_message_policy": "File",
- "tty": "0",
- "uid": "e773308e-cb75-5c58-9d85-0b71c92f8a24",
- "volume_mounts": "[{\"name\":\"cni-bin-dir\",\"mountPath\":\"/host/opt/cni/bin\"},{\"name\":\"cni-net-dir\",\"mountPath\":\"/host/etc/cni/net.d\"}]",
- },
- {
- "annotations": "{\"deprecated.daemonset.template.generation\":\"1\"}",
- "cluster_uid": "blah",
- "container_type": "init",
- "creation_timestamp": "1610476216",
- "daemon_set_name": "calico-node",
- "image": "calico/pod2daemon-flexvol:v3.13.2",
- "image_pull_policy": "IfNotPresent",
- "labels": "{\"k8s-app\":\"calico-node\"}",
- "name": "flexvol-driver",
- "namespace": "kube-system",
- "privileged": "1",
- "stdin": "0",
- "stdin_once": "0",
- "termination_message_path": "/dev/termination-log",
- "termination_message_policy": "File",
- "tty": "0",
- "uid": "8122bba4-1bdc-562f-9a01-96345dbc3e4c",
- "volume_mounts": "[{\"name\":\"flexvol-driver-host\",\"mountPath\":\"/host/driver\"}]",
- },
- {
- "annotations": "{\"deprecated.daemonset.template.generation\":\"1\"}",
- "cluster_uid": "blah",
- "container_type": "container",
- "creation_timestamp": "1610476216",
- "daemon_set_name": "calico-node",
- "env": "[{\"name\":\"DATASTORE_TYPE\",\"value\":\"kubernetes\"},{\"name\":\"WAIT_FOR_DATASTORE\",\"value\":\"true\"},{\"name\":\"NODENAME\",\"valueFrom\":{\"fieldRef\":{\"apiVersion\":\"v1\",\"fieldPath\":\"spec.nodeName\"}}},{\"name\":\"CALICO_NETWORKING_BACKEND\",\"valueFrom\":{\"configMapKeyRef\":{\"name\":\"calico-config\",\"key\":\"calico_backend\"}}},{\"name\":\"CLUSTER_TYPE\",\"value\":\"k8s,bgp\"},{\"name\":\"IP\",\"value\":\"autodetect\"},{\"name\":\"IP_AUTODETECTION_METHOD\",\"value\":\"first-found\"},{\"name\":\"CALICO_IPV4POOL_VXLAN\",\"value\":\"Always\"},{\"name\":\"FELIX_IPINIPMTU\",\"valueFrom\":{\"configMapKeyRef\":{\"name\":\"calico-config\",\"key\":\"veth_mtu\"}}},{\"name\":\"CALICO_IPV4POOL_CIDR\",\"value\":\"10.1.0.0/16\"},{\"name\":\"CALICO_DISABLE_FILE_LOGGING\",\"value\":\"true\"},{\"name\":\"FELIX_DEFAULTENDPOINTTOHOSTACTION\",\"value\":\"ACCEPT\"},{\"name\":\"FELIX_IPV6SUPPORT\",\"value\":\"false\"},{\"name\":\"FELIX_LOGSEVERITYSCREEN\",\"value\":\"error\"},{\"name\":\"FELIX_HEALTHENABLED\",\"value\":\"true\"}]",
- "image": "calico/node:v3.13.2",
- "image_pull_policy": "IfNotPresent",
- "labels": "{\"k8s-app\":\"calico-node\"}",
- "liveness_probe": "{\"exec\":{\"command\":[\"/bin/calico-node\",\"-felix-live\"]},\"initialDelaySeconds\":10,\"timeoutSeconds\":1,\"periodSeconds\":10,\"successThreshold\":1,\"failureThreshold\":6}",
- "name": "calico-node",
- "namespace": "kube-system",
- "privileged": "1",
- "readiness_probe": "{\"exec\":{\"command\":[\"/bin/calico-node\",\"-felix-ready\"]},\"timeoutSeconds\":1,\"periodSeconds\":10,\"successThreshold\":1,\"failureThreshold\":3}",
- "resource_requests": "{\"cpu\":\"250m\"}",
- "stdin": "0",
- "stdin_once": "0",
- "termination_message_path": "/dev/termination-log",
- "termination_message_policy": "File",
- "tty": "0",
- "uid": "7f7da4e6-2c04-5e4e-aedb-bd1e9e8e5469",
- "volume_mounts": "[{\"name\":\"lib-modules\",\"readOnly\":true,\"mountPath\":\"/lib/modules\"},{\"name\":\"xtables-lock\",\"mountPath\":\"/run/xtables.lock\"},{\"name\":\"var-run-calico\",\"mountPath\":\"/var/run/calico\"},{\"name\":\"var-lib-calico\",\"mountPath\":\"/var/lib/calico\"},{\"name\":\"policysync\",\"mountPath\":\"/var/run/nodeagent\"}]",
- },
- }, dss)
-}
-
-func TestDaemonSetVolumesGenerate(t *testing.T) {
- dss, err := DaemonSetVolumesGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{
- {
- "annotations": "{\"deprecated.daemonset.template.generation\":\"1\"}",
- "aws_elastic_block_store_partition": "0",
- "cluster_uid": "blah",
- "creation_timestamp": "1610476216",
- "daemon_set_name": "calico-node",
- "gce_persistent_disk_partition": "0",
- "host_path_path": "/lib/modules",
- "iscsi_discovery_chap_auth": "0",
- "iscsi_lun": "0",
- "iscsi_session_chap_auth": "0",
- "labels": "{\"k8s-app\":\"calico-node\"}",
- "name": "lib-modules",
- "namespace": "kube-system",
- "scale_iossl_enabled": "0",
- "uid": "e6fed7f0-f79a-464f-a3d2-b63247a1f590",
- "volume_type": "host_path",
- },
- {
- "annotations": "{\"deprecated.daemonset.template.generation\":\"1\"}",
- "aws_elastic_block_store_partition": "0",
- "cluster_uid": "blah",
- "creation_timestamp": "1610476216",
- "daemon_set_name": "calico-node",
- "gce_persistent_disk_partition": "0",
- "host_path_path": "/var/snap/microk8s/current/var/run/calico",
- "iscsi_discovery_chap_auth": "0",
- "iscsi_lun": "0",
- "iscsi_session_chap_auth": "0",
- "labels": "{\"k8s-app\":\"calico-node\"}",
- "name": "var-run-calico",
- "namespace": "kube-system",
- "scale_iossl_enabled": "0",
- "uid": "e6fed7f0-f79a-464f-a3d2-b63247a1f590",
- "volume_type": "host_path",
- },
- {
- "annotations": "{\"deprecated.daemonset.template.generation\":\"1\"}",
- "aws_elastic_block_store_partition": "0",
- "cluster_uid": "blah",
- "creation_timestamp": "1610476216",
- "daemon_set_name": "calico-node",
- "gce_persistent_disk_partition": "0",
- "host_path_path": "/var/snap/microk8s/current/var/lib/calico",
- "iscsi_discovery_chap_auth": "0",
- "iscsi_lun": "0",
- "iscsi_session_chap_auth": "0",
- "labels": "{\"k8s-app\":\"calico-node\"}",
- "name": "var-lib-calico",
- "namespace": "kube-system",
- "scale_iossl_enabled": "0",
- "uid": "e6fed7f0-f79a-464f-a3d2-b63247a1f590",
- "volume_type": "host_path",
- },
- {
- "annotations": "{\"deprecated.daemonset.template.generation\":\"1\"}",
- "aws_elastic_block_store_partition": "0",
- "cluster_uid": "blah",
- "creation_timestamp": "1610476216",
- "daemon_set_name": "calico-node",
- "gce_persistent_disk_partition": "0",
- "host_path_path": "/run/xtables.lock",
- "host_path_type": "FileOrCreate",
- "iscsi_discovery_chap_auth": "0",
- "iscsi_lun": "0",
- "iscsi_session_chap_auth": "0",
- "labels": "{\"k8s-app\":\"calico-node\"}",
- "name": "xtables-lock",
- "namespace": "kube-system",
- "scale_iossl_enabled": "0",
- "uid": "e6fed7f0-f79a-464f-a3d2-b63247a1f590",
- "volume_type": "host_path",
- },
- {
- "annotations": "{\"deprecated.daemonset.template.generation\":\"1\"}",
- "aws_elastic_block_store_partition": "0",
- "cluster_uid": "blah",
- "creation_timestamp": "1610476216",
- "daemon_set_name": "calico-node",
- "gce_persistent_disk_partition": "0",
- "host_path_path": "/var/snap/microk8s/current/opt/cni/bin",
- "iscsi_discovery_chap_auth": "0",
- "iscsi_lun": "0",
- "iscsi_session_chap_auth": "0",
- "labels": "{\"k8s-app\":\"calico-node\"}",
- "name": "cni-bin-dir",
- "namespace": "kube-system",
- "scale_iossl_enabled": "0",
- "uid": "e6fed7f0-f79a-464f-a3d2-b63247a1f590",
- "volume_type": "host_path",
- },
- {
- "annotations": "{\"deprecated.daemonset.template.generation\":\"1\"}",
- "aws_elastic_block_store_partition": "0",
- "cluster_uid": "blah",
- "creation_timestamp": "1610476216",
- "daemon_set_name": "calico-node",
- "gce_persistent_disk_partition": "0",
- "host_path_path": "/var/snap/microk8s/current/args/cni-network",
- "iscsi_discovery_chap_auth": "0",
- "iscsi_lun": "0",
- "iscsi_session_chap_auth": "0",
- "labels": "{\"k8s-app\":\"calico-node\"}",
- "name": "cni-net-dir",
- "namespace": "kube-system",
- "scale_iossl_enabled": "0",
- "uid": "e6fed7f0-f79a-464f-a3d2-b63247a1f590",
- "volume_type": "host_path",
- },
- {
- "annotations": "{\"deprecated.daemonset.template.generation\":\"1\"}",
- "aws_elastic_block_store_partition": "0",
- "cluster_uid": "blah",
- "creation_timestamp": "1610476216",
- "daemon_set_name": "calico-node",
- "gce_persistent_disk_partition": "0",
- "host_path_path": "/var/snap/microk8s/current/var/lib/cni/networks",
- "iscsi_discovery_chap_auth": "0",
- "iscsi_lun": "0",
- "iscsi_session_chap_auth": "0",
- "labels": "{\"k8s-app\":\"calico-node\"}",
- "name": "host-local-net-dir",
- "namespace": "kube-system",
- "scale_iossl_enabled": "0",
- "uid": "e6fed7f0-f79a-464f-a3d2-b63247a1f590",
- "volume_type": "host_path",
- },
- {
- "annotations": "{\"deprecated.daemonset.template.generation\":\"1\"}",
- "aws_elastic_block_store_partition": "0",
- "cluster_uid": "blah",
- "creation_timestamp": "1610476216",
- "daemon_set_name": "calico-node",
- "gce_persistent_disk_partition": "0",
- "host_path_path": "/var/snap/microk8s/current/var/run/nodeagent",
- "host_path_type": "DirectoryOrCreate",
- "iscsi_discovery_chap_auth": "0",
- "iscsi_lun": "0",
- "iscsi_session_chap_auth": "0",
- "labels": "{\"k8s-app\":\"calico-node\"}",
- "name": "policysync",
- "namespace": "kube-system",
- "scale_iossl_enabled": "0",
- "uid": "e6fed7f0-f79a-464f-a3d2-b63247a1f590",
- "volume_type": "host_path",
- },
- {
- "annotations": "{\"deprecated.daemonset.template.generation\":\"1\"}",
- "aws_elastic_block_store_partition": "0",
- "cluster_uid": "blah",
- "creation_timestamp": "1610476216",
- "daemon_set_name": "calico-node",
- "gce_persistent_disk_partition": "0",
- "host_path_path": "/usr/libexec/kubernetes/kubelet-plugins/volume/exec/nodeagent~uds",
- "host_path_type": "DirectoryOrCreate",
- "iscsi_discovery_chap_auth": "0",
- "iscsi_lun": "0",
- "iscsi_session_chap_auth": "0",
- "labels": "{\"k8s-app\":\"calico-node\"}",
- "name": "flexvol-driver-host",
- "namespace": "kube-system",
- "scale_iossl_enabled": "0",
- "uid": "e6fed7f0-f79a-464f-a3d2-b63247a1f590",
- "volume_type": "host_path",
- },
- }, dss)
-}
diff --git a/infrastructure/kubequery/internal/k8s/apps/deployment.go b/infrastructure/kubequery/internal/k8s/apps/deployment.go
deleted file mode 100644
index 7b243efa8a..0000000000
--- a/infrastructure/kubequery/internal/k8s/apps/deployment.go
+++ /dev/null
@@ -1,181 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package apps
-
-import (
- "context"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/api/apps/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-type deployment struct {
- k8s.CommonNamespacedFields
- k8s.CommonPodFields
- v1.DeploymentStatus
- DeploymentReplicas *int32
- Selector *metav1.LabelSelector
- Strategy v1.DeploymentStrategy
- MinReadySeconds int32
- RevisionHistoryLimit *int32
- Paused bool
- ProgressDeadlineSeconds *int32
-}
-
-// DeploymentColumns returns kubernetes deployment fields as Osquery table columns.
-func DeploymentColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&deployment{})
-}
-
-// DeploymentsGenerate generates the kubernetes deployments as Osquery table data.
-func DeploymentsGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- ds, err := k8s.GetClient().AppsV1().Deployments(metav1.NamespaceAll).List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, d := range ds.Items {
- item := &deployment{
- CommonNamespacedFields: k8s.GetCommonNamespacedFields(d.ObjectMeta),
- CommonPodFields: k8s.GetCommonPodFields(d.Spec.Template.Spec),
- DeploymentReplicas: d.Spec.Replicas,
- Selector: d.Spec.Selector,
- Strategy: d.Spec.Strategy,
- MinReadySeconds: d.Spec.MinReadySeconds,
- RevisionHistoryLimit: d.Spec.RevisionHistoryLimit,
- Paused: d.Spec.Paused,
- ProgressDeadlineSeconds: d.Spec.ProgressDeadlineSeconds,
- DeploymentStatus: d.Status,
- }
- results = append(results, k8s.ToMap(item))
- }
-
- if ds.Continue == "" {
- break
- }
- options.Continue = ds.Continue
- }
-
- return results, nil
-}
-
-type deploymentContainer struct {
- k8s.CommonNamespacedFields
- k8s.CommonContainerFields
- DeploymentName string
- ContainerType string
-}
-
-// DeploymentContainerColumns returns kubernetes deployment container fields as Osquery table columns.
-func DeploymentContainerColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&deploymentContainer{})
-}
-
-// DeploymentContainersGenerate generates the kubernetes deployment containers as Osquery table data.
-func DeploymentContainersGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- ds, err := k8s.GetClient().AppsV1().Deployments(metav1.NamespaceAll).List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, d := range ds.Items {
- for _, c := range d.Spec.Template.Spec.InitContainers {
- item := &deploymentContainer{
- CommonNamespacedFields: k8s.GetParentCommonNamespacedFields(d.ObjectMeta, c.Name),
- CommonContainerFields: k8s.GetCommonContainerFields(c),
- DeploymentName: d.Name,
- ContainerType: "init",
- }
- item.Name = c.Name
- results = append(results, k8s.ToMap(item))
- }
- for _, c := range d.Spec.Template.Spec.Containers {
- item := &deploymentContainer{
- CommonNamespacedFields: k8s.GetParentCommonNamespacedFields(d.ObjectMeta, c.Name),
- CommonContainerFields: k8s.GetCommonContainerFields(c),
- DeploymentName: d.Name,
- ContainerType: "container",
- }
- item.Name = c.Name
- results = append(results, k8s.ToMap(item))
- }
- for _, c := range d.Spec.Template.Spec.EphemeralContainers {
- item := &deploymentContainer{
- CommonNamespacedFields: k8s.GetParentCommonNamespacedFields(d.ObjectMeta, c.Name),
- CommonContainerFields: k8s.GetCommonEphemeralContainerFields(c),
- DeploymentName: d.Name,
- ContainerType: "ephemeral",
- }
- item.Name = c.Name
- results = append(results, k8s.ToMap(item))
- }
- }
-
- if ds.Continue == "" {
- break
- }
- options.Continue = ds.Continue
- }
-
- return results, nil
-}
-
-type deploymentVolume struct {
- k8s.CommonNamespacedFields
- k8s.CommonVolumeFields
- DeploymentName string
-}
-
-// DeploymentVolumeColumns returns kubernetes deployment volume fields as Osquery table columns.
-func DeploymentVolumeColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&deploymentVolume{})
-}
-
-// DeploymentVolumesGenerate generates the kubernetes deployment volumes as Osquery table data.
-func DeploymentVolumesGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- ds, err := k8s.GetClient().AppsV1().Deployments(metav1.NamespaceAll).List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, d := range ds.Items {
- for _, v := range d.Spec.Template.Spec.Volumes {
- item := &deploymentVolume{
- CommonNamespacedFields: k8s.GetCommonNamespacedFields(d.ObjectMeta),
- CommonVolumeFields: k8s.GetCommonVolumeFields(v),
- DeploymentName: d.Name,
- }
- item.Name = v.Name
- results = append(results, k8s.ToMap(item))
- }
- }
-
- if ds.Continue == "" {
- break
- }
- options.Continue = ds.Continue
- }
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/apps/deployment_test.go b/infrastructure/kubequery/internal/k8s/apps/deployment_test.go
deleted file mode 100644
index adaf4f3a23..0000000000
--- a/infrastructure/kubequery/internal/k8s/apps/deployment_test.go
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package apps
-
-import (
- "context"
- "testing"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/stretchr/testify/assert"
-)
-
-func TestDeploymentsGenerate(t *testing.T) {
- ds, err := DeploymentsGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{
- {
- "available_replicas": "0",
- "cluster_uid": "blah",
- "creation_timestamp": "0",
- "host_ipc": "0",
- "host_network": "0",
- "host_pid": "0",
- "min_ready_seconds": "0",
- "observed_generation": "0",
- "paused": "0",
- "ready_replicas": "0",
- "replicas": "0",
- "strategy": "{}",
- "unavailable_replicas": "0",
- "updated_replicas": "0",
- },
- }, ds)
-}
-
-func TestDeploymentContainersGenerate(t *testing.T) {
- ds, err := DeploymentContainersGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{}, ds)
-}
-
-func TestDeploymentVolumesGenerate(t *testing.T) {
- ds, err := DeploymentVolumesGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{}, ds)
-}
diff --git a/infrastructure/kubequery/internal/k8s/apps/init_test.go b/infrastructure/kubequery/internal/k8s/apps/init_test.go
deleted file mode 100644
index 714afdb28c..0000000000
--- a/infrastructure/kubequery/internal/k8s/apps/init_test.go
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package apps
-
-import (
- "encoding/json"
- "io/ioutil"
- "path/filepath"
-
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/api/apps/v1"
- "k8s.io/apimachinery/pkg/types"
- "k8s.io/client-go/kubernetes/fake"
-)
-
-func loadTestResource(name string, v interface{}) {
- path := filepath.Join("testdata", name)
- data, err := ioutil.ReadFile(path)
- if err != nil {
- panic(err)
- }
-
- err = json.Unmarshal(data, v)
- if err != nil {
- panic(err)
- }
-}
-
-func init() {
- ds := &v1.DaemonSet{}
- loadTestResource("daemon_set_test.json", ds)
- d := &v1.Deployment{}
- loadTestResource("deployment_test.json", d)
- rs := &v1.ReplicaSet{}
- loadTestResource("replica_set_test.json", rs)
- ss := &v1.StatefulSet{}
- loadTestResource("stateful_set_test.json", ss)
-
- k8s.SetClient(fake.NewSimpleClientset(ds, d, rs, ss), types.UID("blah"), "")
-}
diff --git a/infrastructure/kubequery/internal/k8s/apps/replica_set.go b/infrastructure/kubequery/internal/k8s/apps/replica_set.go
deleted file mode 100644
index bc54b83c95..0000000000
--- a/infrastructure/kubequery/internal/k8s/apps/replica_set.go
+++ /dev/null
@@ -1,173 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package apps
-
-import (
- "context"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/api/apps/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-type replicaSet struct {
- k8s.CommonNamespacedFields
- k8s.CommonPodFields
- v1.ReplicaSetStatus
- ReplicaSetReplicas *int32
- MinReadySeconds int32
- Selector *metav1.LabelSelector
-}
-
-// ReplicaSetColumns returns kubernetes replica set fields as Osquery table columns.
-func ReplicaSetColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&replicaSet{})
-}
-
-// ReplicaSetsGenerate generates the kubernetes replica sets as Osquery table data.
-func ReplicaSetsGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- rss, err := k8s.GetClient().AppsV1().ReplicaSets(metav1.NamespaceAll).List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, rs := range rss.Items {
- item := &replicaSet{
- CommonNamespacedFields: k8s.GetCommonNamespacedFields(rs.ObjectMeta),
- CommonPodFields: k8s.GetCommonPodFields(rs.Spec.Template.Spec),
- ReplicaSetStatus: rs.Status,
- ReplicaSetReplicas: rs.Spec.Replicas,
- MinReadySeconds: rs.Spec.MinReadySeconds,
- Selector: rs.Spec.Selector,
- }
- results = append(results, k8s.ToMap(item))
- }
-
- if rss.Continue == "" {
- break
- }
- options.Continue = rss.Continue
- }
-
- return results, nil
-}
-
-type replicaSetContainer struct {
- k8s.CommonNamespacedFields
- k8s.CommonContainerFields
- ReplicaSetName string
- ContainerType string
-}
-
-// ReplicaSetContainerColumns returns kubernetes replica set container fields as Osquery table columns.
-func ReplicaSetContainerColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&replicaSetContainer{})
-}
-
-// ReplicaSetContainersGenerate generates the kubernetes replica set containers as Osquery table data.
-func ReplicaSetContainersGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- rss, err := k8s.GetClient().AppsV1().ReplicaSets(metav1.NamespaceAll).List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, rs := range rss.Items {
- for _, c := range rs.Spec.Template.Spec.InitContainers {
- item := &replicaSetContainer{
- CommonNamespacedFields: k8s.GetParentCommonNamespacedFields(rs.ObjectMeta, c.Name),
- CommonContainerFields: k8s.GetCommonContainerFields(c),
- ReplicaSetName: rs.Name,
- ContainerType: "init",
- }
- item.Name = c.Name
- results = append(results, k8s.ToMap(item))
- }
- for _, c := range rs.Spec.Template.Spec.Containers {
- item := &replicaSetContainer{
- CommonNamespacedFields: k8s.GetParentCommonNamespacedFields(rs.ObjectMeta, c.Name),
- CommonContainerFields: k8s.GetCommonContainerFields(c),
- ReplicaSetName: rs.Name,
- ContainerType: "container",
- }
- item.Name = c.Name
- results = append(results, k8s.ToMap(item))
- }
- for _, c := range rs.Spec.Template.Spec.EphemeralContainers {
- item := &replicaSetContainer{
- CommonNamespacedFields: k8s.GetParentCommonNamespacedFields(rs.ObjectMeta, c.Name),
- CommonContainerFields: k8s.GetCommonEphemeralContainerFields(c),
- ReplicaSetName: rs.Name,
- ContainerType: "ephemeral",
- }
- item.Name = c.Name
- results = append(results, k8s.ToMap(item))
- }
- }
-
- if rss.Continue == "" {
- break
- }
- options.Continue = rss.Continue
- }
-
- return results, nil
-}
-
-type replicaSetVolume struct {
- k8s.CommonNamespacedFields
- k8s.CommonVolumeFields
- ReplicaSetName string
-}
-
-// ReplicaSetVolumeColumns returns kubernetes replica set volume fields as Osquery table columns.
-func ReplicaSetVolumeColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&replicaSetVolume{})
-}
-
-// ReplicaSetVolumesGenerate generates the kubernetes replica set volumes as Osquery table data.
-func ReplicaSetVolumesGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- rss, err := k8s.GetClient().AppsV1().ReplicaSets(metav1.NamespaceAll).List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, rs := range rss.Items {
- for _, v := range rs.Spec.Template.Spec.Volumes {
- item := &replicaSetVolume{
- CommonNamespacedFields: k8s.GetCommonNamespacedFields(rs.ObjectMeta),
- CommonVolumeFields: k8s.GetCommonVolumeFields(v),
- ReplicaSetName: rs.Name,
- }
- item.Name = v.Name
- results = append(results, k8s.ToMap(item))
- }
- }
-
- if rss.Continue == "" {
- break
- }
- options.Continue = rss.Continue
- }
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/apps/replica_set_test.go b/infrastructure/kubequery/internal/k8s/apps/replica_set_test.go
deleted file mode 100644
index 46028eddcf..0000000000
--- a/infrastructure/kubequery/internal/k8s/apps/replica_set_test.go
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package apps
-
-import (
- "context"
- "testing"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/stretchr/testify/assert"
-)
-
-func TestReplicaSetsGenerate(t *testing.T) {
- rss, err := ReplicaSetsGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{
- {
- "annotations": "{\"deployment.kubernetes.io/desired-replicas\":\"1\",\"deployment.kubernetes.io/max-replicas\":\"2\",\"deployment.kubernetes.io/revision\":\"1\"}",
- "available_replicas": "1",
- "cluster_uid": "blah",
- "creation_timestamp": "1611191304",
- "dns_policy": "ClusterFirst",
- "fully_labeled_replicas": "1",
- "host_ipc": "0",
- "host_network": "0",
- "host_pid": "0",
- "labels": "{\"name\":\"jaeger-operator\",\"pod-template-hash\":\"5db4f9d996\"}",
- "min_ready_seconds": "0",
- "name": "jaeger-operator-5db4f9d996",
- "namespace": "default",
- "observed_generation": "1",
- "ready_replicas": "1",
- "replica_set_replicas": "1",
- "replicas": "1",
- "restart_policy": "Always",
- "scheduler_name": "default-scheduler",
- "selector": "{\"matchLabels\":{\"name\":\"jaeger-operator\",\"pod-template-hash\":\"5db4f9d996\"}}",
- "service_account_name": "jaeger-operator",
- "termination_grace_period_seconds": "30",
- "uid": "2efeb411-ff99-434b-a5a2-4e06c2b0afaa",
- },
- }, rss)
-}
-
-func TestReplicaSetContainersGenerate(t *testing.T) {
- rss, err := ReplicaSetContainersGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{
- {
- "annotations": "{\"deployment.kubernetes.io/desired-replicas\":\"1\",\"deployment.kubernetes.io/max-replicas\":\"2\",\"deployment.kubernetes.io/revision\":\"1\"}",
- "args": "[\"start\"]",
- "cluster_uid": "blah",
- "container_type": "container",
- "creation_timestamp": "1611191304",
- "env": "[{\"name\":\"WATCH_NAMESPACE\"},{\"name\":\"POD_NAME\",\"valueFrom\":{\"fieldRef\":{\"apiVersion\":\"v1\",\"fieldPath\":\"metadata.name\"}}},{\"name\":\"POD_NAMESPACE\",\"valueFrom\":{\"fieldRef\":{\"apiVersion\":\"v1\",\"fieldPath\":\"metadata.namespace\"}}},{\"name\":\"OPERATOR_NAME\",\"value\":\"jaeger-operator\"}]",
- "image": "jaegertracing/jaeger-operator:1.14.0",
- "image_pull_policy": "Always",
- "labels": "{\"name\":\"jaeger-operator\",\"pod-template-hash\":\"5db4f9d996\"}",
- "name": "jaeger-operator",
- "namespace": "default",
- "ports": "[{\"name\":\"metrics\",\"containerPort\":8383,\"protocol\":\"TCP\"}]",
- "replica_set_name": "jaeger-operator-5db4f9d996",
- "stdin": "0",
- "stdin_once": "0",
- "termination_message_path": "/dev/termination-log",
- "termination_message_policy": "File",
- "tty": "0",
- "uid": "a9c84883-3d97-5b99-8b20-9fcd5e626a02",
- },
- }, rss)
-}
-
-func TestReplicaSetVolumesGenerate(t *testing.T) {
- rss, err := ReplicaSetVolumesGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{}, rss)
-}
diff --git a/infrastructure/kubequery/internal/k8s/apps/stateful_set.go b/infrastructure/kubequery/internal/k8s/apps/stateful_set.go
deleted file mode 100644
index 2afa143c22..0000000000
--- a/infrastructure/kubequery/internal/k8s/apps/stateful_set.go
+++ /dev/null
@@ -1,182 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authoss
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package apps
-
-import (
- "context"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/api/apps/v1"
- corev1 "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-type statefulSet struct {
- k8s.CommonNamespacedFields
- k8s.CommonPodFields
- v1.StatefulSetStatus
- StatefulSetReplicas *int32
- Selector *metav1.LabelSelector
- VolumeClaimTemplates []corev1.PersistentVolumeClaim
- ServiceName string
- PodManagementPolicy v1.PodManagementPolicyType
- UpdateStrategy v1.StatefulSetUpdateStrategy
- RevisionHistoryLimit *int32
-}
-
-// StatefulSetColumns returns kubernetes stateful set fields as Osquery table columns.
-func StatefulSetColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&statefulSet{})
-}
-
-// StatefulSetsGenerate generates the kubernetes stateful sets as Osquery table data.
-func StatefulSetsGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- sss, err := k8s.GetClient().AppsV1().StatefulSets(metav1.NamespaceAll).List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, ss := range sss.Items {
- item := &statefulSet{
- CommonNamespacedFields: k8s.GetCommonNamespacedFields(ss.ObjectMeta),
- CommonPodFields: k8s.GetCommonPodFields(ss.Spec.Template.Spec),
- StatefulSetStatus: ss.Status,
- StatefulSetReplicas: ss.Spec.Replicas,
- Selector: ss.Spec.Selector,
- VolumeClaimTemplates: ss.Spec.VolumeClaimTemplates,
- ServiceName: ss.Spec.ServiceName,
- PodManagementPolicy: ss.Spec.PodManagementPolicy,
- UpdateStrategy: ss.Spec.UpdateStrategy,
- RevisionHistoryLimit: ss.Spec.RevisionHistoryLimit,
- }
- results = append(results, k8s.ToMap(item))
- }
-
- if sss.Continue == "" {
- break
- }
- options.Continue = sss.Continue
- }
-
- return results, nil
-}
-
-type statefulSetContainer struct {
- k8s.CommonNamespacedFields
- k8s.CommonContainerFields
- StatefulSetName string
- ContainerType string
-}
-
-// StatefulSetContainerColumns returns kubernetes stateful set container fields as Osquery table columns.
-func StatefulSetContainerColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&statefulSetContainer{})
-}
-
-// StatefulSetContainersGenerate generates the kubernetes stateful set containers as Osquery table data.
-func StatefulSetContainersGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- sss, err := k8s.GetClient().AppsV1().StatefulSets(metav1.NamespaceAll).List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, ss := range sss.Items {
- for _, c := range ss.Spec.Template.Spec.InitContainers {
- item := &statefulSetContainer{
- CommonNamespacedFields: k8s.GetParentCommonNamespacedFields(ss.ObjectMeta, c.Name),
- CommonContainerFields: k8s.GetCommonContainerFields(c),
- StatefulSetName: ss.Name,
- ContainerType: "init",
- }
- item.Name = c.Name
- results = append(results, k8s.ToMap(item))
- }
- for _, c := range ss.Spec.Template.Spec.Containers {
- item := &statefulSetContainer{
- CommonNamespacedFields: k8s.GetParentCommonNamespacedFields(ss.ObjectMeta, c.Name),
- CommonContainerFields: k8s.GetCommonContainerFields(c),
- StatefulSetName: ss.Name,
- ContainerType: "container",
- }
- item.Name = c.Name
- results = append(results, k8s.ToMap(item))
- }
- for _, c := range ss.Spec.Template.Spec.EphemeralContainers {
- item := &statefulSetContainer{
- CommonNamespacedFields: k8s.GetParentCommonNamespacedFields(ss.ObjectMeta, c.Name),
- CommonContainerFields: k8s.GetCommonEphemeralContainerFields(c),
- StatefulSetName: ss.Name,
- ContainerType: "ephemeral",
- }
- item.Name = c.Name
- results = append(results, k8s.ToMap(item))
- }
- }
-
- if sss.Continue == "" {
- break
- }
- options.Continue = sss.Continue
- }
-
- return results, nil
-}
-
-type statefulSetVolume struct {
- k8s.CommonNamespacedFields
- k8s.CommonVolumeFields
- StatefulSetName string
-}
-
-// StatefulSetVolumeColumns returns kubernetes stateful set volume fields as Osquery table columns.
-func StatefulSetVolumeColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&statefulSetVolume{})
-}
-
-// StatefulSetVolumesGenerate generates the kubernetes stateful set volumes as Osquery table data.
-func StatefulSetVolumesGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- sss, err := k8s.GetClient().AppsV1().StatefulSets(metav1.NamespaceAll).List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, ss := range sss.Items {
- for _, v := range ss.Spec.Template.Spec.Volumes {
- item := &statefulSetVolume{
- CommonNamespacedFields: k8s.GetCommonNamespacedFields(ss.ObjectMeta),
- CommonVolumeFields: k8s.GetCommonVolumeFields(v),
- StatefulSetName: ss.Name,
- }
- item.Name = v.Name
- results = append(results, k8s.ToMap(item))
- }
- }
-
- if sss.Continue == "" {
- break
- }
- options.Continue = sss.Continue
- }
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/apps/stateful_set_test.go b/infrastructure/kubequery/internal/k8s/apps/stateful_set_test.go
deleted file mode 100644
index cb9495e45e..0000000000
--- a/infrastructure/kubequery/internal/k8s/apps/stateful_set_test.go
+++ /dev/null
@@ -1,153 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package apps
-
-import (
- "context"
- "testing"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/stretchr/testify/assert"
-)
-
-func TestStatefulSetsGenerate(t *testing.T) {
- sss, err := StatefulSetsGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{
- {
- "available_replicas": "0",
- "cluster_uid": "blah",
- "collision_count": "0",
- "creation_timestamp": "1611191592",
- "current_replicas": "1",
- "current_revision": "alertmanager-main-6674894c9d",
- "dns_policy": "ClusterFirst",
- "fs_group": "2000",
- "host_ipc": "0",
- "host_network": "0",
- "host_pid": "0",
- "labels": "{\"alertmanager\":\"main\"}",
- "name": "alertmanager-main",
- "namespace": "monitoring",
- "node_selector": "{\"kubernetes.io/os\":\"linux\"}",
- "observed_generation": "1",
- "pod_management_policy": "Parallel",
- "ready_replicas": "1",
- "replicas": "1",
- "restart_policy": "Always",
- "revision_history_limit": "10",
- "run_as_non_root": "1",
- "run_as_user": "1000",
- "scheduler_name": "default-scheduler",
- "selector": "{\"matchLabels\":{\"alertmanager\":\"main\",\"app\":\"alertmanager\"}}",
- "service_account_name": "alertmanager-main",
- "service_name": "alertmanager-operated",
- "stateful_set_replicas": "1",
- "termination_grace_period_seconds": "120",
- "uid": "3c488e7e-420c-4515-b377-5dc3ee082744",
- "update_revision": "alertmanager-main-6674894c9d",
- "update_strategy": "{\"type\":\"RollingUpdate\"}",
- "updated_replicas": "1",
- },
- }, sss)
-}
-
-func TestStatefulSetContainersGenerate(t *testing.T) {
- sss, err := StatefulSetContainersGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{
- {
- "args": "[\"--config.file=/etc/alertmanager/config/alertmanager.yaml\",\"--storage.path=/alertmanager\",\"--data.retention=120h\",\"--cluster.listen-address=\",\"--web.listen-address=:9093\",\"--web.route-prefix=/\",\"--cluster.peer=alertmanager-main-0.alertmanager-operated:9094\"]",
- "cluster_uid": "blah",
- "container_type": "container",
- "creation_timestamp": "1611191592",
- "env": "[{\"name\":\"POD_IP\",\"valueFrom\":{\"fieldRef\":{\"apiVersion\":\"v1\",\"fieldPath\":\"status.podIP\"}}}]",
- "image": "quay.io/prometheus/alertmanager:v0.21.0",
- "image_pull_policy": "IfNotPresent",
- "labels": "{\"alertmanager\":\"main\"}",
- "liveness_probe": "{\"httpGet\":{\"path\":\"/-/healthy\",\"port\":\"web\",\"scheme\":\"HTTP\"},\"timeoutSeconds\":3,\"periodSeconds\":10,\"successThreshold\":1,\"failureThreshold\":10}",
- "name": "alertmanager",
- "namespace": "monitoring",
- "ports": "[{\"name\":\"web\",\"containerPort\":9093,\"protocol\":\"TCP\"},{\"name\":\"mesh-tcp\",\"containerPort\":9094,\"protocol\":\"TCP\"},{\"name\":\"mesh-udp\",\"containerPort\":9094,\"protocol\":\"UDP\"}]",
- "readiness_probe": "{\"httpGet\":{\"path\":\"/-/ready\",\"port\":\"web\",\"scheme\":\"HTTP\"},\"initialDelaySeconds\":3,\"timeoutSeconds\":3,\"periodSeconds\":5,\"successThreshold\":1,\"failureThreshold\":10}",
- "resource_requests": "{\"memory\":\"200Mi\"}",
- "stateful_set_name": "alertmanager-main",
- "stdin": "0",
- "stdin_once": "0",
- "termination_message_path": "/dev/termination-log",
- "termination_message_policy": "FallbackToLogsOnError",
- "tty": "0",
- "uid": "da9bb224-1bf1-5960-a83c-b77a73ea6e79",
- "volume_mounts": "[{\"name\":\"config-volume\",\"mountPath\":\"/etc/alertmanager/config\"},{\"name\":\"alertmanager-main-db\",\"mountPath\":\"/alertmanager\"}]",
- },
- {
- "args": "[\"-webhook-url=http://localhost:9093/-/reload\",\"-volume-dir=/etc/alertmanager/config\"]",
- "cluster_uid": "blah",
- "container_type": "container",
- "creation_timestamp": "1611191592",
- "image": "jimmidyson/configmap-reload:v0.3.0",
- "image_pull_policy": "IfNotPresent",
- "labels": "{\"alertmanager\":\"main\"}",
- "name": "config-reloader",
- "namespace": "monitoring",
- "resource_limits": "{\"cpu\":\"100m\",\"memory\":\"25Mi\"}",
- "stateful_set_name": "alertmanager-main",
- "stdin": "0",
- "stdin_once": "0",
- "termination_message_path": "/dev/termination-log",
- "termination_message_policy": "FallbackToLogsOnError",
- "tty": "0",
- "uid": "69afdc5a-a3de-59b5-8151-4103b933f2cf",
- "volume_mounts": "[{\"name\":\"config-volume\",\"readOnly\":true,\"mountPath\":\"/etc/alertmanager/config\"}]",
- },
- }, sss)
-}
-
-func TestStatefulSetVolumesGenerate(t *testing.T) {
- sss, err := StatefulSetVolumesGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{
- {
- "aws_elastic_block_store_partition": "0",
- "cluster_uid": "blah",
- "creation_timestamp": "1611191592",
- "gce_persistent_disk_partition": "0",
- "iscsi_discovery_chap_auth": "0",
- "iscsi_lun": "0",
- "iscsi_session_chap_auth": "0",
- "labels": "{\"alertmanager\":\"main\"}",
- "name": "config-volume",
- "namespace": "monitoring",
- "scale_iossl_enabled": "0",
- "secret_default_mode": "420",
- "secret_name": "alertmanager-main",
- "stateful_set_name": "alertmanager-main",
- "uid": "3c488e7e-420c-4515-b377-5dc3ee082744",
- "volume_type": "secret",
- },
- {
- "aws_elastic_block_store_partition": "0",
- "cluster_uid": "blah",
- "creation_timestamp": "1611191592",
- "empty_dir_size_limit": "",
- "gce_persistent_disk_partition": "0",
- "iscsi_discovery_chap_auth": "0",
- "iscsi_lun": "0",
- "iscsi_session_chap_auth": "0",
- "labels": "{\"alertmanager\":\"main\"}",
- "name": "alertmanager-main-db",
- "namespace": "monitoring",
- "scale_iossl_enabled": "0",
- "stateful_set_name": "alertmanager-main",
- "uid": "3c488e7e-420c-4515-b377-5dc3ee082744",
- "volume_type": "empty_dir",
- },
- }, sss)
-}
diff --git a/infrastructure/kubequery/internal/k8s/apps/testdata/daemon_set_test.json b/infrastructure/kubequery/internal/k8s/apps/testdata/daemon_set_test.json
deleted file mode 100644
index 33da4e3874..0000000000
--- a/infrastructure/kubequery/internal/k8s/apps/testdata/daemon_set_test.json
+++ /dev/null
@@ -1,910 +0,0 @@
-{
- "apiVersion": "apps/v1",
- "kind": "DaemonSet",
- "metadata": {
- "annotations": {
- "deprecated.daemonset.template.generation": "1"
- },
- "creationTimestamp": "2021-01-12T18:30:16Z",
- "generation": 1,
- "labels": {
- "k8s-app": "calico-node"
- },
- "managedFields": [
- {
- "apiVersion": "apps/v1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:metadata": {
- "f:annotations": {
- ".": {},
- "f:deprecated.daemonset.template.generation": {},
- "f:kubectl.kubernetes.io/last-applied-configuration": {}
- },
- "f:labels": {
- ".": {},
- "f:k8s-app": {}
- }
- },
- "f:spec": {
- "f:revisionHistoryLimit": {},
- "f:selector": {},
- "f:template": {
- "f:metadata": {
- "f:annotations": {
- ".": {},
- "f:scheduler.alpha.kubernetes.io/critical-pod": {}
- },
- "f:labels": {
- ".": {},
- "f:k8s-app": {}
- }
- },
- "f:spec": {
- "f:containers": {
- "k:{\"name\":\"calico-node\"}": {
- ".": {},
- "f:env": {
- ".": {},
- "k:{\"name\":\"CALICO_DISABLE_FILE_LOGGING\"}": {
- ".": {},
- "f:name": {},
- "f:value": {}
- },
- "k:{\"name\":\"CALICO_IPV4POOL_CIDR\"}": {
- ".": {},
- "f:name": {},
- "f:value": {}
- },
- "k:{\"name\":\"CALICO_IPV4POOL_VXLAN\"}": {
- ".": {},
- "f:name": {},
- "f:value": {}
- },
- "k:{\"name\":\"CALICO_NETWORKING_BACKEND\"}": {
- ".": {},
- "f:name": {},
- "f:valueFrom": {
- ".": {},
- "f:configMapKeyRef": {
- ".": {},
- "f:key": {},
- "f:name": {}
- }
- }
- },
- "k:{\"name\":\"CLUSTER_TYPE\"}": {
- ".": {},
- "f:name": {},
- "f:value": {}
- },
- "k:{\"name\":\"DATASTORE_TYPE\"}": {
- ".": {},
- "f:name": {},
- "f:value": {}
- },
- "k:{\"name\":\"FELIX_DEFAULTENDPOINTTOHOSTACTION\"}": {
- ".": {},
- "f:name": {},
- "f:value": {}
- },
- "k:{\"name\":\"FELIX_HEALTHENABLED\"}": {
- ".": {},
- "f:name": {},
- "f:value": {}
- },
- "k:{\"name\":\"FELIX_IPINIPMTU\"}": {
- ".": {},
- "f:name": {},
- "f:valueFrom": {
- ".": {},
- "f:configMapKeyRef": {
- ".": {},
- "f:key": {},
- "f:name": {}
- }
- }
- },
- "k:{\"name\":\"FELIX_IPV6SUPPORT\"}": {
- ".": {},
- "f:name": {},
- "f:value": {}
- },
- "k:{\"name\":\"FELIX_LOGSEVERITYSCREEN\"}": {
- ".": {},
- "f:name": {},
- "f:value": {}
- },
- "k:{\"name\":\"IP\"}": {
- ".": {},
- "f:name": {},
- "f:value": {}
- },
- "k:{\"name\":\"IP_AUTODETECTION_METHOD\"}": {
- ".": {},
- "f:name": {},
- "f:value": {}
- },
- "k:{\"name\":\"NODENAME\"}": {
- ".": {},
- "f:name": {},
- "f:valueFrom": {
- ".": {},
- "f:fieldRef": {
- ".": {},
- "f:apiVersion": {},
- "f:fieldPath": {}
- }
- }
- },
- "k:{\"name\":\"WAIT_FOR_DATASTORE\"}": {
- ".": {},
- "f:name": {},
- "f:value": {}
- }
- },
- "f:image": {},
- "f:imagePullPolicy": {},
- "f:livenessProbe": {
- ".": {},
- "f:exec": {
- ".": {},
- "f:command": {}
- },
- "f:failureThreshold": {},
- "f:initialDelaySeconds": {},
- "f:periodSeconds": {},
- "f:successThreshold": {},
- "f:timeoutSeconds": {}
- },
- "f:name": {},
- "f:readinessProbe": {
- ".": {},
- "f:exec": {
- ".": {},
- "f:command": {}
- },
- "f:failureThreshold": {},
- "f:periodSeconds": {},
- "f:successThreshold": {},
- "f:timeoutSeconds": {}
- },
- "f:resources": {
- ".": {},
- "f:requests": {
- ".": {},
- "f:cpu": {}
- }
- },
- "f:securityContext": {
- ".": {},
- "f:privileged": {}
- },
- "f:terminationMessagePath": {},
- "f:terminationMessagePolicy": {},
- "f:volumeMounts": {
- ".": {},
- "k:{\"mountPath\":\"/lib/modules\"}": {
- ".": {},
- "f:mountPath": {},
- "f:name": {},
- "f:readOnly": {}
- },
- "k:{\"mountPath\":\"/run/xtables.lock\"}": {
- ".": {},
- "f:mountPath": {},
- "f:name": {}
- },
- "k:{\"mountPath\":\"/var/lib/calico\"}": {
- ".": {},
- "f:mountPath": {},
- "f:name": {}
- },
- "k:{\"mountPath\":\"/var/run/calico\"}": {
- ".": {},
- "f:mountPath": {},
- "f:name": {}
- },
- "k:{\"mountPath\":\"/var/run/nodeagent\"}": {
- ".": {},
- "f:mountPath": {},
- "f:name": {}
- }
- }
- }
- },
- "f:dnsPolicy": {},
- "f:hostNetwork": {},
- "f:initContainers": {
- ".": {},
- "k:{\"name\":\"flexvol-driver\"}": {
- ".": {},
- "f:image": {},
- "f:imagePullPolicy": {},
- "f:name": {},
- "f:resources": {},
- "f:securityContext": {
- ".": {},
- "f:privileged": {}
- },
- "f:terminationMessagePath": {},
- "f:terminationMessagePolicy": {},
- "f:volumeMounts": {
- ".": {},
- "k:{\"mountPath\":\"/host/driver\"}": {
- ".": {},
- "f:mountPath": {},
- "f:name": {}
- }
- }
- },
- "k:{\"name\":\"install-cni\"}": {
- ".": {},
- "f:command": {},
- "f:env": {
- ".": {},
- "k:{\"name\":\"CNI_CONF_NAME\"}": {
- ".": {},
- "f:name": {},
- "f:value": {}
- },
- "k:{\"name\":\"CNI_MTU\"}": {
- ".": {},
- "f:name": {},
- "f:valueFrom": {
- ".": {},
- "f:configMapKeyRef": {
- ".": {},
- "f:key": {},
- "f:name": {}
- }
- }
- },
- "k:{\"name\":\"CNI_NETWORK_CONFIG\"}": {
- ".": {},
- "f:name": {},
- "f:valueFrom": {
- ".": {},
- "f:configMapKeyRef": {
- ".": {},
- "f:key": {},
- "f:name": {}
- }
- }
- },
- "k:{\"name\":\"CNI_NET_DIR\"}": {
- ".": {},
- "f:name": {},
- "f:value": {}
- },
- "k:{\"name\":\"KUBERNETES_NODE_NAME\"}": {
- ".": {},
- "f:name": {},
- "f:valueFrom": {
- ".": {},
- "f:fieldRef": {
- ".": {},
- "f:apiVersion": {},
- "f:fieldPath": {}
- }
- }
- },
- "k:{\"name\":\"SLEEP\"}": {
- ".": {},
- "f:name": {},
- "f:value": {}
- }
- },
- "f:image": {},
- "f:imagePullPolicy": {},
- "f:name": {},
- "f:resources": {},
- "f:securityContext": {
- ".": {},
- "f:privileged": {}
- },
- "f:terminationMessagePath": {},
- "f:terminationMessagePolicy": {},
- "f:volumeMounts": {
- ".": {},
- "k:{\"mountPath\":\"/host/etc/cni/net.d\"}": {
- ".": {},
- "f:mountPath": {},
- "f:name": {}
- },
- "k:{\"mountPath\":\"/host/opt/cni/bin\"}": {
- ".": {},
- "f:mountPath": {},
- "f:name": {}
- }
- }
- },
- "k:{\"name\":\"upgrade-ipam\"}": {
- ".": {},
- "f:command": {},
- "f:env": {
- ".": {},
- "k:{\"name\":\"CALICO_NETWORKING_BACKEND\"}": {
- ".": {},
- "f:name": {},
- "f:valueFrom": {
- ".": {},
- "f:configMapKeyRef": {
- ".": {},
- "f:key": {},
- "f:name": {}
- }
- }
- },
- "k:{\"name\":\"KUBERNETES_NODE_NAME\"}": {
- ".": {},
- "f:name": {},
- "f:valueFrom": {
- ".": {},
- "f:fieldRef": {
- ".": {},
- "f:apiVersion": {},
- "f:fieldPath": {}
- }
- }
- }
- },
- "f:image": {},
- "f:imagePullPolicy": {},
- "f:name": {},
- "f:resources": {},
- "f:securityContext": {
- ".": {},
- "f:privileged": {}
- },
- "f:terminationMessagePath": {},
- "f:terminationMessagePolicy": {},
- "f:volumeMounts": {
- ".": {},
- "k:{\"mountPath\":\"/host/opt/cni/bin\"}": {
- ".": {},
- "f:mountPath": {},
- "f:name": {}
- },
- "k:{\"mountPath\":\"/var/lib/cni/networks\"}": {
- ".": {},
- "f:mountPath": {},
- "f:name": {}
- }
- }
- }
- },
- "f:nodeSelector": {
- ".": {},
- "f:kubernetes.io/os": {}
- },
- "f:priorityClassName": {},
- "f:restartPolicy": {},
- "f:schedulerName": {},
- "f:securityContext": {},
- "f:serviceAccount": {},
- "f:serviceAccountName": {},
- "f:terminationGracePeriodSeconds": {},
- "f:tolerations": {},
- "f:volumes": {
- ".": {},
- "k:{\"name\":\"cni-bin-dir\"}": {
- ".": {},
- "f:hostPath": {
- ".": {},
- "f:path": {},
- "f:type": {}
- },
- "f:name": {}
- },
- "k:{\"name\":\"cni-net-dir\"}": {
- ".": {},
- "f:hostPath": {
- ".": {},
- "f:path": {},
- "f:type": {}
- },
- "f:name": {}
- },
- "k:{\"name\":\"flexvol-driver-host\"}": {
- ".": {},
- "f:hostPath": {
- ".": {},
- "f:path": {},
- "f:type": {}
- },
- "f:name": {}
- },
- "k:{\"name\":\"host-local-net-dir\"}": {
- ".": {},
- "f:hostPath": {
- ".": {},
- "f:path": {},
- "f:type": {}
- },
- "f:name": {}
- },
- "k:{\"name\":\"lib-modules\"}": {
- ".": {},
- "f:hostPath": {
- ".": {},
- "f:path": {},
- "f:type": {}
- },
- "f:name": {}
- },
- "k:{\"name\":\"policysync\"}": {
- ".": {},
- "f:hostPath": {
- ".": {},
- "f:path": {},
- "f:type": {}
- },
- "f:name": {}
- },
- "k:{\"name\":\"var-lib-calico\"}": {
- ".": {},
- "f:hostPath": {
- ".": {},
- "f:path": {},
- "f:type": {}
- },
- "f:name": {}
- },
- "k:{\"name\":\"var-run-calico\"}": {
- ".": {},
- "f:hostPath": {
- ".": {},
- "f:path": {},
- "f:type": {}
- },
- "f:name": {}
- },
- "k:{\"name\":\"xtables-lock\"}": {
- ".": {},
- "f:hostPath": {
- ".": {},
- "f:path": {},
- "f:type": {}
- },
- "f:name": {}
- }
- }
- }
- },
- "f:updateStrategy": {
- "f:rollingUpdate": {
- ".": {},
- "f:maxUnavailable": {}
- },
- "f:type": {}
- }
- }
- },
- "manager": "kubectl-client-side-apply",
- "operation": "Update",
- "time": "2021-01-12T18:30:16Z"
- },
- {
- "apiVersion": "apps/v1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:status": {
- "f:currentNumberScheduled": {},
- "f:desiredNumberScheduled": {},
- "f:numberAvailable": {},
- "f:numberReady": {},
- "f:observedGeneration": {},
- "f:updatedNumberScheduled": {}
- }
- },
- "manager": "kube-controller-manager",
- "operation": "Update",
- "time": "2021-01-21T01:05:37Z"
- }
- ],
- "name": "calico-node",
- "namespace": "kube-system",
- "resourceVersion": "450274",
- "selfLink": "/apis/apps/v1/namespaces/kube-system/daemonsets/calico-node",
- "uid": "e6fed7f0-f79a-464f-a3d2-b63247a1f590"
- },
- "spec": {
- "revisionHistoryLimit": 10,
- "selector": {
- "matchLabels": {
- "k8s-app": "calico-node"
- }
- },
- "template": {
- "metadata": {
- "annotations": {
- "scheduler.alpha.kubernetes.io/critical-pod": ""
- },
- "creationTimestamp": null,
- "labels": {
- "k8s-app": "calico-node"
- }
- },
- "spec": {
- "containers": [
- {
- "env": [
- {
- "name": "DATASTORE_TYPE",
- "value": "kubernetes"
- },
- {
- "name": "WAIT_FOR_DATASTORE",
- "value": "true"
- },
- {
- "name": "NODENAME",
- "valueFrom": {
- "fieldRef": {
- "apiVersion": "v1",
- "fieldPath": "spec.nodeName"
- }
- }
- },
- {
- "name": "CALICO_NETWORKING_BACKEND",
- "valueFrom": {
- "configMapKeyRef": {
- "key": "calico_backend",
- "name": "calico-config"
- }
- }
- },
- {
- "name": "CLUSTER_TYPE",
- "value": "k8s,bgp"
- },
- {
- "name": "IP",
- "value": "autodetect"
- },
- {
- "name": "IP_AUTODETECTION_METHOD",
- "value": "first-found"
- },
- {
- "name": "CALICO_IPV4POOL_VXLAN",
- "value": "Always"
- },
- {
- "name": "FELIX_IPINIPMTU",
- "valueFrom": {
- "configMapKeyRef": {
- "key": "veth_mtu",
- "name": "calico-config"
- }
- }
- },
- {
- "name": "CALICO_IPV4POOL_CIDR",
- "value": "10.1.0.0/16"
- },
- {
- "name": "CALICO_DISABLE_FILE_LOGGING",
- "value": "true"
- },
- {
- "name": "FELIX_DEFAULTENDPOINTTOHOSTACTION",
- "value": "ACCEPT"
- },
- {
- "name": "FELIX_IPV6SUPPORT",
- "value": "false"
- },
- {
- "name": "FELIX_LOGSEVERITYSCREEN",
- "value": "error"
- },
- {
- "name": "FELIX_HEALTHENABLED",
- "value": "true"
- }
- ],
- "image": "calico/node:v3.13.2",
- "imagePullPolicy": "IfNotPresent",
- "livenessProbe": {
- "exec": {
- "command": [
- "/bin/calico-node",
- "-felix-live"
- ]
- },
- "failureThreshold": 6,
- "initialDelaySeconds": 10,
- "periodSeconds": 10,
- "successThreshold": 1,
- "timeoutSeconds": 1
- },
- "name": "calico-node",
- "readinessProbe": {
- "exec": {
- "command": [
- "/bin/calico-node",
- "-felix-ready"
- ]
- },
- "failureThreshold": 3,
- "periodSeconds": 10,
- "successThreshold": 1,
- "timeoutSeconds": 1
- },
- "resources": {
- "requests": {
- "cpu": "250m"
- }
- },
- "securityContext": {
- "privileged": true
- },
- "terminationMessagePath": "/dev/termination-log",
- "terminationMessagePolicy": "File",
- "volumeMounts": [
- {
- "mountPath": "/lib/modules",
- "name": "lib-modules",
- "readOnly": true
- },
- {
- "mountPath": "/run/xtables.lock",
- "name": "xtables-lock"
- },
- {
- "mountPath": "/var/run/calico",
- "name": "var-run-calico"
- },
- {
- "mountPath": "/var/lib/calico",
- "name": "var-lib-calico"
- },
- {
- "mountPath": "/var/run/nodeagent",
- "name": "policysync"
- }
- ]
- }
- ],
- "dnsPolicy": "ClusterFirst",
- "hostNetwork": true,
- "initContainers": [
- {
- "command": [
- "/opt/cni/bin/calico-ipam",
- "-upgrade"
- ],
- "env": [
- {
- "name": "KUBERNETES_NODE_NAME",
- "valueFrom": {
- "fieldRef": {
- "apiVersion": "v1",
- "fieldPath": "spec.nodeName"
- }
- }
- },
- {
- "name": "CALICO_NETWORKING_BACKEND",
- "valueFrom": {
- "configMapKeyRef": {
- "key": "calico_backend",
- "name": "calico-config"
- }
- }
- }
- ],
- "image": "calico/cni:v3.13.2",
- "imagePullPolicy": "IfNotPresent",
- "name": "upgrade-ipam",
- "resources": {},
- "securityContext": {
- "privileged": true
- },
- "terminationMessagePath": "/dev/termination-log",
- "terminationMessagePolicy": "File",
- "volumeMounts": [
- {
- "mountPath": "/var/lib/cni/networks",
- "name": "host-local-net-dir"
- },
- {
- "mountPath": "/host/opt/cni/bin",
- "name": "cni-bin-dir"
- }
- ]
- },
- {
- "command": [
- "/install-cni.sh"
- ],
- "env": [
- {
- "name": "CNI_CONF_NAME",
- "value": "10-calico.conflist"
- },
- {
- "name": "CNI_NETWORK_CONFIG",
- "valueFrom": {
- "configMapKeyRef": {
- "key": "cni_network_config",
- "name": "calico-config"
- }
- }
- },
- {
- "name": "KUBERNETES_NODE_NAME",
- "valueFrom": {
- "fieldRef": {
- "apiVersion": "v1",
- "fieldPath": "spec.nodeName"
- }
- }
- },
- {
- "name": "CNI_MTU",
- "valueFrom": {
- "configMapKeyRef": {
- "key": "veth_mtu",
- "name": "calico-config"
- }
- }
- },
- {
- "name": "SLEEP",
- "value": "false"
- },
- {
- "name": "CNI_NET_DIR",
- "value": "/var/snap/microk8s/current/args/cni-network"
- }
- ],
- "image": "calico/cni:v3.13.2",
- "imagePullPolicy": "IfNotPresent",
- "name": "install-cni",
- "resources": {},
- "securityContext": {
- "privileged": true
- },
- "terminationMessagePath": "/dev/termination-log",
- "terminationMessagePolicy": "File",
- "volumeMounts": [
- {
- "mountPath": "/host/opt/cni/bin",
- "name": "cni-bin-dir"
- },
- {
- "mountPath": "/host/etc/cni/net.d",
- "name": "cni-net-dir"
- }
- ]
- },
- {
- "image": "calico/pod2daemon-flexvol:v3.13.2",
- "imagePullPolicy": "IfNotPresent",
- "name": "flexvol-driver",
- "resources": {},
- "securityContext": {
- "privileged": true
- },
- "terminationMessagePath": "/dev/termination-log",
- "terminationMessagePolicy": "File",
- "volumeMounts": [
- {
- "mountPath": "/host/driver",
- "name": "flexvol-driver-host"
- }
- ]
- }
- ],
- "nodeSelector": {
- "kubernetes.io/os": "linux"
- },
- "priorityClassName": "system-node-critical",
- "restartPolicy": "Always",
- "schedulerName": "default-scheduler",
- "securityContext": {},
- "serviceAccount": "calico-node",
- "serviceAccountName": "calico-node",
- "terminationGracePeriodSeconds": 0,
- "tolerations": [
- {
- "effect": "NoSchedule",
- "operator": "Exists"
- },
- {
- "key": "CriticalAddonsOnly",
- "operator": "Exists"
- },
- {
- "effect": "NoExecute",
- "operator": "Exists"
- }
- ],
- "volumes": [
- {
- "hostPath": {
- "path": "/lib/modules",
- "type": ""
- },
- "name": "lib-modules"
- },
- {
- "hostPath": {
- "path": "/var/snap/microk8s/current/var/run/calico",
- "type": ""
- },
- "name": "var-run-calico"
- },
- {
- "hostPath": {
- "path": "/var/snap/microk8s/current/var/lib/calico",
- "type": ""
- },
- "name": "var-lib-calico"
- },
- {
- "hostPath": {
- "path": "/run/xtables.lock",
- "type": "FileOrCreate"
- },
- "name": "xtables-lock"
- },
- {
- "hostPath": {
- "path": "/var/snap/microk8s/current/opt/cni/bin",
- "type": ""
- },
- "name": "cni-bin-dir"
- },
- {
- "hostPath": {
- "path": "/var/snap/microk8s/current/args/cni-network",
- "type": ""
- },
- "name": "cni-net-dir"
- },
- {
- "hostPath": {
- "path": "/var/snap/microk8s/current/var/lib/cni/networks",
- "type": ""
- },
- "name": "host-local-net-dir"
- },
- {
- "hostPath": {
- "path": "/var/snap/microk8s/current/var/run/nodeagent",
- "type": "DirectoryOrCreate"
- },
- "name": "policysync"
- },
- {
- "hostPath": {
- "path": "/usr/libexec/kubernetes/kubelet-plugins/volume/exec/nodeagent~uds",
- "type": "DirectoryOrCreate"
- },
- "name": "flexvol-driver-host"
- }
- ]
- }
- },
- "updateStrategy": {
- "rollingUpdate": {
- "maxUnavailable": 1
- },
- "type": "RollingUpdate"
- }
- },
- "status": {
- "currentNumberScheduled": 1,
- "desiredNumberScheduled": 1,
- "numberAvailable": 1,
- "numberMisscheduled": 0,
- "numberReady": 1,
- "observedGeneration": 1,
- "updatedNumberScheduled": 1
- }
-}
diff --git a/infrastructure/kubequery/internal/k8s/apps/testdata/deployment_test.json b/infrastructure/kubequery/internal/k8s/apps/testdata/deployment_test.json
deleted file mode 100644
index 7a0d219048..0000000000
--- a/infrastructure/kubequery/internal/k8s/apps/testdata/deployment_test.json
+++ /dev/null
@@ -1,739 +0,0 @@
-{
- "apiVersion": "v1",
- "items": [
- {
- "apiVersion": "apps/v1",
- "kind": "Deployment",
- "metadata": {
- "annotations": {
- "deployment.kubernetes.io/revision": "1",
- "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"apps/v1\",\"kind\":\"Deployment\",\"metadata\":{\"annotations\":{},\"name\":\"jaeger-operator\",\"namespace\":\"default\"},\"spec\":{\"replicas\":1,\"selector\":{\"matchLabels\":{\"name\":\"jaeger-operator\"}},\"template\":{\"metadata\":{\"labels\":{\"name\":\"jaeger-operator\"}},\"spec\":{\"containers\":[{\"args\":[\"start\"],\"env\":[{\"name\":\"WATCH_NAMESPACE\",\"value\":\"\"},{\"name\":\"POD_NAME\",\"valueFrom\":{\"fieldRef\":{\"fieldPath\":\"metadata.name\"}}},{\"name\":\"POD_NAMESPACE\",\"valueFrom\":{\"fieldRef\":{\"fieldPath\":\"metadata.namespace\"}}},{\"name\":\"OPERATOR_NAME\",\"value\":\"jaeger-operator\"}],\"image\":\"jaegertracing/jaeger-operator:1.14.0\",\"imagePullPolicy\":\"Always\",\"name\":\"jaeger-operator\",\"ports\":[{\"containerPort\":8383,\"name\":\"metrics\"}]}],\"serviceAccountName\":\"jaeger-operator\"}}}}\n"
- },
- "creationTimestamp": "2021-01-21T01:08:24Z",
- "generation": 1,
- "managedFields": [
- {
- "apiVersion": "apps/v1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:metadata": {
- "f:annotations": {
- ".": {},
- "f:kubectl.kubernetes.io/last-applied-configuration": {}
- }
- },
- "f:spec": {
- "f:progressDeadlineSeconds": {},
- "f:replicas": {},
- "f:revisionHistoryLimit": {},
- "f:selector": {},
- "f:strategy": {
- "f:rollingUpdate": {
- ".": {},
- "f:maxSurge": {},
- "f:maxUnavailable": {}
- },
- "f:type": {}
- },
- "f:template": {
- "f:metadata": {
- "f:labels": {
- ".": {},
- "f:name": {}
- }
- },
- "f:spec": {
- "f:containers": {
- "k:{\"name\":\"jaeger-operator\"}": {
- ".": {},
- "f:args": {},
- "f:env": {
- ".": {},
- "k:{\"name\":\"OPERATOR_NAME\"}": {
- ".": {},
- "f:name": {},
- "f:value": {}
- },
- "k:{\"name\":\"POD_NAME\"}": {
- ".": {},
- "f:name": {},
- "f:valueFrom": {
- ".": {},
- "f:fieldRef": {
- ".": {},
- "f:apiVersion": {},
- "f:fieldPath": {}
- }
- }
- },
- "k:{\"name\":\"POD_NAMESPACE\"}": {
- ".": {},
- "f:name": {},
- "f:valueFrom": {
- ".": {},
- "f:fieldRef": {
- ".": {},
- "f:apiVersion": {},
- "f:fieldPath": {}
- }
- }
- },
- "k:{\"name\":\"WATCH_NAMESPACE\"}": {
- ".": {},
- "f:name": {}
- }
- },
- "f:image": {},
- "f:imagePullPolicy": {},
- "f:name": {},
- "f:ports": {
- ".": {},
- "k:{\"containerPort\":8383,\"protocol\":\"TCP\"}": {
- ".": {},
- "f:containerPort": {},
- "f:name": {},
- "f:protocol": {}
- }
- },
- "f:resources": {},
- "f:terminationMessagePath": {},
- "f:terminationMessagePolicy": {}
- }
- },
- "f:dnsPolicy": {},
- "f:restartPolicy": {},
- "f:schedulerName": {},
- "f:securityContext": {},
- "f:serviceAccount": {},
- "f:serviceAccountName": {},
- "f:terminationGracePeriodSeconds": {}
- }
- }
- }
- },
- "manager": "kubectl-client-side-apply",
- "operation": "Update",
- "time": "2021-01-21T01:08:24Z"
- },
- {
- "apiVersion": "apps/v1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:metadata": {
- "f:annotations": {
- "f:deployment.kubernetes.io/revision": {}
- }
- },
- "f:status": {
- "f:availableReplicas": {},
- "f:conditions": {
- ".": {},
- "k:{\"type\":\"Available\"}": {
- ".": {},
- "f:lastTransitionTime": {},
- "f:lastUpdateTime": {},
- "f:message": {},
- "f:reason": {},
- "f:status": {},
- "f:type": {}
- },
- "k:{\"type\":\"Progressing\"}": {
- ".": {},
- "f:lastTransitionTime": {},
- "f:lastUpdateTime": {},
- "f:message": {},
- "f:reason": {},
- "f:status": {},
- "f:type": {}
- }
- },
- "f:observedGeneration": {},
- "f:readyReplicas": {},
- "f:replicas": {},
- "f:updatedReplicas": {}
- }
- },
- "manager": "kube-controller-manager",
- "operation": "Update",
- "time": "2021-01-21T01:08:52Z"
- }
- ],
- "name": "jaeger-operator",
- "namespace": "default",
- "resourceVersion": "451812",
- "selfLink": "/apis/apps/v1/namespaces/default/deployments/jaeger-operator",
- "uid": "baa856ea-2d04-4bbb-b9be-aa5b89c58087"
- },
- "spec": {
- "progressDeadlineSeconds": 600,
- "replicas": 1,
- "revisionHistoryLimit": 10,
- "selector": {
- "matchLabels": {
- "name": "jaeger-operator"
- }
- },
- "strategy": {
- "rollingUpdate": {
- "maxSurge": "25%",
- "maxUnavailable": "25%"
- },
- "type": "RollingUpdate"
- },
- "template": {
- "metadata": {
- "creationTimestamp": null,
- "labels": {
- "name": "jaeger-operator"
- }
- },
- "spec": {
- "containers": [
- {
- "args": [
- "start"
- ],
- "env": [
- {
- "name": "WATCH_NAMESPACE"
- },
- {
- "name": "POD_NAME",
- "valueFrom": {
- "fieldRef": {
- "apiVersion": "v1",
- "fieldPath": "metadata.name"
- }
- }
- },
- {
- "name": "POD_NAMESPACE",
- "valueFrom": {
- "fieldRef": {
- "apiVersion": "v1",
- "fieldPath": "metadata.namespace"
- }
- }
- },
- {
- "name": "OPERATOR_NAME",
- "value": "jaeger-operator"
- }
- ],
- "image": "jaegertracing/jaeger-operator:1.14.0",
- "imagePullPolicy": "Always",
- "name": "jaeger-operator",
- "ports": [
- {
- "containerPort": 8383,
- "name": "metrics",
- "protocol": "TCP"
- }
- ],
- "resources": {},
- "terminationMessagePath": "/dev/termination-log",
- "terminationMessagePolicy": "File"
- }
- ],
- "dnsPolicy": "ClusterFirst",
- "restartPolicy": "Always",
- "schedulerName": "default-scheduler",
- "securityContext": {},
- "serviceAccount": "jaeger-operator",
- "serviceAccountName": "jaeger-operator",
- "terminationGracePeriodSeconds": 30
- }
- }
- },
- "status": {
- "availableReplicas": 1,
- "conditions": [
- {
- "lastTransitionTime": "2021-01-21T01:08:52Z",
- "lastUpdateTime": "2021-01-21T01:08:52Z",
- "message": "Deployment has minimum availability.",
- "reason": "MinimumReplicasAvailable",
- "status": "True",
- "type": "Available"
- },
- {
- "lastTransitionTime": "2021-01-21T01:08:24Z",
- "lastUpdateTime": "2021-01-21T01:08:52Z",
- "message": "ReplicaSet \"jaeger-operator-5db4f9d996\" has successfully progressed.",
- "reason": "NewReplicaSetAvailable",
- "status": "True",
- "type": "Progressing"
- }
- ],
- "observedGeneration": 1,
- "readyReplicas": 1,
- "replicas": 1,
- "updatedReplicas": 1
- }
- },
- {
- "apiVersion": "apps/v1",
- "kind": "Deployment",
- "metadata": {
- "annotations": {
- "deployment.kubernetes.io/revision": "1",
- "linkerd.io/inject": "disabled",
- "prometheus.io/port": "14269",
- "prometheus.io/scrape": "true",
- "sidecar.istio.io/inject": "false"
- },
- "creationTimestamp": "2021-01-21T01:08:53Z",
- "generation": 1,
- "labels": {
- "app": "jaeger",
- "app.kubernetes.io/component": "all-in-one",
- "app.kubernetes.io/instance": "simplest",
- "app.kubernetes.io/managed-by": "jaeger-operator",
- "app.kubernetes.io/name": "simplest",
- "app.kubernetes.io/part-of": "jaeger"
- },
- "managedFields": [
- {
- "apiVersion": "apps/v1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:metadata": {
- "f:annotations": {
- ".": {},
- "f:linkerd.io/inject": {},
- "f:prometheus.io/port": {},
- "f:prometheus.io/scrape": {},
- "f:sidecar.istio.io/inject": {}
- },
- "f:labels": {
- ".": {},
- "f:app": {},
- "f:app.kubernetes.io/component": {},
- "f:app.kubernetes.io/instance": {},
- "f:app.kubernetes.io/managed-by": {},
- "f:app.kubernetes.io/name": {},
- "f:app.kubernetes.io/part-of": {}
- },
- "f:ownerReferences": {
- ".": {},
- "k:{\"uid\":\"95d303e8-d347-4f8f-b008-a4da3e44b847\"}": {
- ".": {},
- "f:apiVersion": {},
- "f:controller": {},
- "f:kind": {},
- "f:name": {},
- "f:uid": {}
- }
- }
- },
- "f:spec": {
- "f:progressDeadlineSeconds": {},
- "f:replicas": {},
- "f:revisionHistoryLimit": {},
- "f:selector": {},
- "f:strategy": {
- "f:rollingUpdate": {
- ".": {},
- "f:maxSurge": {},
- "f:maxUnavailable": {}
- },
- "f:type": {}
- },
- "f:template": {
- "f:metadata": {
- "f:annotations": {
- ".": {},
- "f:linkerd.io/inject": {},
- "f:prometheus.io/port": {},
- "f:prometheus.io/scrape": {},
- "f:sidecar.istio.io/inject": {}
- },
- "f:labels": {
- ".": {},
- "f:app": {},
- "f:app.kubernetes.io/component": {},
- "f:app.kubernetes.io/instance": {},
- "f:app.kubernetes.io/managed-by": {},
- "f:app.kubernetes.io/name": {},
- "f:app.kubernetes.io/part-of": {}
- }
- },
- "f:spec": {
- "f:containers": {
- "k:{\"name\":\"jaeger\"}": {
- ".": {},
- "f:args": {},
- "f:env": {
- ".": {},
- "k:{\"name\":\"COLLECTOR_ZIPKIN_HTTP_PORT\"}": {
- ".": {},
- "f:name": {},
- "f:value": {}
- },
- "k:{\"name\":\"SPAN_STORAGE_TYPE\"}": {
- ".": {},
- "f:name": {},
- "f:value": {}
- }
- },
- "f:image": {},
- "f:imagePullPolicy": {},
- "f:name": {},
- "f:ports": {
- ".": {},
- "k:{\"containerPort\":14267,\"protocol\":\"TCP\"}": {
- ".": {},
- "f:containerPort": {},
- "f:name": {},
- "f:protocol": {}
- },
- "k:{\"containerPort\":14268,\"protocol\":\"TCP\"}": {
- ".": {},
- "f:containerPort": {},
- "f:name": {},
- "f:protocol": {}
- },
- "k:{\"containerPort\":14269,\"protocol\":\"TCP\"}": {
- ".": {},
- "f:containerPort": {},
- "f:name": {},
- "f:protocol": {}
- },
- "k:{\"containerPort\":16686,\"protocol\":\"TCP\"}": {
- ".": {},
- "f:containerPort": {},
- "f:name": {},
- "f:protocol": {}
- },
- "k:{\"containerPort\":5775,\"protocol\":\"UDP\"}": {
- ".": {},
- "f:containerPort": {},
- "f:name": {},
- "f:protocol": {}
- },
- "k:{\"containerPort\":5778,\"protocol\":\"TCP\"}": {
- ".": {},
- "f:containerPort": {},
- "f:name": {},
- "f:protocol": {}
- },
- "k:{\"containerPort\":6831,\"protocol\":\"UDP\"}": {
- ".": {},
- "f:containerPort": {},
- "f:name": {},
- "f:protocol": {}
- },
- "k:{\"containerPort\":6832,\"protocol\":\"UDP\"}": {
- ".": {},
- "f:containerPort": {},
- "f:name": {},
- "f:protocol": {}
- },
- "k:{\"containerPort\":9411,\"protocol\":\"TCP\"}": {
- ".": {},
- "f:containerPort": {},
- "f:name": {},
- "f:protocol": {}
- }
- },
- "f:readinessProbe": {
- ".": {},
- "f:failureThreshold": {},
- "f:httpGet": {
- ".": {},
- "f:path": {},
- "f:port": {},
- "f:scheme": {}
- },
- "f:initialDelaySeconds": {},
- "f:periodSeconds": {},
- "f:successThreshold": {},
- "f:timeoutSeconds": {}
- },
- "f:resources": {},
- "f:terminationMessagePath": {},
- "f:terminationMessagePolicy": {},
- "f:volumeMounts": {
- ".": {},
- "k:{\"mountPath\":\"/etc/jaeger/sampling\"}": {
- ".": {},
- "f:mountPath": {},
- "f:name": {},
- "f:readOnly": {}
- }
- }
- }
- },
- "f:dnsPolicy": {},
- "f:restartPolicy": {},
- "f:schedulerName": {},
- "f:securityContext": {},
- "f:serviceAccount": {},
- "f:serviceAccountName": {},
- "f:terminationGracePeriodSeconds": {},
- "f:volumes": {
- ".": {},
- "k:{\"name\":\"simplest-sampling-configuration-volume\"}": {
- ".": {},
- "f:configMap": {
- ".": {},
- "f:defaultMode": {},
- "f:items": {},
- "f:name": {}
- },
- "f:name": {}
- }
- }
- }
- }
- }
- },
- "manager": "jaeger-operator",
- "operation": "Update",
- "time": "2021-01-21T01:08:53Z"
- },
- {
- "apiVersion": "apps/v1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:metadata": {
- "f:annotations": {
- "f:deployment.kubernetes.io/revision": {}
- }
- },
- "f:status": {
- "f:availableReplicas": {},
- "f:conditions": {
- ".": {},
- "k:{\"type\":\"Available\"}": {
- ".": {},
- "f:lastTransitionTime": {},
- "f:lastUpdateTime": {},
- "f:message": {},
- "f:reason": {},
- "f:status": {},
- "f:type": {}
- },
- "k:{\"type\":\"Progressing\"}": {
- ".": {},
- "f:lastTransitionTime": {},
- "f:lastUpdateTime": {},
- "f:message": {},
- "f:reason": {},
- "f:status": {},
- "f:type": {}
- }
- },
- "f:observedGeneration": {},
- "f:readyReplicas": {},
- "f:replicas": {},
- "f:updatedReplicas": {}
- }
- },
- "manager": "kube-controller-manager",
- "operation": "Update",
- "time": "2021-01-21T01:09:04Z"
- }
- ],
- "name": "simplest",
- "namespace": "default",
- "ownerReferences": [
- {
- "apiVersion": "jaegertracing.io/v1",
- "controller": true,
- "kind": "Jaeger",
- "name": "simplest",
- "uid": "95d303e8-d347-4f8f-b008-a4da3e44b847"
- }
- ],
- "resourceVersion": "451923",
- "selfLink": "/apis/apps/v1/namespaces/default/deployments/simplest",
- "uid": "ef190adf-c268-409d-8684-3775e59385bf"
- },
- "spec": {
- "progressDeadlineSeconds": 600,
- "replicas": 1,
- "revisionHistoryLimit": 10,
- "selector": {
- "matchLabels": {
- "app": "jaeger",
- "app.kubernetes.io/component": "all-in-one",
- "app.kubernetes.io/instance": "simplest",
- "app.kubernetes.io/managed-by": "jaeger-operator",
- "app.kubernetes.io/name": "simplest",
- "app.kubernetes.io/part-of": "jaeger"
- }
- },
- "strategy": {
- "rollingUpdate": {
- "maxSurge": "25%",
- "maxUnavailable": "25%"
- },
- "type": "RollingUpdate"
- },
- "template": {
- "metadata": {
- "annotations": {
- "linkerd.io/inject": "disabled",
- "prometheus.io/port": "14269",
- "prometheus.io/scrape": "true",
- "sidecar.istio.io/inject": "false"
- },
- "creationTimestamp": null,
- "labels": {
- "app": "jaeger",
- "app.kubernetes.io/component": "all-in-one",
- "app.kubernetes.io/instance": "simplest",
- "app.kubernetes.io/managed-by": "jaeger-operator",
- "app.kubernetes.io/name": "simplest",
- "app.kubernetes.io/part-of": "jaeger"
- }
- },
- "spec": {
- "containers": [
- {
- "args": [
- "--sampling.strategies-file=/etc/jaeger/sampling/sampling.json"
- ],
- "env": [
- {
- "name": "SPAN_STORAGE_TYPE",
- "value": "memory"
- },
- {
- "name": "COLLECTOR_ZIPKIN_HTTP_PORT",
- "value": "9411"
- }
- ],
- "image": "jaegertracing/all-in-one:1.14.0",
- "imagePullPolicy": "IfNotPresent",
- "name": "jaeger",
- "ports": [
- {
- "containerPort": 5775,
- "name": "zk-compact-trft",
- "protocol": "UDP"
- },
- {
- "containerPort": 5778,
- "name": "config-rest",
- "protocol": "TCP"
- },
- {
- "containerPort": 6831,
- "name": "jg-compact-trft",
- "protocol": "UDP"
- },
- {
- "containerPort": 6832,
- "name": "jg-binary-trft",
- "protocol": "UDP"
- },
- {
- "containerPort": 9411,
- "name": "zipkin",
- "protocol": "TCP"
- },
- {
- "containerPort": 14267,
- "name": "c-tchan-trft",
- "protocol": "TCP"
- },
- {
- "containerPort": 14268,
- "name": "c-binary-trft",
- "protocol": "TCP"
- },
- {
- "containerPort": 16686,
- "name": "query",
- "protocol": "TCP"
- },
- {
- "containerPort": 14269,
- "name": "admin-http",
- "protocol": "TCP"
- }
- ],
- "readinessProbe": {
- "failureThreshold": 3,
- "httpGet": {
- "path": "/",
- "port": 14269,
- "scheme": "HTTP"
- },
- "initialDelaySeconds": 1,
- "periodSeconds": 10,
- "successThreshold": 1,
- "timeoutSeconds": 1
- },
- "resources": {},
- "terminationMessagePath": "/dev/termination-log",
- "terminationMessagePolicy": "File",
- "volumeMounts": [
- {
- "mountPath": "/etc/jaeger/sampling",
- "name": "simplest-sampling-configuration-volume",
- "readOnly": true
- }
- ]
- }
- ],
- "dnsPolicy": "ClusterFirst",
- "restartPolicy": "Always",
- "schedulerName": "default-scheduler",
- "securityContext": {},
- "serviceAccount": "simplest",
- "serviceAccountName": "simplest",
- "terminationGracePeriodSeconds": 30,
- "volumes": [
- {
- "configMap": {
- "defaultMode": 420,
- "items": [
- {
- "key": "sampling",
- "path": "sampling.json"
- }
- ],
- "name": "simplest-sampling-configuration"
- },
- "name": "simplest-sampling-configuration-volume"
- }
- ]
- }
- }
- },
- "status": {
- "availableReplicas": 1,
- "conditions": [
- {
- "lastTransitionTime": "2021-01-21T01:09:04Z",
- "lastUpdateTime": "2021-01-21T01:09:04Z",
- "message": "Deployment has minimum availability.",
- "reason": "MinimumReplicasAvailable",
- "status": "True",
- "type": "Available"
- },
- {
- "lastTransitionTime": "2021-01-21T01:08:53Z",
- "lastUpdateTime": "2021-01-21T01:09:04Z",
- "message": "ReplicaSet \"simplest-85d9df868\" has successfully progressed.",
- "reason": "NewReplicaSetAvailable",
- "status": "True",
- "type": "Progressing"
- }
- ],
- "observedGeneration": 1,
- "readyReplicas": 1,
- "replicas": 1,
- "updatedReplicas": 1
- }
- }
- ],
- "kind": "List",
- "metadata": {
- "resourceVersion": "",
- "selfLink": ""
- }
-}
diff --git a/infrastructure/kubequery/internal/k8s/apps/testdata/replica_set_test.json b/infrastructure/kubequery/internal/k8s/apps/testdata/replica_set_test.json
deleted file mode 100644
index 49d5e2835a..0000000000
--- a/infrastructure/kubequery/internal/k8s/apps/testdata/replica_set_test.json
+++ /dev/null
@@ -1,235 +0,0 @@
-{
- "apiVersion": "apps/v1",
- "kind": "ReplicaSet",
- "metadata": {
- "annotations": {
- "deployment.kubernetes.io/desired-replicas": "1",
- "deployment.kubernetes.io/max-replicas": "2",
- "deployment.kubernetes.io/revision": "1"
- },
- "creationTimestamp": "2021-01-21T01:08:24Z",
- "generation": 1,
- "labels": {
- "name": "jaeger-operator",
- "pod-template-hash": "5db4f9d996"
- },
- "managedFields": [
- {
- "apiVersion": "apps/v1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:metadata": {
- "f:annotations": {
- ".": {},
- "f:deployment.kubernetes.io/desired-replicas": {},
- "f:deployment.kubernetes.io/max-replicas": {},
- "f:deployment.kubernetes.io/revision": {}
- },
- "f:labels": {
- ".": {},
- "f:name": {},
- "f:pod-template-hash": {}
- },
- "f:ownerReferences": {
- ".": {},
- "k:{\"uid\":\"baa856ea-2d04-4bbb-b9be-aa5b89c58087\"}": {
- ".": {},
- "f:apiVersion": {},
- "f:blockOwnerDeletion": {},
- "f:controller": {},
- "f:kind": {},
- "f:name": {},
- "f:uid": {}
- }
- }
- },
- "f:spec": {
- "f:replicas": {},
- "f:selector": {},
- "f:template": {
- "f:metadata": {
- "f:labels": {
- ".": {},
- "f:name": {},
- "f:pod-template-hash": {}
- }
- },
- "f:spec": {
- "f:containers": {
- "k:{\"name\":\"jaeger-operator\"}": {
- ".": {},
- "f:args": {},
- "f:env": {
- ".": {},
- "k:{\"name\":\"OPERATOR_NAME\"}": {
- ".": {},
- "f:name": {},
- "f:value": {}
- },
- "k:{\"name\":\"POD_NAME\"}": {
- ".": {},
- "f:name": {},
- "f:valueFrom": {
- ".": {},
- "f:fieldRef": {
- ".": {},
- "f:apiVersion": {},
- "f:fieldPath": {}
- }
- }
- },
- "k:{\"name\":\"POD_NAMESPACE\"}": {
- ".": {},
- "f:name": {},
- "f:valueFrom": {
- ".": {},
- "f:fieldRef": {
- ".": {},
- "f:apiVersion": {},
- "f:fieldPath": {}
- }
- }
- },
- "k:{\"name\":\"WATCH_NAMESPACE\"}": {
- ".": {},
- "f:name": {}
- }
- },
- "f:image": {},
- "f:imagePullPolicy": {},
- "f:name": {},
- "f:ports": {
- ".": {},
- "k:{\"containerPort\":8383,\"protocol\":\"TCP\"}": {
- ".": {},
- "f:containerPort": {},
- "f:name": {},
- "f:protocol": {}
- }
- },
- "f:resources": {},
- "f:terminationMessagePath": {},
- "f:terminationMessagePolicy": {}
- }
- },
- "f:dnsPolicy": {},
- "f:restartPolicy": {},
- "f:schedulerName": {},
- "f:securityContext": {},
- "f:serviceAccount": {},
- "f:serviceAccountName": {},
- "f:terminationGracePeriodSeconds": {}
- }
- }
- },
- "f:status": {
- "f:availableReplicas": {},
- "f:fullyLabeledReplicas": {},
- "f:observedGeneration": {},
- "f:readyReplicas": {},
- "f:replicas": {}
- }
- },
- "manager": "kube-controller-manager",
- "operation": "Update",
- "time": "2021-01-21T01:08:52Z"
- }
- ],
- "name": "jaeger-operator-5db4f9d996",
- "namespace": "default",
- "ownerReferences": [
- {
- "apiVersion": "apps/v1",
- "blockOwnerDeletion": true,
- "controller": true,
- "kind": "Deployment",
- "name": "jaeger-operator",
- "uid": "baa856ea-2d04-4bbb-b9be-aa5b89c58087"
- }
- ],
- "resourceVersion": "451811",
- "selfLink": "/apis/apps/v1/namespaces/default/replicasets/jaeger-operator-5db4f9d996",
- "uid": "2efeb411-ff99-434b-a5a2-4e06c2b0afaa"
- },
- "spec": {
- "replicas": 1,
- "selector": {
- "matchLabels": {
- "name": "jaeger-operator",
- "pod-template-hash": "5db4f9d996"
- }
- },
- "template": {
- "metadata": {
- "creationTimestamp": null,
- "labels": {
- "name": "jaeger-operator",
- "pod-template-hash": "5db4f9d996"
- }
- },
- "spec": {
- "containers": [
- {
- "args": [
- "start"
- ],
- "env": [
- {
- "name": "WATCH_NAMESPACE"
- },
- {
- "name": "POD_NAME",
- "valueFrom": {
- "fieldRef": {
- "apiVersion": "v1",
- "fieldPath": "metadata.name"
- }
- }
- },
- {
- "name": "POD_NAMESPACE",
- "valueFrom": {
- "fieldRef": {
- "apiVersion": "v1",
- "fieldPath": "metadata.namespace"
- }
- }
- },
- {
- "name": "OPERATOR_NAME",
- "value": "jaeger-operator"
- }
- ],
- "image": "jaegertracing/jaeger-operator:1.14.0",
- "imagePullPolicy": "Always",
- "name": "jaeger-operator",
- "ports": [
- {
- "containerPort": 8383,
- "name": "metrics",
- "protocol": "TCP"
- }
- ],
- "resources": {},
- "terminationMessagePath": "/dev/termination-log",
- "terminationMessagePolicy": "File"
- }
- ],
- "dnsPolicy": "ClusterFirst",
- "restartPolicy": "Always",
- "schedulerName": "default-scheduler",
- "securityContext": {},
- "serviceAccount": "jaeger-operator",
- "serviceAccountName": "jaeger-operator",
- "terminationGracePeriodSeconds": 30
- }
- }
- },
- "status": {
- "availableReplicas": 1,
- "fullyLabeledReplicas": 1,
- "observedGeneration": 1,
- "readyReplicas": 1,
- "replicas": 1
- }
-}
diff --git a/infrastructure/kubequery/internal/k8s/apps/testdata/stateful_set_test.json b/infrastructure/kubequery/internal/k8s/apps/testdata/stateful_set_test.json
deleted file mode 100644
index 1fce755560..0000000000
--- a/infrastructure/kubequery/internal/k8s/apps/testdata/stateful_set_test.json
+++ /dev/null
@@ -1,403 +0,0 @@
-{
- "apiVersion": "apps/v1",
- "kind": "StatefulSet",
- "metadata": {
- "creationTimestamp": "2021-01-21T01:13:12Z",
- "generation": 1,
- "labels": {
- "alertmanager": "main"
- },
- "managedFields": [
- {
- "apiVersion": "apps/v1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:metadata": {
- "f:labels": {
- ".": {},
- "f:alertmanager": {}
- },
- "f:ownerReferences": {
- ".": {},
- "k:{\"uid\":\"e6a6358b-646a-4171-8737-beb6c2b9ffaf\"}": {
- ".": {},
- "f:apiVersion": {},
- "f:blockOwnerDeletion": {},
- "f:controller": {},
- "f:kind": {},
- "f:name": {},
- "f:uid": {}
- }
- }
- },
- "f:spec": {
- "f:podManagementPolicy": {},
- "f:replicas": {},
- "f:revisionHistoryLimit": {},
- "f:selector": {},
- "f:serviceName": {},
- "f:template": {
- "f:metadata": {
- "f:labels": {
- ".": {},
- "f:alertmanager": {},
- "f:app": {}
- }
- },
- "f:spec": {
- "f:containers": {
- "k:{\"name\":\"alertmanager\"}": {
- ".": {},
- "f:args": {},
- "f:env": {
- ".": {},
- "k:{\"name\":\"POD_IP\"}": {
- ".": {},
- "f:name": {},
- "f:valueFrom": {
- ".": {},
- "f:fieldRef": {
- ".": {},
- "f:apiVersion": {},
- "f:fieldPath": {}
- }
- }
- }
- },
- "f:image": {},
- "f:imagePullPolicy": {},
- "f:livenessProbe": {
- ".": {},
- "f:failureThreshold": {},
- "f:httpGet": {
- ".": {},
- "f:path": {},
- "f:port": {},
- "f:scheme": {}
- },
- "f:periodSeconds": {},
- "f:successThreshold": {},
- "f:timeoutSeconds": {}
- },
- "f:name": {},
- "f:ports": {
- ".": {},
- "k:{\"containerPort\":9093,\"protocol\":\"TCP\"}": {
- ".": {},
- "f:containerPort": {},
- "f:name": {},
- "f:protocol": {}
- },
- "k:{\"containerPort\":9094,\"protocol\":\"TCP\"}": {
- ".": {},
- "f:containerPort": {},
- "f:name": {},
- "f:protocol": {}
- },
- "k:{\"containerPort\":9094,\"protocol\":\"UDP\"}": {
- ".": {},
- "f:containerPort": {},
- "f:name": {},
- "f:protocol": {}
- }
- },
- "f:readinessProbe": {
- ".": {},
- "f:failureThreshold": {},
- "f:httpGet": {
- ".": {},
- "f:path": {},
- "f:port": {},
- "f:scheme": {}
- },
- "f:initialDelaySeconds": {},
- "f:periodSeconds": {},
- "f:successThreshold": {},
- "f:timeoutSeconds": {}
- },
- "f:resources": {
- ".": {},
- "f:requests": {
- ".": {},
- "f:memory": {}
- }
- },
- "f:terminationMessagePath": {},
- "f:terminationMessagePolicy": {},
- "f:volumeMounts": {
- ".": {},
- "k:{\"mountPath\":\"/alertmanager\"}": {
- ".": {},
- "f:mountPath": {},
- "f:name": {}
- },
- "k:{\"mountPath\":\"/etc/alertmanager/config\"}": {
- ".": {},
- "f:mountPath": {},
- "f:name": {}
- }
- }
- },
- "k:{\"name\":\"config-reloader\"}": {
- ".": {},
- "f:args": {},
- "f:image": {},
- "f:imagePullPolicy": {},
- "f:name": {},
- "f:resources": {
- ".": {},
- "f:limits": {
- ".": {},
- "f:cpu": {},
- "f:memory": {}
- }
- },
- "f:terminationMessagePath": {},
- "f:terminationMessagePolicy": {},
- "f:volumeMounts": {
- ".": {},
- "k:{\"mountPath\":\"/etc/alertmanager/config\"}": {
- ".": {},
- "f:mountPath": {},
- "f:name": {},
- "f:readOnly": {}
- }
- }
- }
- },
- "f:dnsPolicy": {},
- "f:nodeSelector": {
- ".": {},
- "f:kubernetes.io/os": {}
- },
- "f:restartPolicy": {},
- "f:schedulerName": {},
- "f:securityContext": {
- ".": {},
- "f:fsGroup": {},
- "f:runAsNonRoot": {},
- "f:runAsUser": {}
- },
- "f:serviceAccount": {},
- "f:serviceAccountName": {},
- "f:terminationGracePeriodSeconds": {},
- "f:volumes": {
- ".": {},
- "k:{\"name\":\"alertmanager-main-db\"}": {
- ".": {},
- "f:emptyDir": {},
- "f:name": {}
- },
- "k:{\"name\":\"config-volume\"}": {
- ".": {},
- "f:name": {},
- "f:secret": {
- ".": {},
- "f:defaultMode": {},
- "f:secretName": {}
- }
- }
- }
- }
- },
- "f:updateStrategy": {
- "f:type": {}
- }
- },
- "f:status": {
- "f:replicas": {}
- }
- },
- "manager": "operator",
- "operation": "Update",
- "time": "2021-01-21T01:13:12Z"
- }
- ],
- "name": "alertmanager-main",
- "namespace": "monitoring",
- "ownerReferences": [
- {
- "apiVersion": "monitoring.coreos.com/v1",
- "blockOwnerDeletion": true,
- "controller": true,
- "kind": "Alertmanager",
- "name": "main",
- "uid": "e6a6358b-646a-4171-8737-beb6c2b9ffaf"
- }
- ],
- "resourceVersion": "452929",
- "selfLink": "/apis/apps/v1/namespaces/monitoring/statefulsets/alertmanager-main",
- "uid": "3c488e7e-420c-4515-b377-5dc3ee082744"
- },
- "spec": {
- "podManagementPolicy": "Parallel",
- "replicas": 1,
- "revisionHistoryLimit": 10,
- "selector": {
- "matchLabels": {
- "alertmanager": "main",
- "app": "alertmanager"
- }
- },
- "serviceName": "alertmanager-operated",
- "template": {
- "metadata": {
- "creationTimestamp": null,
- "labels": {
- "alertmanager": "main",
- "app": "alertmanager"
- }
- },
- "spec": {
- "containers": [
- {
- "args": [
- "--config.file=/etc/alertmanager/config/alertmanager.yaml",
- "--storage.path=/alertmanager",
- "--data.retention=120h",
- "--cluster.listen-address=",
- "--web.listen-address=:9093",
- "--web.route-prefix=/",
- "--cluster.peer=alertmanager-main-0.alertmanager-operated:9094"
- ],
- "env": [
- {
- "name": "POD_IP",
- "valueFrom": {
- "fieldRef": {
- "apiVersion": "v1",
- "fieldPath": "status.podIP"
- }
- }
- }
- ],
- "image": "quay.io/prometheus/alertmanager:v0.21.0",
- "imagePullPolicy": "IfNotPresent",
- "livenessProbe": {
- "failureThreshold": 10,
- "httpGet": {
- "path": "/-/healthy",
- "port": "web",
- "scheme": "HTTP"
- },
- "periodSeconds": 10,
- "successThreshold": 1,
- "timeoutSeconds": 3
- },
- "name": "alertmanager",
- "ports": [
- {
- "containerPort": 9093,
- "name": "web",
- "protocol": "TCP"
- },
- {
- "containerPort": 9094,
- "name": "mesh-tcp",
- "protocol": "TCP"
- },
- {
- "containerPort": 9094,
- "name": "mesh-udp",
- "protocol": "UDP"
- }
- ],
- "readinessProbe": {
- "failureThreshold": 10,
- "httpGet": {
- "path": "/-/ready",
- "port": "web",
- "scheme": "HTTP"
- },
- "initialDelaySeconds": 3,
- "periodSeconds": 5,
- "successThreshold": 1,
- "timeoutSeconds": 3
- },
- "resources": {
- "requests": {
- "memory": "200Mi"
- }
- },
- "terminationMessagePath": "/dev/termination-log",
- "terminationMessagePolicy": "FallbackToLogsOnError",
- "volumeMounts": [
- {
- "mountPath": "/etc/alertmanager/config",
- "name": "config-volume"
- },
- {
- "mountPath": "/alertmanager",
- "name": "alertmanager-main-db"
- }
- ]
- },
- {
- "args": [
- "-webhook-url=http://localhost:9093/-/reload",
- "-volume-dir=/etc/alertmanager/config"
- ],
- "image": "jimmidyson/configmap-reload:v0.3.0",
- "imagePullPolicy": "IfNotPresent",
- "name": "config-reloader",
- "resources": {
- "limits": {
- "cpu": "100m",
- "memory": "25Mi"
- }
- },
- "terminationMessagePath": "/dev/termination-log",
- "terminationMessagePolicy": "FallbackToLogsOnError",
- "volumeMounts": [
- {
- "mountPath": "/etc/alertmanager/config",
- "name": "config-volume",
- "readOnly": true
- }
- ]
- }
- ],
- "dnsPolicy": "ClusterFirst",
- "nodeSelector": {
- "kubernetes.io/os": "linux"
- },
- "restartPolicy": "Always",
- "schedulerName": "default-scheduler",
- "securityContext": {
- "fsGroup": 2000,
- "runAsNonRoot": true,
- "runAsUser": 1000
- },
- "serviceAccount": "alertmanager-main",
- "serviceAccountName": "alertmanager-main",
- "terminationGracePeriodSeconds": 120,
- "volumes": [
- {
- "name": "config-volume",
- "secret": {
- "defaultMode": 420,
- "secretName": "alertmanager-main"
- }
- },
- {
- "emptyDir": {},
- "name": "alertmanager-main-db"
- }
- ]
- }
- },
- "updateStrategy": {
- "type": "RollingUpdate"
- }
- },
- "status": {
- "collisionCount": 0,
- "currentReplicas": 1,
- "currentRevision": "alertmanager-main-6674894c9d",
- "observedGeneration": 1,
- "readyReplicas": 1,
- "replicas": 1,
- "updateRevision": "alertmanager-main-6674894c9d",
- "updatedReplicas": 1
- }
-}
diff --git a/infrastructure/kubequery/internal/k8s/autoscaling/horizontal_pod_autoscaler.go b/infrastructure/kubequery/internal/k8s/autoscaling/horizontal_pod_autoscaler.go
deleted file mode 100644
index 2a038c6855..0000000000
--- a/infrastructure/kubequery/internal/k8s/autoscaling/horizontal_pod_autoscaler.go
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package autoscaling
-
-import (
- "context"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/api/autoscaling/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-type horizontalPodAutoscaler struct {
- k8s.CommonNamespacedFields
- v1.HorizontalPodAutoscalerSpec
- v1.HorizontalPodAutoscalerStatus
-}
-
-// HorizontalPodAutoscalersColumns returns kubernetes horizontal pod autoscaler fields as Osquery table columns.
-func HorizontalPodAutoscalersColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&horizontalPodAutoscaler{})
-}
-
-// HorizontalPodAutoscalerGenerate generates the kubernetes horizontal pod autoscalers as Osquery table data.
-func HorizontalPodAutoscalerGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- hpas, err := k8s.GetClient().AutoscalingV1().HorizontalPodAutoscalers(metav1.NamespaceAll).List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, hpa := range hpas.Items {
- item := &horizontalPodAutoscaler{
- CommonNamespacedFields: k8s.GetCommonNamespacedFields(hpa.ObjectMeta),
- HorizontalPodAutoscalerSpec: hpa.Spec,
- HorizontalPodAutoscalerStatus: hpa.Status,
- }
- results = append(results, k8s.ToMap(item))
- }
-
- if hpas.Continue == "" {
- break
- }
- options.Continue = hpas.Continue
- }
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/autoscaling/horizontal_pod_autoscaler_test.go b/infrastructure/kubequery/internal/k8s/autoscaling/horizontal_pod_autoscaler_test.go
deleted file mode 100644
index 80226b15ea..0000000000
--- a/infrastructure/kubequery/internal/k8s/autoscaling/horizontal_pod_autoscaler_test.go
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package autoscaling
-
-import (
- "context"
- "testing"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- "github.com/stretchr/testify/assert"
- v1 "k8s.io/api/autoscaling/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/types"
- "k8s.io/client-go/kubernetes/fake"
-)
-
-func TestHorizontalPodAutoscalerGenerate(t *testing.T) {
- i32 := int32(456)
- i64 := int64(123)
- k8s.SetClient(fake.NewSimpleClientset(&v1.HorizontalPodAutoscaler{
- ObjectMeta: metav1.ObjectMeta{
- Name: "hpa1",
- Namespace: "n123",
- UID: types.UID("1234"),
- Labels: map[string]string{"a": "b"},
- },
- Spec: v1.HorizontalPodAutoscalerSpec{
- MinReplicas: &i32,
- MaxReplicas: i32,
- TargetCPUUtilizationPercentage: &i32,
- ScaleTargetRef: v1.CrossVersionObjectReference{
- Name: "blah",
- },
- },
- Status: v1.HorizontalPodAutoscalerStatus{
- ObservedGeneration: &i64,
- LastScaleTime: &metav1.Time{},
- CurrentReplicas: i32,
- DesiredReplicas: i32,
- CurrentCPUUtilizationPercentage: &i32,
- },
- }), types.UID("hello"), "")
-
- hpas, err := HorizontalPodAutoscalerGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{
- {
- "cluster_uid": "hello",
- "creation_timestamp": "0",
- "current_cpu_utilization_percentage": "456",
- "current_replicas": "456",
- "desired_replicas": "456",
- "labels": "{\"a\":\"b\"}",
- "last_scale_time": "0",
- "max_replicas": "456",
- "min_replicas": "456",
- "name": "hpa1",
- "namespace": "n123",
- "observed_generation": "123",
- "scale_target_ref": "{\"kind\":\"\",\"name\":\"blah\"}",
- "target_cpu_utilization_percentage": "456",
- "uid": "1234",
- },
- }, hpas)
-}
diff --git a/infrastructure/kubequery/internal/k8s/batch/cron_job.go b/infrastructure/kubequery/internal/k8s/batch/cron_job.go
deleted file mode 100644
index cb20e6ed93..0000000000
--- a/infrastructure/kubequery/internal/k8s/batch/cron_job.go
+++ /dev/null
@@ -1,85 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package batch
-
-import (
- "context"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/api/batch/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-type cronJob struct {
- k8s.CommonNamespacedFields
- k8s.CommonPodFields
- v1.CronJobStatus
- Schedule string
- StartingDeadlineSeconds *int64
- ConcurrencyPolicy v1.ConcurrencyPolicy
- Suspend *bool
- SuccessfulJobsHistoryLimit *int32
- FailedJobsHistoryLimit *int32
- Parallelism *int32
- Completions *int32
- JobActiveDeadlineSeconds *int64
- BackoffLimit *int32
- Selector *metav1.LabelSelector
- ManualSelector *bool
- TTLSecondsAfterFinished *int32
-}
-
-// CronJobColumns returns kubernetes cron job fields as Osquery table columns.
-func CronJobColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&cronJob{})
-}
-
-// CronJobsGenerate generates the kubernetes cron jobs as Osquery table data.
-func CronJobsGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- cjs, err := k8s.GetClient().BatchV1().CronJobs(metav1.NamespaceAll).List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, cj := range cjs.Items {
- item := &cronJob{
- CommonNamespacedFields: k8s.GetCommonNamespacedFields(cj.ObjectMeta),
- CommonPodFields: k8s.GetCommonPodFields(cj.Spec.JobTemplate.Spec.Template.Spec),
- CronJobStatus: cj.Status,
- Schedule: cj.Spec.Schedule,
- StartingDeadlineSeconds: cj.Spec.StartingDeadlineSeconds,
- ConcurrencyPolicy: cj.Spec.ConcurrencyPolicy,
- Suspend: cj.Spec.Suspend,
- SuccessfulJobsHistoryLimit: cj.Spec.SuccessfulJobsHistoryLimit,
- FailedJobsHistoryLimit: cj.Spec.FailedJobsHistoryLimit,
- Parallelism: cj.Spec.JobTemplate.Spec.Parallelism,
- Completions: cj.Spec.JobTemplate.Spec.Completions,
- JobActiveDeadlineSeconds: cj.Spec.JobTemplate.Spec.ActiveDeadlineSeconds,
- BackoffLimit: cj.Spec.JobTemplate.Spec.BackoffLimit,
- Selector: cj.Spec.JobTemplate.Spec.Selector,
- ManualSelector: cj.Spec.JobTemplate.Spec.ManualSelector,
- TTLSecondsAfterFinished: cj.Spec.JobTemplate.Spec.TTLSecondsAfterFinished,
- }
- results = append(results, k8s.ToMap(item))
- }
-
- if cjs.Continue == "" {
- break
- }
- options.Continue = cjs.Continue
- }
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/batch/cron_job_test.go b/infrastructure/kubequery/internal/k8s/batch/cron_job_test.go
deleted file mode 100644
index fe9c5fe0d8..0000000000
--- a/infrastructure/kubequery/internal/k8s/batch/cron_job_test.go
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package batch
-
-import (
- "context"
- "testing"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- "github.com/stretchr/testify/assert"
- v1 "k8s.io/api/batch/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/types"
- "k8s.io/client-go/kubernetes/fake"
-)
-
-func TestCronJobsGenerate(t *testing.T) {
- i32 := int32(456)
- i64 := int64(123)
- b := bool(true)
- k8s.SetClient(fake.NewSimpleClientset(&v1.CronJob{
- ObjectMeta: metav1.ObjectMeta{
- Name: "cj1",
- Namespace: "n123",
- UID: types.UID("1234"),
- Labels: map[string]string{"a": "b"},
- },
- Spec: v1.CronJobSpec{
- Schedule: "s1",
- StartingDeadlineSeconds: &i64,
- ConcurrencyPolicy: v1.AllowConcurrent,
- Suspend: &b,
- SuccessfulJobsHistoryLimit: &i32,
- FailedJobsHistoryLimit: &i32,
- JobTemplate: v1.JobTemplateSpec{
- ObjectMeta: metav1.ObjectMeta{
- Name: "job1",
- Namespace: "n123",
- UID: types.UID("1234"),
- Labels: map[string]string{"a": "b"},
- },
- Spec: v1.JobSpec{
- Parallelism: &i32,
- Completions: &i32,
- ActiveDeadlineSeconds: &i64,
- BackoffLimit: &i32,
- ManualSelector: &b,
- TTLSecondsAfterFinished: &i32,
- },
- },
- },
- Status: v1.CronJobStatus{
- LastScheduleTime: &metav1.Time{},
- },
- }), types.UID("hello"), "")
-
- cjs, err := CronJobsGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{
- {
- "backoff_limit": "456",
- "cluster_uid": "hello",
- "completions": "456",
- "concurrency_policy": "Allow",
- "creation_timestamp": "0",
- "failed_jobs_history_limit": "456",
- "host_ipc": "0",
- "host_network": "0",
- "host_pid": "0",
- "job_active_deadline_seconds": "123",
- "labels": "{\"a\":\"b\"}",
- "last_schedule_time": "0",
- "manual_selector": "1",
- "name": "cj1",
- "namespace": "n123",
- "parallelism": "456",
- "schedule": "s1",
- "starting_deadline_seconds": "123",
- "successful_jobs_history_limit": "456",
- "suspend": "1",
- "ttl_seconds_after_finished": "456",
- "uid": "1234",
- },
- }, cjs)
-}
diff --git a/infrastructure/kubequery/internal/k8s/batch/job.go b/infrastructure/kubequery/internal/k8s/batch/job.go
deleted file mode 100644
index 4e2b2fbd22..0000000000
--- a/infrastructure/kubequery/internal/k8s/batch/job.go
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package batch
-
-import (
- "context"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/api/batch/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-type job struct {
- k8s.CommonNamespacedFields
- k8s.CommonPodFields
- v1.JobStatus
- Parallelism *int32
- Completions *int32
- JobActiveDeadlineSeconds *int64
- BackoffLimit *int32
- Selector *metav1.LabelSelector
- ManualSelector *bool
- TTLSecondsAfterFinished *int32
-}
-
-// JobColumns returns kubernetes job fields as Osquery table columns.
-func JobColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&job{})
-}
-
-// JobsGenerate generates the kubernetes jobs as Osquery table data.
-func JobsGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- jobs, err := k8s.GetClient().BatchV1().Jobs(metav1.NamespaceAll).List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, j := range jobs.Items {
- item := &job{
- CommonNamespacedFields: k8s.GetCommonNamespacedFields(j.ObjectMeta),
- CommonPodFields: k8s.GetCommonPodFields(j.Spec.Template.Spec),
- JobStatus: j.Status,
- Parallelism: j.Spec.Parallelism,
- Completions: j.Spec.Completions,
- JobActiveDeadlineSeconds: j.Spec.ActiveDeadlineSeconds,
- BackoffLimit: j.Spec.BackoffLimit,
- Selector: j.Spec.Selector,
- ManualSelector: j.Spec.ManualSelector,
- TTLSecondsAfterFinished: j.Spec.TTLSecondsAfterFinished,
- }
- results = append(results, k8s.ToMap(item))
- }
-
- if jobs.Continue == "" {
- break
- }
- options.Continue = jobs.Continue
- }
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/batch/job_test.go b/infrastructure/kubequery/internal/k8s/batch/job_test.go
deleted file mode 100644
index 84a6e012c6..0000000000
--- a/infrastructure/kubequery/internal/k8s/batch/job_test.go
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package batch
-
-import (
- "context"
- "testing"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- "github.com/stretchr/testify/assert"
- v1 "k8s.io/api/batch/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/types"
- "k8s.io/client-go/kubernetes/fake"
-)
-
-func TestJobsGenerate(t *testing.T) {
- i32 := int32(456)
- i64 := int64(123)
- b := bool(true)
- k8s.SetClient(fake.NewSimpleClientset(&v1.Job{
- ObjectMeta: metav1.ObjectMeta{
- Name: "job1",
- Namespace: "n123",
- UID: types.UID("1234"),
- Labels: map[string]string{"a": "b"},
- },
- Spec: v1.JobSpec{
- Parallelism: &i32,
- Completions: &i32,
- ActiveDeadlineSeconds: &i64,
- BackoffLimit: &i32,
- ManualSelector: &b,
- TTLSecondsAfterFinished: &i32,
- },
- Status: v1.JobStatus{
- StartTime: &metav1.Time{},
- Active: i32,
- Succeeded: i32,
- Failed: i32,
- CompletionTime: nil,
- Conditions: []v1.JobCondition{
- {
- Type: v1.JobComplete,
- Status: metav1.DryRunAll,
- LastTransitionTime: metav1.Time{},
- Reason: "reason",
- Message: "message",
- },
- },
- },
- }), types.UID("hello"), "")
-
- js, err := JobsGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{
- {
- "active": "456",
- "backoff_limit": "456",
- "cluster_uid": "hello",
- "completions": "456",
- "conditions": "[{\"type\":\"Complete\",\"status\":\"All\",\"lastProbeTime\":null,\"lastTransitionTime\":null,\"reason\":\"reason\",\"message\":\"message\"}]",
- "creation_timestamp": "0",
- "failed": "456",
- "host_ipc": "0",
- "host_network": "0",
- "host_pid": "0",
- "job_active_deadline_seconds": "123",
- "labels": "{\"a\":\"b\"}",
- "manual_selector": "1",
- "name": "job1",
- "namespace": "n123",
- "parallelism": "456",
- "start_time": "0",
- "succeeded": "456",
- "ttl_seconds_after_finished": "456",
- "uid": "1234",
- },
- }, js)
-}
diff --git a/infrastructure/kubequery/internal/k8s/client.go b/infrastructure/kubequery/internal/k8s/client.go
deleted file mode 100644
index d2d2081e0b..0000000000
--- a/infrastructure/kubequery/internal/k8s/client.go
+++ /dev/null
@@ -1,125 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package k8s
-
-import (
- "context"
- "fmt"
- "io/ioutil"
- "os"
- "path/filepath"
- "sync"
-
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/types"
- "k8s.io/client-go/kubernetes"
- "k8s.io/client-go/rest"
- "k8s.io/client-go/tools/clientcmd"
- "k8s.io/client-go/util/homedir"
-)
-
-var (
- lock sync.Mutex
- clientset kubernetes.Interface
- clusterUID types.UID
- clusterName string
-)
-
-func initClientset(config *rest.Config) error {
- if config == nil {
- conf, err := rest.InClusterConfig()
- if err != nil {
- if home := homedir.HomeDir(); home != "" {
- content, ferr := ioutil.ReadFile(filepath.Join(home, ".kube", "config"))
- if content != nil && ferr == nil {
- conf, err = clientcmd.RESTConfigFromKubeConfig(content)
- if err != nil {
- return err
- }
- }
- }
- }
- config = conf
- }
-
- // Suppress deprecation warnings
- config.WarningHandler = rest.NoWarnings{}
-
- var err error
- clientset, err = kubernetes.NewForConfig(config)
- if err != nil {
- return err
- }
- return nil
-}
-
-func initUID() error {
- ks, err := GetClient().CoreV1().Namespaces().Get(context.TODO(), "kube-system", v1.GetOptions{})
- if err != nil {
- return err
- }
-
- clusterUID = ks.UID
- if ks.ClusterName == "" {
- clusterName, err = os.Hostname()
- if err != nil {
- fmt.Println("Unable to determine hostname: ", err.Error())
- }
- } else {
- clusterName = ks.ClusterName
- }
-
- return nil
-}
-
-// Init creates in-cluster kubernetes configuration and a client set using the configuration.
-// This returns error if KUBERNETES_SERVICE_HOST or KUBERNETES_SERVICE_PORT environment variables are not set.
-func Init() error {
- lock.Lock()
- defer lock.Unlock()
-
- err := initClientset(nil)
- if err != nil {
- return err
- }
- err = initUID()
- if err != nil {
- return err
- }
-
- return nil
-}
-
-// GetClient returns kubernetes interface that can be used to communicate with API server.
-func GetClient() kubernetes.Interface {
- return clientset
-}
-
-// GetClusterUID returns unique identifier for the current kubernetes cluster.
-// This is same as the kube-system namespace UID.
-func GetClusterUID() types.UID {
- return clusterUID
-}
-
-// GetClusterName returns cluster name provided by the kubernates API.
-// If it is empty, it uses the pod hostname which should be set to the cluster name.
-func GetClusterName() string {
- return clusterName
-}
-
-// SetClient is helper function to override the kubernetes interface with fake one for testing.
-func SetClient(client kubernetes.Interface, uid types.UID, name string) {
- lock.Lock()
- defer lock.Unlock()
-
- clientset = client
- clusterUID = uid
- clusterName = name
-}
diff --git a/infrastructure/kubequery/internal/k8s/client_test.go b/infrastructure/kubequery/internal/k8s/client_test.go
deleted file mode 100644
index f46f3b37ce..0000000000
--- a/infrastructure/kubequery/internal/k8s/client_test.go
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package k8s
-
-import (
- "testing"
-
- "github.com/stretchr/testify/assert"
- "k8s.io/apimachinery/pkg/types"
- "k8s.io/client-go/kubernetes/fake"
-)
-
-func TestGetClient(t *testing.T) {
- SetClient(fake.NewSimpleClientset(), types.UID("uid"), "cluster-name")
- assert.NotNil(t, GetClient(), "Clientset should be valid")
-}
-
-func TestGetClusterUID(t *testing.T) {
- SetClient(fake.NewSimpleClientset(), types.UID("uid"), "cluster-name")
- assert.Equal(t, types.UID("uid"), GetClusterUID())
-}
-
-func TestGetClusterName(t *testing.T) {
- SetClient(fake.NewSimpleClientset(), types.UID("uid"), "cluster-name")
- assert.Equal(t, "cluster-name", GetClusterName())
-}
diff --git a/infrastructure/kubequery/internal/k8s/common.go b/infrastructure/kubequery/internal/k8s/common.go
deleted file mode 100644
index b0d4476d2f..0000000000
--- a/infrastructure/kubequery/internal/k8s/common.go
+++ /dev/null
@@ -1,694 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package k8s
-
-import (
- "github.com/google/uuid"
- v1 "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/types"
-)
-
-// CommonFields contains fields common to most tables. Contents are derived from kubernetes ObjectMeta.
-// This is used for kubernetes resources that are not namespaced.
-type CommonFields struct {
- UID types.UID
- ClusterName string
- ClusterUID types.UID
- Name string
- CreationTimestamp metav1.Time
- Labels map[string]string
- Annotations map[string]string
-}
-
-// GetCommonFields returns CommonFields struct from the provided kubernetes ObjectMeta.
-func GetCommonFields(obj metav1.ObjectMeta) CommonFields {
- return CommonFields{
- UID: obj.UID,
- ClusterName: GetClusterName(),
- ClusterUID: GetClusterUID(),
- Name: obj.Name,
- CreationTimestamp: obj.CreationTimestamp,
- Labels: obj.Labels,
- Annotations: obj.Annotations,
- }
-}
-
-// CommonNamespacedFields contains fields common to most tables. Contents are derived from kubernetes ObjectMeta.
-// This is used for kubernetes resources that are namespaced.
-type CommonNamespacedFields struct {
- UID types.UID
- ClusterName string
- ClusterUID types.UID
- Name string
- Namespace string
- CreationTimestamp metav1.Time
- Labels map[string]string
- Annotations map[string]string
-}
-
-// GetCommonNamespacedFields returns CommonNamespacedFields struct from the provided kubernetes ObjectMeta.
-func GetCommonNamespacedFields(obj metav1.ObjectMeta) CommonNamespacedFields {
- return CommonNamespacedFields{
- UID: obj.UID,
- ClusterName: GetClusterName(),
- ClusterUID: GetClusterUID(),
- Name: obj.Name,
- Namespace: obj.Namespace,
- CreationTimestamp: obj.CreationTimestamp,
- Labels: obj.Labels,
- Annotations: obj.Annotations,
- }
-}
-
-// GetParentCommonNamespacedFields returns CommonNamespacedFields struct from the parent ObjectMeta creating a UID using parent UID + provided name.
-func GetParentCommonNamespacedFields(parent metav1.ObjectMeta, name string) CommonNamespacedFields {
- uid := uuid.NewSHA1(uuid.NameSpaceDNS, []byte(string(parent.UID)+name)).String()
- return CommonNamespacedFields{
- UID: types.UID(uid),
- ClusterName: GetClusterName(),
- ClusterUID: GetClusterUID(),
- Name: name,
- Namespace: parent.Namespace,
- CreationTimestamp: parent.CreationTimestamp,
- Labels: parent.Labels,
- Annotations: parent.Annotations,
- }
-}
-
-// SELinuxOptionsFields contains SELinux options as a flat structure.
-type SELinuxOptionsFields struct {
- SELinuxOptionsUser string
- SELinuxOptionsRole string
- SELinuxOptionsType string
- SELinuxOptionsLevel string
-}
-
-// WindowsOptionsFields contains Windows options as a flat structure.
-type WindowsOptionsFields struct {
- WindowsOptionsGMSACredentialSpecName *string
- WindowsOptionsGMSACredentialSpec *string
- WindowsOptionsRunAsUserName *string
-}
-
-// SeccompProfileFields contains Seccomp profile options as a flat structure.
-type SeccompProfileFields struct {
- SeccompProfileType v1.SeccompProfileType
- SeccompProfileLocalhostProfile *string
-}
-
-// CommonSecurityContextFields contains all security options common to a pod and container.
-type CommonSecurityContextFields struct {
- SELinuxOptionsFields
- WindowsOptionsFields
- SeccompProfileFields
- RunAsUser *int64
- RunAsGroup *int64
- RunAsNonRoot *bool
-}
-
-// PodSecurityContextFields contains all security options specific to a pod.
-type PodSecurityContextFields struct {
- CommonSecurityContextFields
- SupplementalGroups []int64
- FSGroup *int64
- Sysctls []v1.Sysctl
- FSGroupChangePolicy *v1.PodFSGroupChangePolicy
-}
-
-// SecurityContextFields contains all securoty options specific to a container.
-type SecurityContextFields struct {
- CommonSecurityContextFields
- CapabilitiesAdd []v1.Capability
- CapabilitiesDrop []v1.Capability
- Privileged *bool
- ReadOnlyRootFilesystem *bool
- AllowPrivilegeEscalation *bool
- ProcMount *v1.ProcMountType
-}
-
-// AffinityFields struct holds flat affinity fields.
-type AffinityFields struct {
- NodeAffinity *v1.NodeAffinity
- PodAffinity *v1.PodAffinity
- PodAntiAffinity *v1.PodAntiAffinity
-}
-
-// DNSConfigFields struct holds DNS configuration fields.
-type DNSConfigFields struct {
- DNSConfigNameservers []string
- DNSConfigSearches []string
- DNSConfigOptions []v1.PodDNSConfigOption
-}
-
-// CommonPodFields contains relevant fields from pod specification.
-// This flattens some of the embedded structures like security context, DNS config etc.
-type CommonPodFields struct {
- PodSecurityContextFields
- AffinityFields
- DNSConfigFields
-
- NodeSelector map[string]string
- RestartPolicy v1.RestartPolicy
- TerminationGracePeriodSeconds *int64
- ActiveDeadlineSeconds *int64
- DNSPolicy v1.DNSPolicy
- ServiceAccountName string
- AutomountServiceAccountToken *bool
- NodeName string
- HostNetwork bool
- HostPID bool
- HostIPC bool
- ShareProcessNamespace *bool
- ImagePullSecrets []v1.LocalObjectReference
- Hostname string
- Subdomain string
- SchedulerName string
- Tolerations []v1.Toleration
- HostAliases []v1.HostAlias
- PriorityClassName string
- Priority *int32
- ReadinessGates []v1.PodReadinessGate
- RuntimeClassName *string
- EnableServiceLinks *bool
- PreemptionPolicy *v1.PreemptionPolicy
- Overhead v1.ResourceList
- TopologySpreadConstraints []v1.TopologySpreadConstraint
- SetHostnameAsFQDN *bool
-}
-
-// GetCommonPodFields converts pod specification to CommonPodFields structure.
-// This flattens some of the embedded structures like security context, DNS config etc.
-func GetCommonPodFields(p v1.PodSpec) CommonPodFields {
- item := CommonPodFields{
- NodeSelector: p.NodeSelector,
- RestartPolicy: p.RestartPolicy,
- TerminationGracePeriodSeconds: p.TerminationGracePeriodSeconds,
- ActiveDeadlineSeconds: p.ActiveDeadlineSeconds,
- DNSPolicy: p.DNSPolicy,
- ServiceAccountName: p.ServiceAccountName,
- AutomountServiceAccountToken: p.AutomountServiceAccountToken,
- NodeName: p.NodeName,
- HostNetwork: p.HostNetwork,
- HostPID: p.HostPID,
- HostIPC: p.HostIPC,
- ShareProcessNamespace: p.ShareProcessNamespace,
- ImagePullSecrets: p.ImagePullSecrets,
- Hostname: p.Hostname,
- Subdomain: p.Subdomain,
- SchedulerName: p.SchedulerName,
- Tolerations: p.Tolerations,
- HostAliases: p.HostAliases,
- PriorityClassName: p.PriorityClassName,
- Priority: p.Priority,
- ReadinessGates: p.ReadinessGates,
- RuntimeClassName: p.RuntimeClassName,
- EnableServiceLinks: p.EnableServiceLinks,
- PreemptionPolicy: p.PreemptionPolicy,
- Overhead: p.Overhead,
- TopologySpreadConstraints: p.TopologySpreadConstraints,
- SetHostnameAsFQDN: p.SetHostnameAsFQDN,
- }
- if p.Affinity != nil {
- item.NodeAffinity = p.Affinity.NodeAffinity
- item.PodAffinity = p.Affinity.PodAffinity
- item.PodAntiAffinity = p.Affinity.PodAntiAffinity
- }
- if p.DNSConfig != nil {
- item.DNSConfigNameservers = p.DNSConfig.Nameservers
- item.DNSConfigSearches = p.DNSConfig.Searches
- item.DNSConfigOptions = p.DNSConfig.Options
- }
- if p.SecurityContext != nil {
- item.RunAsUser = p.SecurityContext.RunAsUser
- item.RunAsGroup = p.SecurityContext.RunAsGroup
- item.RunAsNonRoot = p.SecurityContext.RunAsNonRoot
- item.SupplementalGroups = p.SecurityContext.SupplementalGroups
- item.Sysctls = p.SecurityContext.Sysctls
- item.FSGroup = p.SecurityContext.FSGroup
- item.FSGroupChangePolicy = p.SecurityContext.FSGroupChangePolicy
- if p.SecurityContext.SeccompProfile != nil {
- item.SeccompProfileType = p.SecurityContext.SeccompProfile.Type
- item.SeccompProfileLocalhostProfile = p.SecurityContext.SeccompProfile.LocalhostProfile
- }
- if p.SecurityContext.SELinuxOptions != nil {
- item.SELinuxOptionsLevel = p.SecurityContext.SELinuxOptions.Level
- item.SELinuxOptionsRole = p.SecurityContext.SELinuxOptions.Role
- item.SELinuxOptionsType = p.SecurityContext.SELinuxOptions.Type
- item.SELinuxOptionsUser = p.SecurityContext.SELinuxOptions.User
- }
- if p.SecurityContext.WindowsOptions != nil {
- item.WindowsOptionsRunAsUserName = p.SecurityContext.WindowsOptions.RunAsUserName
- item.WindowsOptionsGMSACredentialSpec = p.SecurityContext.WindowsOptions.GMSACredentialSpec
- item.WindowsOptionsGMSACredentialSpecName = p.SecurityContext.WindowsOptions.GMSACredentialSpecName
- }
- }
- return item
-}
-
-// CommonContainerFields contains relevant fields from container specification.
-// This flattens some of the embedded structures like security context.
-type CommonContainerFields struct {
- SecurityContextFields
- TargetContainerName string
- Image string
- Command []string
- Args []string
- WorkingDir string
- Ports []v1.ContainerPort
- EnvFrom []v1.EnvFromSource
- Env []v1.EnvVar
- ResourceLimits v1.ResourceList
- ResourceRequests v1.ResourceList
- VolumeMounts []v1.VolumeMount
- VolumeDevices []v1.VolumeDevice
- LivenessProbe *v1.Probe
- ReadinessProbe *v1.Probe
- StartupProbe *v1.Probe
- Lifecycle *v1.Lifecycle
- TerminationMessagePath string
- TerminationMessagePolicy v1.TerminationMessagePolicy
- ImagePullPolicy v1.PullPolicy
- Stdin bool
- StdinOnce bool
- TTY bool
-}
-
-// GetCommonContainerFields converts container specification to CommonContainerFields structure.
-// This flattens some of the embedded structures like security context.
-func GetCommonContainerFields(c v1.Container) CommonContainerFields {
- item := CommonContainerFields{
- Image: c.Image,
- Command: c.Command,
- Args: c.Args,
- WorkingDir: c.WorkingDir,
- Ports: c.Ports,
- EnvFrom: c.EnvFrom,
- Env: c.Env,
- ResourceLimits: c.Resources.Limits,
- ResourceRequests: c.Resources.Requests,
- VolumeMounts: c.VolumeMounts,
- VolumeDevices: c.VolumeDevices,
- LivenessProbe: c.LivenessProbe,
- ReadinessProbe: c.ReadinessProbe,
- StartupProbe: c.StartupProbe,
- Lifecycle: c.Lifecycle,
- TerminationMessagePath: c.TerminationMessagePath,
- TerminationMessagePolicy: c.TerminationMessagePolicy,
- ImagePullPolicy: c.ImagePullPolicy,
- Stdin: c.Stdin,
- StdinOnce: c.StdinOnce,
- TTY: c.TTY,
- }
- copyContainerSecurityContext(&item, c.SecurityContext)
- return item
-}
-
-// GetCommonEphemeralContainerFields converts ephemeral container specification to CommonContainerFields.
-// This flattens some of the embedded structures like security context.
-// Ephemeral container contains one additional field (TargetContainerName) on top of container.
-func GetCommonEphemeralContainerFields(c v1.EphemeralContainer) CommonContainerFields {
- item := CommonContainerFields{
- TargetContainerName: c.TargetContainerName,
- Image: c.Image,
- Command: c.Command,
- Args: c.Args,
- WorkingDir: c.WorkingDir,
- Ports: c.Ports,
- EnvFrom: c.EnvFrom,
- Env: c.Env,
- ResourceLimits: c.Resources.Limits,
- ResourceRequests: c.Resources.Requests,
- VolumeMounts: c.VolumeMounts,
- VolumeDevices: c.VolumeDevices,
- LivenessProbe: c.LivenessProbe,
- ReadinessProbe: c.ReadinessProbe,
- StartupProbe: c.StartupProbe,
- Lifecycle: c.Lifecycle,
- TerminationMessagePath: c.TerminationMessagePath,
- TerminationMessagePolicy: c.TerminationMessagePolicy,
- ImagePullPolicy: c.ImagePullPolicy,
- Stdin: c.Stdin,
- StdinOnce: c.StdinOnce,
- TTY: c.TTY,
- }
- copyContainerSecurityContext(&item, c.SecurityContext)
- return item
-}
-
-func copyContainerSecurityContext(item *CommonContainerFields, sc *v1.SecurityContext) {
- if sc != nil {
- item.Privileged = sc.Privileged
- item.RunAsUser = sc.RunAsUser
- item.RunAsGroup = sc.RunAsGroup
- item.RunAsNonRoot = sc.RunAsNonRoot
- item.ReadOnlyRootFilesystem = sc.ReadOnlyRootFilesystem
- item.AllowPrivilegeEscalation = sc.AllowPrivilegeEscalation
- item.ProcMount = sc.ProcMount
-
- if sc.Capabilities != nil {
- item.CapabilitiesAdd = sc.Capabilities.Add
- item.CapabilitiesDrop = sc.Capabilities.Drop
- }
- if sc.SeccompProfile != nil {
- item.SeccompProfileType = sc.SeccompProfile.Type
- item.SeccompProfileLocalhostProfile = sc.SeccompProfile.LocalhostProfile
- }
- if sc.SELinuxOptions != nil {
- item.SELinuxOptionsLevel = sc.SELinuxOptions.Level
- item.SELinuxOptionsRole = sc.SELinuxOptions.Role
- item.SELinuxOptionsType = sc.SELinuxOptions.Type
- item.SELinuxOptionsUser = sc.SELinuxOptions.User
- }
- if sc.WindowsOptions != nil {
- item.WindowsOptionsRunAsUserName = sc.WindowsOptions.RunAsUserName
- item.WindowsOptionsGMSACredentialSpec = sc.WindowsOptions.GMSACredentialSpec
- item.WindowsOptionsGMSACredentialSpecName = sc.WindowsOptions.GMSACredentialSpecName
- }
- }
-}
-
-// CommonVolumeFields contains flattened fields from volume specification.
-type CommonVolumeFields struct {
- VolumeType string
- FSType *string
- ReadOnly *bool
- SecretName string
- HostPathPath string
- HostPathType *v1.HostPathType
- EmptyDirMedium v1.StorageMedium
- EmptyDirSizeLimit string
- GCEPersistentDiskPDName string
- GCEPersistentDiskPartition int32
- AWSElasticBlockStoreVolumeID string
- AWSElasticBlockStorePartition int32
- GitRepoRepository string
- GitRepoRevision string
- GitRepoDirectory string
- SecretItems []v1.KeyToPath
- SecretDefaultMode *int32
- SecretOptional *bool
- NFSServer string
- NFSPath string
- ISCSITargetPortal string
- ISCSIIqn string
- ISCSILun int32
- ISCSIInterface string
- ISCSIPortals []string
- ISCSIDiscoveryCHAPAuth bool
- ISCSISessionCHAPAuth bool
- ISCSIInitiatorName *string
- GlusterfsEndpointsName string
- GlusterfsPath string
- PersistentVolumeClaimName string
- RBDCephMonitors []string
- RBDImage string
- RBDPool string
- RBDRadosUser string
- RBDKeyring string
- FlexVolumeDriver string
- FlexVolumeOptions map[string]string
- CinderVolumeID string
- CephFSMonitors []string
- CephFSPath string
- CephFSUser string
- CephFSSecretFile string
- FlockerDatasetName string
- FlockerDatasetUUID string
- DownwardAPIItems []v1.DownwardAPIVolumeFile
- DownwardAPIDefaultMode *int32
- FCTargetWWNs []string
- FCLun *int32
- FcWWIDs []string
- AzureFileShareName string
- ConfigMapName string
- ConfigMapItems []v1.KeyToPath
- ConfigMapDefaultMode *int32
- ConfigMapOptional *bool
- VsphereVolumeVolumePath string
- VsphereVolumeStoragePolicyName string
- VsphereVolumeStoragePolicyID string
- QuobyteRegistry string
- QuobyteVolume string
- QuobyteUser string
- QuobyteGroup string
- QuobyteTenant string
- AzureDiskDiskName string
- AzureDiskDataDiskURI string
- AzureDiskCachingMode *v1.AzureDataDiskCachingMode
- AzureDiskKind *v1.AzureDataDiskKind
- PhotonPersistentDiskPdID string
- ProjectedSources []v1.VolumeProjection
- ProjectedDefaultMode *int32
- PortworxVolumeID string
- ScaleIOGateway string
- ScaleIOSystem string
- ScaleIOSSLEnabled bool
- ScaleIOProtectionDomain string
- ScaleIOStoragePool string
- ScaleIOStorageMode string
- ScaleIOVolumeName string
- StorageOSVolumeName string
- StorageOSVolumeNamespace string
- CSIDriver string
- CSIVolumeAttributes map[string]string
- EphemeralVolumeClaimTemplate *v1.PersistentVolumeClaimTemplate
-}
-
-// GetCommonVolumeFields converts volume specification to CommonVolumeFields.
-// This flattens most of the embedded structures like AWSElasticBlockStore, AzureDisk, etc.
-func GetCommonVolumeFields(from v1.Volume) CommonVolumeFields {
- to := CommonVolumeFields{}
- if from.AWSElasticBlockStore != nil {
- to.VolumeType = "aws_elastic_block_store"
- to.AWSElasticBlockStoreVolumeID = from.AWSElasticBlockStore.VolumeID
- to.AWSElasticBlockStorePartition = from.AWSElasticBlockStore.Partition
- to.FSType = &from.AWSElasticBlockStore.FSType
- to.ReadOnly = &from.AWSElasticBlockStore.ReadOnly
- }
- if from.AzureDisk != nil {
- to.VolumeType = "azure_disk"
- to.AzureDiskCachingMode = from.AzureDisk.CachingMode
- to.AzureDiskDataDiskURI = from.AzureDisk.DataDiskURI
- to.AzureDiskDiskName = from.AzureDisk.DiskName
- to.AzureDiskKind = from.AzureDisk.Kind
- to.FSType = from.AzureDisk.FSType
- to.ReadOnly = from.AzureDisk.ReadOnly
- }
- if from.AzureFile != nil {
- to.VolumeType = "azure_file"
- to.AzureFileShareName = from.AzureFile.ShareName
- to.SecretName = from.AzureFile.SecretName
- to.ReadOnly = &from.AzureFile.ReadOnly
- }
- if from.CSI != nil {
- to.VolumeType = "csi"
- to.CSIDriver = from.CSI.Driver
- to.CSIVolumeAttributes = from.CSI.VolumeAttributes
- to.FSType = from.CSI.FSType
- to.ReadOnly = from.CSI.ReadOnly
- if from.CSI.NodePublishSecretRef != nil {
- to.SecretName = from.CSI.NodePublishSecretRef.Name
- }
- }
- if from.CephFS != nil {
- to.VolumeType = "ceph_fs"
- to.CephFSMonitors = from.CephFS.Monitors
- to.CephFSPath = from.CephFS.Path
- to.CephFSSecretFile = from.CephFS.SecretFile
- to.CephFSUser = from.CephFS.User
- to.ReadOnly = &from.CephFS.ReadOnly
- if from.CephFS.SecretRef != nil {
- to.SecretName = from.CephFS.SecretRef.Name
- }
- }
- if from.Cinder != nil {
- to.VolumeType = "cinder"
- to.CinderVolumeID = from.Cinder.VolumeID
- to.FSType = &from.Cinder.FSType
- to.ReadOnly = &from.Cinder.ReadOnly
- if from.Cinder.SecretRef != nil {
- to.SecretName = from.Cinder.SecretRef.Name
- }
- }
- if from.ConfigMap != nil {
- to.VolumeType = "config_map"
- to.ConfigMapDefaultMode = from.ConfigMap.DefaultMode
- to.ConfigMapItems = from.ConfigMap.Items
- to.ConfigMapName = from.ConfigMap.Name
- to.ConfigMapOptional = from.ConfigMap.Optional
- }
- if from.DownwardAPI != nil {
- to.VolumeType = "downward_api"
- to.DownwardAPIDefaultMode = from.DownwardAPI.DefaultMode
- to.DownwardAPIItems = from.DownwardAPI.Items
- }
- if from.EmptyDir != nil {
- to.VolumeType = "empty_dir"
- to.EmptyDirMedium = from.EmptyDir.Medium
- to.EmptyDirSizeLimit = from.EmptyDir.SizeLimit.String()
- }
- if from.Ephemeral != nil {
- to.VolumeType = "ephemeral"
- to.EphemeralVolumeClaimTemplate = from.Ephemeral.VolumeClaimTemplate
- }
- if from.FC != nil {
- to.VolumeType = "fc"
- to.FCLun = from.FC.Lun
- to.FCTargetWWNs = from.FC.TargetWWNs
- to.FcWWIDs = from.FC.WWIDs
- to.FSType = &from.FC.FSType
- to.ReadOnly = &from.FC.ReadOnly
- }
- if from.FlexVolume != nil {
- to.VolumeType = "flex_volume"
- to.FlexVolumeDriver = from.FlexVolume.Driver
- to.FlexVolumeOptions = from.FlexVolume.Options
- to.FSType = &from.FlexVolume.FSType
- to.ReadOnly = &from.FlexVolume.ReadOnly
- if from.FlexVolume.SecretRef != nil {
- to.SecretName = from.FlexVolume.SecretRef.Name
- }
- }
- if from.Flocker != nil {
- to.VolumeType = "flocker"
- to.FlockerDatasetName = from.Flocker.DatasetName
- to.FlockerDatasetUUID = from.Flocker.DatasetUUID
- }
- if from.GCEPersistentDisk != nil {
- to.VolumeType = "gce_persistent_disk"
- to.GCEPersistentDiskPDName = from.GCEPersistentDisk.PDName
- to.GCEPersistentDiskPartition = from.GCEPersistentDisk.Partition
- to.FSType = &from.GCEPersistentDisk.FSType
- to.ReadOnly = &from.GCEPersistentDisk.ReadOnly
- }
- if from.GitRepo != nil {
- to.VolumeType = "git_repo"
- to.GitRepoDirectory = from.GitRepo.Directory
- to.GitRepoRepository = from.GitRepo.Repository
- to.GitRepoRevision = from.GitRepo.Revision
- }
- if from.Glusterfs != nil {
- to.VolumeType = "gluster_fs"
- to.GlusterfsPath = from.Glusterfs.Path
- to.GlusterfsEndpointsName = from.Glusterfs.EndpointsName
- to.ReadOnly = &from.Glusterfs.ReadOnly
- }
- if from.HostPath != nil {
- to.VolumeType = "host_path"
- to.HostPathPath = from.HostPath.Path
- to.HostPathType = from.HostPath.Type
- }
- if from.ISCSI != nil {
- to.VolumeType = "iscsci"
- to.ISCSITargetPortal = from.ISCSI.TargetPortal
- to.ISCSIIqn = from.ISCSI.IQN
- to.ISCSILun = from.ISCSI.Lun
- to.ISCSIInterface = from.ISCSI.ISCSIInterface
- to.ISCSIPortals = from.ISCSI.Portals
- to.ISCSIDiscoveryCHAPAuth = from.ISCSI.DiscoveryCHAPAuth
- to.ISCSISessionCHAPAuth = from.ISCSI.SessionCHAPAuth
- to.ISCSIInitiatorName = from.ISCSI.InitiatorName
- to.FSType = &from.ISCSI.FSType
- to.ReadOnly = &from.ISCSI.ReadOnly
- if from.ISCSI.SecretRef != nil {
- to.SecretName = from.ISCSI.SecretRef.Name
- }
- }
- if from.NFS != nil {
- to.VolumeType = "nfs"
- to.NFSPath = from.NFS.Path
- to.NFSServer = from.NFS.Server
- to.ReadOnly = &from.NFS.ReadOnly
- }
- if from.PersistentVolumeClaim != nil {
- to.VolumeType = "persistent_volume_claim"
- to.PersistentVolumeClaimName = from.PersistentVolumeClaim.ClaimName
- to.ReadOnly = &from.PersistentVolumeClaim.ReadOnly
- }
- if from.PhotonPersistentDisk != nil {
- to.VolumeType = "photon_persistent_disk"
- to.PhotonPersistentDiskPdID = from.PhotonPersistentDisk.PdID
- to.FSType = &from.PhotonPersistentDisk.FSType
- }
- if from.PortworxVolume != nil {
- to.VolumeType = "portworx_volume"
- to.PortworxVolumeID = from.PortworxVolume.VolumeID
- to.FSType = &from.PortworxVolume.FSType
- to.ReadOnly = &from.PortworxVolume.ReadOnly
- }
- if from.Projected != nil {
- to.VolumeType = "projected"
- to.ProjectedDefaultMode = from.Projected.DefaultMode
- to.ProjectedSources = from.Projected.Sources
- }
- if from.Quobyte != nil {
- to.VolumeType = "quobyte"
- to.QuobyteGroup = from.Quobyte.Group
- to.QuobyteRegistry = from.Quobyte.Registry
- to.QuobyteTenant = from.Quobyte.Tenant
- to.QuobyteUser = from.Quobyte.User
- to.QuobyteVolume = from.Quobyte.Volume
- to.ReadOnly = &from.Quobyte.ReadOnly
- }
- if from.RBD != nil {
- to.VolumeType = "rbd"
- to.RBDCephMonitors = from.RBD.CephMonitors
- to.RBDImage = from.RBD.RBDImage
- to.RBDPool = from.RBD.RBDPool
- to.RBDRadosUser = from.RBD.RadosUser
- to.RBDKeyring = from.RBD.Keyring
- to.FSType = &from.RBD.FSType
- to.ReadOnly = &from.RBD.ReadOnly
- if from.RBD.SecretRef != nil {
- to.SecretName = from.RBD.SecretRef.Name
- }
- }
- if from.ScaleIO != nil {
- to.VolumeType = "scaleio"
- to.ScaleIOGateway = from.ScaleIO.Gateway
- to.ScaleIOSystem = from.ScaleIO.System
- to.ScaleIOSSLEnabled = from.ScaleIO.SSLEnabled
- to.ScaleIOProtectionDomain = from.ScaleIO.ProtectionDomain
- to.ScaleIOStoragePool = from.ScaleIO.StoragePool
- to.ScaleIOStorageMode = from.ScaleIO.StorageMode
- to.ScaleIOVolumeName = from.ScaleIO.VolumeName
- to.FSType = &from.ScaleIO.FSType
- to.ReadOnly = &from.ScaleIO.ReadOnly
- if from.ScaleIO.SecretRef != nil {
- to.SecretName = from.ScaleIO.SecretRef.Name
- }
- }
- if from.Secret != nil {
- to.VolumeType = "secret"
- to.SecretName = from.Secret.SecretName
- to.SecretItems = from.Secret.Items
- to.SecretDefaultMode = from.Secret.DefaultMode
- to.SecretOptional = from.Secret.Optional
- }
- if from.StorageOS != nil {
- to.VolumeType = "storage_os"
- to.StorageOSVolumeName = from.StorageOS.VolumeName
- to.StorageOSVolumeNamespace = from.StorageOS.VolumeNamespace
- to.FSType = &from.StorageOS.FSType
- to.ReadOnly = &from.StorageOS.ReadOnly
- if from.StorageOS.SecretRef != nil {
- to.SecretName = from.StorageOS.SecretRef.Name
- }
- }
- if from.VsphereVolume != nil {
- to.VolumeType = "vsphere_volume"
- to.VsphereVolumeStoragePolicyID = from.VsphereVolume.StoragePolicyID
- to.VsphereVolumeStoragePolicyName = from.VsphereVolume.StoragePolicyName
- to.VsphereVolumeVolumePath = from.VsphereVolume.VolumePath
- to.FSType = &from.VsphereVolume.FSType
- }
- return to
-}
diff --git a/infrastructure/kubequery/internal/k8s/common_test.go b/infrastructure/kubequery/internal/k8s/common_test.go
deleted file mode 100644
index ca133d6469..0000000000
--- a/infrastructure/kubequery/internal/k8s/common_test.go
+++ /dev/null
@@ -1,428 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package k8s
-
-import (
- "testing"
-
- "github.com/stretchr/testify/assert"
- v1 "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/types"
-)
-
-func TestGetCommonFields(t *testing.T) {
- meta := metav1.ObjectMeta{
- Name: "n123",
- GenerateName: "g123",
- Namespace: "kube-system",
- SelfLink: "/",
- UID: types.UID("u123"),
- ResourceVersion: "r123",
- Generation: 1,
- CreationTimestamp: metav1.Time{},
- DeletionGracePeriodSeconds: nil,
- Labels: map[string]string{"a": "b"},
- ClusterName: "",
- }
- assert.Equal(t, GetCommonFields(meta), CommonFields{
- UID: meta.UID,
- Name: meta.Name,
- ClusterName: "cluster-name",
- ClusterUID: types.UID("uid"),
- CreationTimestamp: meta.CreationTimestamp,
- Labels: meta.Labels,
- Annotations: meta.Annotations,
- }, "Common fields should match")
-}
-
-func TestGetNamespaceCommonFields(t *testing.T) {
- meta := metav1.ObjectMeta{
- Name: "n123",
- GenerateName: "g123",
- Namespace: "kube-system",
- SelfLink: "/",
- UID: types.UID("u123"),
- ResourceVersion: "r123",
- Generation: 1,
- CreationTimestamp: metav1.Time{},
- DeletionGracePeriodSeconds: nil,
- Annotations: map[string]string{"a": "b"},
- ClusterName: "",
- }
- assert.Equal(t, GetCommonNamespacedFields(meta), CommonNamespacedFields{
- UID: meta.UID,
- Name: meta.Name,
- Namespace: meta.Namespace,
- ClusterName: "cluster-name",
- ClusterUID: types.UID("uid"),
- CreationTimestamp: meta.CreationTimestamp,
- Labels: meta.Labels,
- Annotations: meta.Annotations,
- }, "Common namespace fields should match")
-}
-
-func TestGetCommonPodFields(t *testing.T) {
- i32 := int32(456)
- i64 := int64(123)
- b := bool(true)
- s := string("s123")
- pod := v1.PodSpec{
- RestartPolicy: v1.RestartPolicyAlways,
- TerminationGracePeriodSeconds: &i64,
- ActiveDeadlineSeconds: &i64,
- DNSPolicy: v1.DNSClusterFirst,
- ServiceAccountName: "s123",
- AutomountServiceAccountToken: &b,
- NodeSelector: make(map[string]string),
- NodeName: "n123",
- HostNetwork: true,
- HostPID: true,
- HostIPC: true,
- ShareProcessNamespace: &b,
- ImagePullSecrets: make([]v1.LocalObjectReference, 3),
- Hostname: "h123",
- Subdomain: "sub123",
- Affinity: &v1.Affinity{NodeAffinity: &v1.NodeAffinity{RequiredDuringSchedulingIgnoredDuringExecution: &v1.NodeSelector{}}},
- SchedulerName: "sn123",
- Tolerations: make([]v1.Toleration, 2),
- HostAliases: make([]v1.HostAlias, 1),
- PriorityClassName: "p123",
- Priority: &i32,
- ReadinessGates: []v1.PodReadinessGate{},
- RuntimeClassName: &s,
- EnableServiceLinks: &b,
- PreemptionPolicy: nil,
- Overhead: make(v1.ResourceList),
- TopologySpreadConstraints: make([]v1.TopologySpreadConstraint, 4),
- SetHostnameAsFQDN: &b,
- DNSConfig: &v1.PodDNSConfig{
- Nameservers: make([]string, 1),
- Searches: make([]string, 2),
- Options: make([]v1.PodDNSConfigOption, 3),
- },
- SecurityContext: &v1.PodSecurityContext{
- RunAsUser: &i64,
- RunAsGroup: &i64,
- RunAsNonRoot: &b,
- FSGroup: &i64,
- FSGroupChangePolicy: (*v1.PodFSGroupChangePolicy)(&s),
- Sysctls: []v1.Sysctl{{Name: "n1", Value: "v1"}},
- SELinuxOptions: &v1.SELinuxOptions{User: "u123", Role: "r123", Type: "t123", Level: "l123"},
- SupplementalGroups: make([]int64, 1),
- SeccompProfile: &v1.SeccompProfile{Type: "t123"},
- },
- }
- assert.Equal(t, GetCommonPodFields(pod), CommonPodFields{
- PodSecurityContextFields: PodSecurityContextFields{
- CommonSecurityContextFields: CommonSecurityContextFields{
- SELinuxOptionsFields: SELinuxOptionsFields{
- SELinuxOptionsUser: pod.SecurityContext.SELinuxOptions.User,
- SELinuxOptionsRole: pod.SecurityContext.SELinuxOptions.Role,
- SELinuxOptionsType: pod.SecurityContext.SELinuxOptions.Type,
- SELinuxOptionsLevel: pod.SecurityContext.SELinuxOptions.Level,
- },
- WindowsOptionsFields: WindowsOptionsFields{
- WindowsOptionsGMSACredentialSpecName: nil,
- WindowsOptionsGMSACredentialSpec: nil,
- WindowsOptionsRunAsUserName: nil,
- },
- SeccompProfileFields: SeccompProfileFields{
- SeccompProfileType: pod.SecurityContext.SeccompProfile.Type,
- SeccompProfileLocalhostProfile: pod.SecurityContext.SeccompProfile.LocalhostProfile,
- },
- RunAsUser: pod.SecurityContext.RunAsUser,
- RunAsGroup: pod.SecurityContext.RunAsGroup,
- RunAsNonRoot: pod.SecurityContext.RunAsNonRoot,
- },
- SupplementalGroups: pod.SecurityContext.SupplementalGroups,
- FSGroup: pod.SecurityContext.FSGroup,
- Sysctls: pod.SecurityContext.Sysctls,
- FSGroupChangePolicy: pod.SecurityContext.FSGroupChangePolicy,
- },
- DNSConfigFields: DNSConfigFields{
- DNSConfigNameservers: pod.DNSConfig.Nameservers,
- DNSConfigSearches: pod.DNSConfig.Searches,
- DNSConfigOptions: pod.DNSConfig.Options,
- },
- AffinityFields: AffinityFields{
- NodeAffinity: pod.Affinity.NodeAffinity,
- PodAffinity: pod.Affinity.PodAffinity,
- PodAntiAffinity: pod.Affinity.PodAntiAffinity,
- },
- NodeSelector: pod.NodeSelector,
- RestartPolicy: pod.RestartPolicy,
- TerminationGracePeriodSeconds: pod.TerminationGracePeriodSeconds,
- ActiveDeadlineSeconds: pod.ActiveDeadlineSeconds,
- DNSPolicy: pod.DNSPolicy,
- ServiceAccountName: pod.ServiceAccountName,
- AutomountServiceAccountToken: pod.AutomountServiceAccountToken,
- NodeName: pod.NodeName,
- HostNetwork: pod.HostNetwork,
- HostPID: pod.HostPID,
- HostIPC: pod.HostIPC,
- ShareProcessNamespace: pod.ShareProcessNamespace,
- ImagePullSecrets: pod.ImagePullSecrets,
- Hostname: pod.Hostname,
- Subdomain: pod.Subdomain,
- SchedulerName: pod.SchedulerName,
- Tolerations: pod.Tolerations,
- HostAliases: pod.HostAliases,
- PriorityClassName: pod.PriorityClassName,
- Priority: pod.Priority,
- ReadinessGates: pod.ReadinessGates,
- RuntimeClassName: pod.RuntimeClassName,
- EnableServiceLinks: pod.EnableServiceLinks,
- PreemptionPolicy: pod.PreemptionPolicy,
- Overhead: pod.Overhead,
- TopologySpreadConstraints: pod.TopologySpreadConstraints,
- SetHostnameAsFQDN: pod.SetHostnameAsFQDN,
- }, "Common pod fields should match")
-}
-
-func TestGetCommonContainerFields(t *testing.T) {
- i64 := int64(456)
- b := bool(true)
- s := string("str123")
- c := v1.Container{
- Name: "n123",
- Image: "i123",
- Command: []string{"c123"},
- Args: []string{"a1", "a2"},
- WorkingDir: "w123",
- Ports: make([]v1.ContainerPort, 1),
- EnvFrom: []v1.EnvFromSource{{Prefix: "p123"}},
- Env: []v1.EnvVar{{Name: "n1", Value: "v1"}},
- Resources: v1.ResourceRequirements{Limits: v1.ResourceList{}},
- VolumeMounts: make([]v1.VolumeMount, 2),
- VolumeDevices: []v1.VolumeDevice{{Name: "vn1"}},
- LivenessProbe: &v1.Probe{Handler: v1.Handler{Exec: &v1.ExecAction{Command: []string{"curl"}}}},
- ReadinessProbe: &v1.Probe{},
- StartupProbe: nil,
- Lifecycle: &v1.Lifecycle{PostStart: &v1.Handler{Exec: &v1.ExecAction{Command: []string{"curl"}}}},
- TerminationMessagePath: "t123",
- TerminationMessagePolicy: v1.TerminationMessageFallbackToLogsOnError,
- ImagePullPolicy: v1.PullAlways,
- Stdin: true,
- StdinOnce: false,
- TTY: true,
- SecurityContext: &v1.SecurityContext{
- Capabilities: &v1.Capabilities{Add: []v1.Capability{"a"}, Drop: []v1.Capability{"b", "c"}},
- Privileged: &b,
- RunAsUser: &i64,
- RunAsGroup: nil,
- RunAsNonRoot: &b,
- ReadOnlyRootFilesystem: nil,
- AllowPrivilegeEscalation: &b,
- ProcMount: nil,
- SELinuxOptions: &v1.SELinuxOptions{
- User: "u123",
- Role: "r123",
- Type: "t123",
- Level: "",
- },
- SeccompProfile: &v1.SeccompProfile{
- Type: v1.SeccompProfileType("abc"),
- LocalhostProfile: &s,
- },
- WindowsOptions: nil,
- },
- }
- assert.Equal(t, GetCommonContainerFields(c), CommonContainerFields{
- SecurityContextFields: SecurityContextFields{
- CommonSecurityContextFields: CommonSecurityContextFields{
- SELinuxOptionsFields: SELinuxOptionsFields{
- SELinuxOptionsUser: c.SecurityContext.SELinuxOptions.User,
- SELinuxOptionsRole: c.SecurityContext.SELinuxOptions.Role,
- SELinuxOptionsType: c.SecurityContext.SELinuxOptions.Type,
- SELinuxOptionsLevel: c.SecurityContext.SELinuxOptions.Level,
- },
- WindowsOptionsFields: WindowsOptionsFields{
- WindowsOptionsGMSACredentialSpecName: nil,
- WindowsOptionsGMSACredentialSpec: nil,
- WindowsOptionsRunAsUserName: nil,
- },
- SeccompProfileFields: SeccompProfileFields{
- SeccompProfileType: c.SecurityContext.SeccompProfile.Type,
- SeccompProfileLocalhostProfile: c.SecurityContext.SeccompProfile.LocalhostProfile,
- },
- RunAsUser: c.SecurityContext.RunAsUser,
- RunAsGroup: c.SecurityContext.RunAsGroup,
- RunAsNonRoot: c.SecurityContext.RunAsNonRoot,
- },
- CapabilitiesAdd: c.SecurityContext.Capabilities.Add,
- CapabilitiesDrop: c.SecurityContext.Capabilities.Drop,
- Privileged: c.SecurityContext.Privileged,
- ReadOnlyRootFilesystem: c.SecurityContext.ReadOnlyRootFilesystem,
- AllowPrivilegeEscalation: c.SecurityContext.AllowPrivilegeEscalation,
- ProcMount: c.SecurityContext.ProcMount,
- },
- TargetContainerName: "",
- Image: c.Image,
- Command: c.Command,
- Args: c.Args,
- WorkingDir: c.WorkingDir,
- Ports: c.Ports,
- EnvFrom: c.EnvFrom,
- Env: c.Env,
- ResourceLimits: c.Resources.Limits,
- ResourceRequests: c.Resources.Requests,
- VolumeMounts: c.VolumeMounts,
- VolumeDevices: c.VolumeDevices,
- LivenessProbe: c.LivenessProbe,
- ReadinessProbe: c.ReadinessProbe,
- StartupProbe: c.StartupProbe,
- Lifecycle: c.Lifecycle,
- TerminationMessagePath: c.TerminationMessagePath,
- TerminationMessagePolicy: c.TerminationMessagePolicy,
- ImagePullPolicy: c.ImagePullPolicy,
- Stdin: c.Stdin,
- StdinOnce: c.StdinOnce,
- TTY: c.TTY,
- }, "Common container fields should match")
-}
-
-func TestGetCommonEphemeralContainerFields(t *testing.T) {
- i64 := int64(456)
- b := bool(true)
- s := string("str123")
- c := v1.EphemeralContainer{
- TargetContainerName: "t123",
- EphemeralContainerCommon: v1.EphemeralContainerCommon{
- Name: "n123",
- Image: "i123",
- Command: []string{"c123"},
- Args: []string{"a1", "a2"},
- WorkingDir: "w123",
- Ports: make([]v1.ContainerPort, 1),
- EnvFrom: []v1.EnvFromSource{{Prefix: "p123"}},
- Env: []v1.EnvVar{{Name: "n1", Value: "v1"}},
- Resources: v1.ResourceRequirements{Limits: v1.ResourceList{}},
- VolumeMounts: make([]v1.VolumeMount, 2),
- VolumeDevices: []v1.VolumeDevice{{Name: "vn1"}},
- LivenessProbe: &v1.Probe{Handler: v1.Handler{Exec: &v1.ExecAction{Command: []string{"curl"}}}},
- ReadinessProbe: &v1.Probe{},
- StartupProbe: nil,
- Lifecycle: &v1.Lifecycle{PostStart: &v1.Handler{Exec: &v1.ExecAction{Command: []string{"curl"}}}},
- TerminationMessagePath: "t123",
- TerminationMessagePolicy: v1.TerminationMessageFallbackToLogsOnError,
- ImagePullPolicy: v1.PullAlways,
- Stdin: true,
- StdinOnce: false,
- TTY: true,
- SecurityContext: &v1.SecurityContext{
- Capabilities: &v1.Capabilities{Add: []v1.Capability{"a"}, Drop: []v1.Capability{"b", "c"}},
- Privileged: &b,
- RunAsUser: &i64,
- RunAsGroup: nil,
- RunAsNonRoot: &b,
- ReadOnlyRootFilesystem: nil,
- AllowPrivilegeEscalation: &b,
- ProcMount: nil,
- SELinuxOptions: &v1.SELinuxOptions{
- User: "u123",
- Role: "r123",
- Type: "t123",
- Level: "",
- },
- SeccompProfile: &v1.SeccompProfile{
- Type: v1.SeccompProfileType("abc"),
- LocalhostProfile: &s,
- },
- WindowsOptions: nil,
- },
- },
- }
- assert.Equal(t, GetCommonEphemeralContainerFields(c), CommonContainerFields{
- SecurityContextFields: SecurityContextFields{
- CommonSecurityContextFields: CommonSecurityContextFields{
- SELinuxOptionsFields: SELinuxOptionsFields{
- SELinuxOptionsUser: c.SecurityContext.SELinuxOptions.User,
- SELinuxOptionsRole: c.SecurityContext.SELinuxOptions.Role,
- SELinuxOptionsType: c.SecurityContext.SELinuxOptions.Type,
- SELinuxOptionsLevel: c.SecurityContext.SELinuxOptions.Level,
- },
- WindowsOptionsFields: WindowsOptionsFields{
- WindowsOptionsGMSACredentialSpecName: nil,
- WindowsOptionsGMSACredentialSpec: nil,
- WindowsOptionsRunAsUserName: nil,
- },
- SeccompProfileFields: SeccompProfileFields{
- SeccompProfileType: c.SecurityContext.SeccompProfile.Type,
- SeccompProfileLocalhostProfile: c.SecurityContext.SeccompProfile.LocalhostProfile,
- },
- RunAsUser: c.SecurityContext.RunAsUser,
- RunAsGroup: c.SecurityContext.RunAsGroup,
- RunAsNonRoot: c.SecurityContext.RunAsNonRoot,
- },
- CapabilitiesAdd: c.SecurityContext.Capabilities.Add,
- CapabilitiesDrop: c.SecurityContext.Capabilities.Drop,
- Privileged: c.SecurityContext.Privileged,
- ReadOnlyRootFilesystem: c.SecurityContext.ReadOnlyRootFilesystem,
- AllowPrivilegeEscalation: c.SecurityContext.AllowPrivilegeEscalation,
- ProcMount: c.SecurityContext.ProcMount,
- },
- TargetContainerName: c.TargetContainerName,
- Image: c.Image,
- Command: c.Command,
- Args: c.Args,
- WorkingDir: c.WorkingDir,
- Ports: c.Ports,
- EnvFrom: c.EnvFrom,
- Env: c.Env,
- ResourceLimits: c.Resources.Limits,
- ResourceRequests: c.Resources.Requests,
- VolumeMounts: c.VolumeMounts,
- VolumeDevices: c.VolumeDevices,
- LivenessProbe: c.LivenessProbe,
- ReadinessProbe: c.ReadinessProbe,
- StartupProbe: c.StartupProbe,
- Lifecycle: c.Lifecycle,
- TerminationMessagePath: c.TerminationMessagePath,
- TerminationMessagePolicy: c.TerminationMessagePolicy,
- ImagePullPolicy: c.ImagePullPolicy,
- Stdin: c.Stdin,
- StdinOnce: c.StdinOnce,
- TTY: c.TTY,
- }, "Common ephemeral container fields should match")
-}
-
-func TestGetCommonVolumeFields(t *testing.T) {
- v := v1.Volume{
- VolumeSource: v1.VolumeSource{
- HostPath: &v1.HostPathVolumeSource{
- Path: "p123",
- Type: nil,
- },
- },
- }
- assert.Equal(t, GetCommonVolumeFields(v), CommonVolumeFields{
- VolumeType: "host_path",
- HostPathPath: v.HostPath.Path,
- HostPathType: v.HostPath.Type,
- }, "Common volume HostPath fields should match")
-
- v = v1.Volume{
- VolumeSource: v1.VolumeSource{
- GCEPersistentDisk: &v1.GCEPersistentDiskVolumeSource{
- PDName: "p123",
- FSType: "gce",
- Partition: 123,
- },
- },
- }
- assert.Equal(t, GetCommonVolumeFields(v), CommonVolumeFields{
- VolumeType: "gce_persistent_disk",
- FSType: &v.GCEPersistentDisk.FSType,
- ReadOnly: &v.GCEPersistentDisk.ReadOnly,
- GCEPersistentDiskPDName: v.GCEPersistentDisk.PDName,
- GCEPersistentDiskPartition: v.GCEPersistentDisk.Partition,
- }, "Common volume GCE fields should match")
-}
diff --git a/infrastructure/kubequery/internal/k8s/core/component_status.go b/infrastructure/kubequery/internal/k8s/core/component_status.go
deleted file mode 100644
index a129329070..0000000000
--- a/infrastructure/kubequery/internal/k8s/core/component_status.go
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package core
-
-import (
- "context"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/types"
-)
-
-type componentStatus struct {
- ClusterName string
- ClusterUID types.UID
- Name string
- v1.ComponentCondition
-}
-
-// ComponentStatusColumns returns kubernetes component status fields as Osquery table columns.
-func ComponentStatusColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&componentStatus{})
-}
-
-// ComponentStatusesGenerate generates the kubernetes config maps as Osquery table data.
-func ComponentStatusesGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- css, err := k8s.GetClient().CoreV1().ComponentStatuses().List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, cs := range css.Items {
- for _, cc := range cs.Conditions {
- item := &componentStatus{
- ClusterName: k8s.GetClusterName(),
- ClusterUID: k8s.GetClusterUID(),
- Name: cs.ObjectMeta.Name,
- ComponentCondition: cc,
- }
- results = append(results, k8s.ToMap(item))
- }
- }
-
- if css.Continue == "" {
- break
- }
- options.Continue = css.Continue
- }
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/core/component_status_test.go b/infrastructure/kubequery/internal/k8s/core/component_status_test.go
deleted file mode 100644
index 41c5d29a83..0000000000
--- a/infrastructure/kubequery/internal/k8s/core/component_status_test.go
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package core
-
-import (
- "context"
- "testing"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/stretchr/testify/assert"
-)
-
-func TestComponentStatusesGenerate(t *testing.T) {
- css, err := ComponentStatusesGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{
- {
- "cluster_uid": "d7fd8e77-93de-4742-9037-5db9a01e966a",
- "name": "controller-manager",
- "message": "ok",
- "status": "True",
- "type": "Healthy",
- },
- {
- "cluster_uid": "d7fd8e77-93de-4742-9037-5db9a01e966a",
- "name": "etcd-0",
- "message": "{\"health\":\"true\"}",
- "status": "True",
- "type": "Healthy",
- },
- {
- "cluster_uid": "d7fd8e77-93de-4742-9037-5db9a01e966a",
- "name": "scheduler",
- "message": "ok",
- "status": "True",
- "type": "Healthy",
- },
- }, css)
-}
diff --git a/infrastructure/kubequery/internal/k8s/core/config_map.go b/infrastructure/kubequery/internal/k8s/core/config_map.go
deleted file mode 100644
index 2256eb7d7e..0000000000
--- a/infrastructure/kubequery/internal/k8s/core/config_map.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package core
-
-import (
- "context"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-type configmap struct {
- k8s.CommonNamespacedFields
- Immutable *bool
-}
-
-// ConfigMapColumns returns kubernetes config map fields as Osquery table columns.
-func ConfigMapColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&configmap{})
-}
-
-// ConfigMapsGenerate generates the kubernetes config maps as Osquery table data.
-func ConfigMapsGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- configmaps, err := k8s.GetClient().CoreV1().ConfigMaps(metav1.NamespaceAll).List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, c := range configmaps.Items {
- item := &configmap{
- CommonNamespacedFields: k8s.GetCommonNamespacedFields(c.ObjectMeta),
- Immutable: c.Immutable,
- }
- results = append(results, k8s.ToMap(item))
- }
-
- if configmaps.Continue == "" {
- break
- }
- options.Continue = configmaps.Continue
- }
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/core/config_map_test.go b/infrastructure/kubequery/internal/k8s/core/config_map_test.go
deleted file mode 100644
index 1140ad96c0..0000000000
--- a/infrastructure/kubequery/internal/k8s/core/config_map_test.go
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package core
-
-import (
- "context"
- "testing"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/stretchr/testify/assert"
-)
-
-func TestConfigMapsGenerate(t *testing.T) {
- cms, err := ConfigMapsGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{
- {
- "cluster_uid": "d7fd8e77-93de-4742-9037-5db9a01e966a",
- "creation_timestamp": "1611191331",
- "name": "jaeger-operator-lock",
- "namespace": "default",
- "uid": "eec6944c-5c13-4e30-8326-1a82e1962e4d",
- },
- }, cms)
-}
diff --git a/infrastructure/kubequery/internal/k8s/core/endpoint_subset.go b/infrastructure/kubequery/internal/k8s/core/endpoint_subset.go
deleted file mode 100644
index 6c9c7ebc8b..0000000000
--- a/infrastructure/kubequery/internal/k8s/core/endpoint_subset.go
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package core
-
-import (
- "context"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-type endpointSubset struct {
- k8s.CommonNamespacedFields
- v1.EndpointSubset
-}
-
-// EndpointSubsetColumns returns kubernetes endpoint subset fields as Osquery table columns.
-func EndpointSubsetColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&endpointSubset{})
-}
-
-// EndpointSubsetsGenerate generates the kubernetes endpoint subsets as Osquery table data.
-func EndpointSubsetsGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- endpoints, err := k8s.GetClient().CoreV1().Endpoints(metav1.NamespaceAll).List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, e := range endpoints.Items {
- for _, s := range e.Subsets {
- item := &endpointSubset{
- CommonNamespacedFields: k8s.GetCommonNamespacedFields(e.ObjectMeta),
- EndpointSubset: s,
- }
- results = append(results, k8s.ToMap(item))
- }
- }
-
- if endpoints.Continue == "" {
- break
- }
- options.Continue = endpoints.Continue
- }
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/core/endpoint_subset_test.go b/infrastructure/kubequery/internal/k8s/core/endpoint_subset_test.go
deleted file mode 100644
index 22a63106a0..0000000000
--- a/infrastructure/kubequery/internal/k8s/core/endpoint_subset_test.go
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package core
-
-import (
- "context"
- "testing"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/stretchr/testify/assert"
-)
-
-func TestEndpointSubsetsGenerate(t *testing.T) {
- ess, err := EndpointSubsetsGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{
- {
- "addresses": "[{\"ip\":\"10.1.26.50\",\"nodeName\":\"seshu\",\"targetRef\":{\"kind\":\"Pod\",\"namespace\":\"default\",\"name\":\"jaeger-operator-5db4f9d996-pm7ld\",\"uid\":\"2271363b-ffc9-4f00-984c-e0a125ee2d7a\",\"resourceVersion\":\"451808\"}}]",
- "annotations": "{\"endpoints.kubernetes.io/last-change-trigger-time\":\"2021-01-20T20:08:52-05:00\"}",
- "cluster_uid": "d7fd8e77-93de-4742-9037-5db9a01e966a",
- "creation_timestamp": "1611191332",
- "labels": "{\"name\":\"jaeger-operator\"}",
- "name": "jaeger-operator",
- "namespace": "default",
- "ports": "[{\"name\":\"metrics\",\"port\":8383,\"protocol\":\"TCP\"}]",
- "uid": "013741da-d7a5-4a2d-8f4b-792ac6a40dd3",
- },
- }, ess)
-}
diff --git a/infrastructure/kubequery/internal/k8s/core/init_test.go b/infrastructure/kubequery/internal/k8s/core/init_test.go
deleted file mode 100644
index 964cb98688..0000000000
--- a/infrastructure/kubequery/internal/k8s/core/init_test.go
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package core
-
-import (
- "encoding/json"
- "io/ioutil"
- "path/filepath"
-
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/api/core/v1"
- "k8s.io/apimachinery/pkg/api/resource"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/types"
- "k8s.io/client-go/kubernetes/fake"
-)
-
-func loadTestResource(name string, v interface{}) {
- path := filepath.Join("testdata", name)
- data, err := ioutil.ReadFile(path)
- if err != nil {
- panic(err)
- }
-
- err = json.Unmarshal(data, v)
- if err != nil {
- panic(err)
- }
-}
-
-func init() {
- lr := &v1.LimitRange{
- ObjectMeta: metav1.ObjectMeta{
- Name: "lr1",
- Namespace: "n123",
- UID: types.UID("1234"),
- Labels: map[string]string{"a": "b"},
- },
- Spec: v1.LimitRangeSpec{
- Limits: []v1.LimitRangeItem{
- {
- Type: v1.LimitTypeContainer,
- Max: v1.ResourceList{v1.ResourceCPU: resource.MustParse("0")},
- Min: v1.ResourceList{v1.ResourceCPU: resource.MustParse("4")},
- Default: v1.ResourceList{v1.ResourceCPU: resource.MustParse("3")},
- DefaultRequest: v1.ResourceList{v1.ResourceCPU: resource.MustParse("2")},
- MaxLimitRequestRatio: v1.ResourceList{v1.ResourceCPU: resource.MustParse("1")},
- },
- },
- },
- }
-
- csl := &v1.ComponentStatusList{}
- loadTestResource("component_status_test.json", csl)
- cm := &v1.ConfigMap{}
- loadTestResource("config_map_test.json", cm)
- ep := &v1.Endpoints{}
- loadTestResource("endpoint_subset_test.json", ep)
- ns := &v1.NamespaceList{}
- loadTestResource("namespaces_test.json", ns)
- node := &v1.Node{}
- loadTestResource("node_test.json", node)
- pod := &v1.Pod{}
- loadTestResource("pod_test.json", pod)
- secret := &v1.Secret{}
- loadTestResource("secret_test.json", secret)
- sa := &v1.ServiceAccount{}
- loadTestResource("service_account_test.json", sa)
- services := &v1.Service{}
- loadTestResource("services_test.json", services)
-
- k8s.SetClient(fake.NewSimpleClientset(lr, csl, cm, ep, ns, node, pod, secret, sa, services),
- types.UID("d7fd8e77-93de-4742-9037-5db9a01e966a"), "")
-}
diff --git a/infrastructure/kubequery/internal/k8s/core/limit_range.go b/infrastructure/kubequery/internal/k8s/core/limit_range.go
deleted file mode 100644
index c88a642727..0000000000
--- a/infrastructure/kubequery/internal/k8s/core/limit_range.go
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package core
-
-import (
- "context"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-type limitRange struct {
- k8s.CommonNamespacedFields
- v1.LimitRangeItem
-}
-
-// LimitRangeColumns returns kubernetes limit range fields as Osquery table columns.
-func LimitRangeColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&limitRange{})
-}
-
-// LimitRangesGenerate generates the kubernetes limit ranges as Osquery table data.
-func LimitRangesGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- ranges, err := k8s.GetClient().CoreV1().LimitRanges(metav1.NamespaceAll).List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, r := range ranges.Items {
- for _, i := range r.Spec.Limits {
- item := &limitRange{
- CommonNamespacedFields: k8s.GetCommonNamespacedFields(r.ObjectMeta),
- LimitRangeItem: i,
- }
- results = append(results, k8s.ToMap(item))
- }
- }
-
- if ranges.Continue == "" {
- break
- }
- options.Continue = ranges.Continue
- }
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/core/limit_range_test.go b/infrastructure/kubequery/internal/k8s/core/limit_range_test.go
deleted file mode 100644
index 0cbb7ca921..0000000000
--- a/infrastructure/kubequery/internal/k8s/core/limit_range_test.go
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package core
-
-import (
- "context"
- "testing"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/stretchr/testify/assert"
-)
-
-func TestLimitRangesGenerate(t *testing.T) {
- js, err := LimitRangesGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{
- {
- "cluster_uid": "d7fd8e77-93de-4742-9037-5db9a01e966a",
- "creation_timestamp": "0",
- "default": "{\"cpu\":\"3\"}",
- "default_request": "{\"cpu\":\"2\"}",
- "labels": "{\"a\":\"b\"}",
- "max": "{\"cpu\":\"0\"}",
- "max_limit_request_ratio": "{\"cpu\":\"1\"}",
- "min": "{\"cpu\":\"4\"}",
- "name": "lr1",
- "namespace": "n123",
- "type": "Container",
- "uid": "1234",
- },
- }, js)
-}
diff --git a/infrastructure/kubequery/internal/k8s/core/namespace.go b/infrastructure/kubequery/internal/k8s/core/namespace.go
deleted file mode 100644
index 136a085329..0000000000
--- a/infrastructure/kubequery/internal/k8s/core/namespace.go
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package core
-
-import (
- "context"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-type namespace struct {
- k8s.CommonFields
- v1.NamespaceStatus
-}
-
-// NamespaceColumns returns kubernetes namespace fields as Osquery table columns.
-func NamespaceColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&namespace{})
-}
-
-// NamespacesGenerate generates the kubernetes namespaces as Osquery table data.
-func NamespacesGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- namespaces, err := k8s.GetClient().CoreV1().Namespaces().List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, n := range namespaces.Items {
- item := &namespace{
- CommonFields: k8s.GetCommonFields(n.ObjectMeta),
- NamespaceStatus: n.Status,
- }
- results = append(results, k8s.ToMap(item))
- }
-
- if namespaces.Continue == "" {
- break
- }
- options.Continue = namespaces.Continue
- }
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/core/namespace_test.go b/infrastructure/kubequery/internal/k8s/core/namespace_test.go
deleted file mode 100644
index 20a83dba19..0000000000
--- a/infrastructure/kubequery/internal/k8s/core/namespace_test.go
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package core
-
-import (
- "context"
- "testing"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/stretchr/testify/assert"
-)
-
-func TestNamespacesGenerate(t *testing.T) {
- nss, err := NamespacesGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{
- {
- "cluster_uid": "d7fd8e77-93de-4742-9037-5db9a01e966a",
- "creation_timestamp": "1610476216",
- "name": "default",
- "phase": "Active",
- "uid": "7b50dc9c-6149-4cac-a0d0-52bf0fa5356d",
- },
- {
- "annotations": "{\"kubectl.kubernetes.io/last-applied-configuration\":\"{\\\"apiVersion\\\":\\\"v1\\\",\\\"kind\\\":\\\"Namespace\\\",\\\"metadata\\\":{\\\"annotations\\\":{},\\\"name\\\":\\\"ingress\\\"}}\\n\"}",
- "cluster_uid": "d7fd8e77-93de-4742-9037-5db9a01e966a",
- "creation_timestamp": "1611191047",
- "name": "ingress",
- "phase": "Active",
- "uid": "7653c4b9-3df2-493e-ae28-5e3a777f7e76",
- },
- {
- "annotations": "{\"kubectl.kubernetes.io/last-applied-configuration\":\"{\\\"apiVersion\\\":\\\"v1\\\",\\\"kind\\\":\\\"Namespace\\\",\\\"metadata\\\":{\\\"annotations\\\":{},\\\"labels\\\":{\\\"istio-injection\\\":\\\"disabled\\\"},\\\"name\\\":\\\"istio-system\\\"}}\\n\"}",
- "cluster_uid": "d7fd8e77-93de-4742-9037-5db9a01e966a",
- "creation_timestamp": "1611191143",
- "labels": "{\"istio-injection\":\"disabled\"}",
- "name": "istio-system",
- "phase": "Active",
- "uid": "7f931f07-f8d0-4198-bf16-e459914e1866",
- },
- {
- "cluster_uid": "d7fd8e77-93de-4742-9037-5db9a01e966a",
- "creation_timestamp": "1610476215",
- "name": "kube-node-lease",
- "phase": "Active",
- "uid": "a8f303fd-0074-475f-935a-122cf8b6d1ad",
- },
- {
- "cluster_uid": "d7fd8e77-93de-4742-9037-5db9a01e966a",
- "creation_timestamp": "1610476215",
- "name": "kube-public",
- "phase": "Active",
- "uid": "6c719dfa-3de8-477b-a650-8bf9e2f12ee0",
- },
- {
- "cluster_uid": "d7fd8e77-93de-4742-9037-5db9a01e966a",
- "creation_timestamp": "1610476215",
- "name": "kube-system",
- "phase": "Active",
- "uid": "ebca5546-b939-4765-bf3d-869ac644ea0f",
- },
- {
- "annotations": "{\"kubectl.kubernetes.io/last-applied-configuration\":\"{\\\"apiVersion\\\":\\\"v1\\\",\\\"kind\\\":\\\"Namespace\\\",\\\"metadata\\\":{\\\"annotations\\\":{},\\\"name\\\":\\\"monitoring\\\"}}\\n\"}",
- "cluster_uid": "d7fd8e77-93de-4742-9037-5db9a01e966a",
- "creation_timestamp": "1611191449",
- "name": "monitoring",
- "phase": "Active",
- "uid": "afb98a87-39bb-4c8f-b0dd-8ea3683ba745",
- },
- }, nss)
-}
diff --git a/infrastructure/kubequery/internal/k8s/core/node.go b/infrastructure/kubequery/internal/k8s/core/node.go
deleted file mode 100644
index 2d8f4eb042..0000000000
--- a/infrastructure/kubequery/internal/k8s/core/node.go
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package core
-
-import (
- "context"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-type node struct {
- k8s.CommonFields
- v1.NodeSpec
- v1.NodeStatus
-}
-
-// NodeColumns returns kubernetes node fields as Osquery table columns.
-func NodeColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&node{})
-}
-
-// NodesGenerate generates the kubernetes nodes as Osquery table data.
-func NodesGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- nodes, err := k8s.GetClient().CoreV1().Nodes().List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, n := range nodes.Items {
- item := &node{
- CommonFields: k8s.GetCommonFields(n.ObjectMeta),
- NodeSpec: n.Spec,
- NodeStatus: n.Status,
- }
- results = append(results, k8s.ToMap(item))
- }
-
- if nodes.Continue == "" {
- break
- }
- options.Continue = nodes.Continue
- }
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/core/node_test.go b/infrastructure/kubequery/internal/k8s/core/node_test.go
deleted file mode 100644
index 8945d718f3..0000000000
--- a/infrastructure/kubequery/internal/k8s/core/node_test.go
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package core
-
-import (
- "context"
- "testing"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/stretchr/testify/assert"
-)
-
-func TestNodesGenerate(t *testing.T) {
- ns, err := NodesGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{
- {
- "addresses": "[{\"type\":\"InternalIP\",\"address\":\"192.168.0.28\"},{\"type\":\"Hostname\",\"address\":\"seshu\"}]",
- "allocatable": "{\"cpu\":\"12\",\"ephemeral-storage\":\"958151776Ki\",\"hugepages-1Gi\":\"0\",\"hugepages-2Mi\":\"0\",\"memory\":\"32411744Ki\",\"pods\":\"110\"}",
- "annotations": "{\"node.alpha.kubernetes.io/ttl\":\"0\",\"projectcalico.org/IPv4Address\":\"192.168.192.1/20\",\"projectcalico.org/IPv4VXLANTunnelAddr\":\"10.1.26.0\",\"volumes.kubernetes.io/controller-managed-attach-detach\":\"true\"}",
- "capacity": "{\"cpu\":\"12\",\"ephemeral-storage\":\"959200352Ki\",\"hugepages-1Gi\":\"0\",\"hugepages-2Mi\":\"0\",\"memory\":\"32514144Ki\",\"pods\":\"110\"}",
- "cluster_uid": "d7fd8e77-93de-4742-9037-5db9a01e966a",
- "conditions": "[{\"type\":\"NetworkUnavailable\",\"status\":\"False\",\"lastHeartbeatTime\":\"2021-01-20T16:31:53Z\",\"lastTransitionTime\":\"2021-01-20T16:31:53Z\",\"reason\":\"CalicoIsUp\",\"message\":\"Calico is running on this node\"},{\"type\":\"MemoryPressure\",\"status\":\"False\",\"lastHeartbeatTime\":\"2021-01-21T19:24:08Z\",\"lastTransitionTime\":\"2021-01-12T18:30:24Z\",\"reason\":\"KubeletHasSufficientMemory\",\"message\":\"kubelet has sufficient memory available\"},{\"type\":\"DiskPressure\",\"status\":\"False\",\"lastHeartbeatTime\":\"2021-01-21T19:24:08Z\",\"lastTransitionTime\":\"2021-01-12T18:30:24Z\",\"reason\":\"KubeletHasNoDiskPressure\",\"message\":\"kubelet has no disk pressure\"},{\"type\":\"PIDPressure\",\"status\":\"False\",\"lastHeartbeatTime\":\"2021-01-21T19:24:08Z\",\"lastTransitionTime\":\"2021-01-12T18:30:24Z\",\"reason\":\"KubeletHasSufficientPID\",\"message\":\"kubelet has sufficient PID available\"},{\"type\":\"Ready\",\"status\":\"True\",\"lastHeartbeatTime\":\"2021-01-21T19:24:08Z\",\"lastTransitionTime\":\"2021-01-21T01:12:31Z\",\"reason\":\"KubeletReady\",\"message\":\"kubelet is posting ready status. AppArmor enabled\"}]",
- "creation_timestamp": "1610476224",
- "daemon_endpoints": "{\"kubeletEndpoint\":{\"Port\":10250}}",
- "images": "[{\"names\":[\"docker.io/library/kubequery:latest\"],\"sizeBytes\":202523444},{\"names\":null,\"sizeBytes\":174592418},{\"names\":[\"k8s.gcr.io/ingress-nginx/controller@sha256:fc4979d8b8443a831c9789b5155cded454cb7de737a8b727bc2ba0106d2eae8b\",\"k8s.gcr.io/ingress-nginx/controller:v0.35.0\"],\"sizeBytes\":111763794},{\"names\":[\"docker.io/istio/proxyv2@sha256:3ad9ee2b43b299e5e6d97aaea5ed47dbf3da9293733607d9b52f358313e852ae\",\"docker.io/istio/proxyv2:1.5.1\"],\"sizeBytes\":106728139},{\"names\":[\"docker.io/jaegertracing/jaeger-operator@sha256:5a3198179f7972028a29dd7fbf71ac7a21e0dbf46c85e8cc2c37e3b6a5ee26a4\",\"docker.io/jaegertracing/jaeger-operator:1.14.0\"],\"sizeBytes\":99946252},{\"names\":[\"docker.io/calico/node@sha256:cb9dea7b86471c71925ae318f7c60af72d9ddf1dab0fe2029832a671b83bba6a\",\"docker.io/calico/node:v3.13.2\"],\"sizeBytes\":88917441},{\"names\":[\"docker.io/istio/mixer@sha256:92940f04e9aa20a41e330eb8a00a0b8ee7a3f4029dcdadfca4a5d009774474b2\",\"docker.io/istio/mixer:1.5.1\"],\"sizeBytes\":86988340},{\"names\":[\"docker.io/istio/pilot@sha256:818aecc1c73c53af9091ac1d4f500d9d7cec6d135d372d03cffab1addaff4ec0\",\"docker.io/istio/pilot:1.5.1\"],\"sizeBytes\":85950908},{\"names\":[\"docker.io/uptycs/kubequery@sha256:96b6c15753941f58e97fc6f80ee7ec06ce63d48a14b53ee0cc1dd10dc3585e7d\",\"docker.io/uptycs/kubequery:latest\"],\"sizeBytes\":82661645},{\"names\":[\"docker.io/istio/galley@sha256:d69acf890e5c82cb0c000fc15c540777ee566ae225762d85f157f69c9665338c\",\"docker.io/istio/galley:1.5.1\"],\"sizeBytes\":82020368},{\"names\":[\"docker.io/istio/sidecar_injector@sha256:cf334211f192378e7fcb66baeeb43412e483e34d739e93711d0a61568dd00462\",\"docker.io/istio/sidecar_injector:1.5.1\"],\"sizeBytes\":77988679},{\"names\":[\"docker.io/calico/cni@sha256:bbf7e3ac3f80d0a356a6c27b095bd313d1106f8ed84f85850816ed79295843c1\",\"docker.io/calico/cni:v3.13.2\"],\"sizeBytes\":76710099},{\"names\":[\"docker.io/istio/kubectl@sha256:83ea57063cf3344a2462c5bbaa5b125810f2e8ef7283d2ba3bfd9393e624b80f\",\"docker.io/istio/kubectl:1.5.1\"],\"sizeBytes\":76608582},{\"names\":[\"docker.io/grafana/grafana@sha256:bd55ea2bad17f5016431734b42fdfc202ebdc7d08b6c4ad35ebb03d06efdff69\",\"docker.io/grafana/grafana:6.4.3\"],\"sizeBytes\":76169588},{\"names\":[\"quay.io/kiali/kiali:v1.9\"],\"sizeBytes\":75529164},{\"names\":[\"docker.io/istio/citadel@sha256:92b985411af9844b75c5fc9c39c33fc27ef549c31b5221358f334062aadb86ec\",\"docker.io/istio/citadel:1.5.1\"],\"sizeBytes\":72604439},{\"names\":[\"docker.io/kubernetesui/dashboard@sha256:06868692fb9a7f2ede1a06de1b7b32afabc40ec739c1181d83b5ed3eb147ec6e\",\"docker.io/kubernetesui/dashboard:v2.0.0\"],\"sizeBytes\":66209190},{\"names\":[\"docker.io/grafana/grafana@sha256:89304bc2335f4976618548d7b93d165ed67369d3a051d2f627fc4e0aa3d0aff1\",\"docker.io/grafana/grafana:7.1.0\"],\"sizeBytes\":59911815},{\"names\":[\"quay.io/prometheus/prometheus@sha256:d4ba4dd1a9ebb90916d0bfed3c204adcb118ed24546bf8dd2e6b30fc0fd2009e\",\"quay.io/prometheus/prometheus:v2.20.0\"],\"sizeBytes\":59435495},{\"names\":[\"docker.io/prom/prometheus@sha256:cd93b8711bb92eb9c437d74217311519e0a93bc55779aa664325dc83cd13cb32\",\"docker.io/prom/prometheus:v2.12.0\"],\"sizeBytes\":54819393},{\"names\":[\"docker.io/calico/pod2daemon-flexvol@sha256:0022da5a9a89512f8a117f12d2088b3f1f8f22c094ee15aae24d58085f2c186a\",\"docker.io/calico/pod2daemon-flexvol:v3.13.2\"],\"sizeBytes\":37530211},{\"names\":[\"quay.io/prometheus/alertmanager@sha256:24a5204b418e8fa0214cfb628486749003b039c279c56b5bddb5b10cd100d926\",\"quay.io/prometheus/alertmanager:v0.21.0\"],\"sizeBytes\":27097956},{\"names\":[\"docker.io/jaegertracing/all-in-one@sha256:738442983b772a5d413c8a2c44a5563956adaff224e5b38f52a959124dafc119\",\"docker.io/jaegertracing/all-in-one:1.16\"],\"sizeBytes\":23571671},{\"names\":[\"docker.io/directxman12/k8s-prometheus-adapter@sha256:44558d3ae98467e44fee72ebc3948ce59630996013a51d49cf925682a7b87c18\",\"docker.io/directxman12/k8s-prometheus-adapter:v0.7.0\"],\"sizeBytes\":23407634},{\"names\":[\"docker.io/jaegertracing/all-in-one@sha256:021aefafecbb5559078206996f1f4e8fc5907debab047f4fcc5c837689a66cfa\",\"docker.io/jaegertracing/all-in-one:1.14.0\"],\"sizeBytes\":23208939},{\"names\":[\"docker.io/calico/kube-controllers@sha256:a635173cbe9deb33deba9baadffd933f61c63fbdadc0e3fa60ff1a14198c1da8\",\"docker.io/calico/kube-controllers:v3.13.2\"],\"sizeBytes\":23132265},{\"names\":[\"quay.io/brancz/kube-rbac-proxy@sha256:05e15e1164fd7ac85f5702b3f87ef548f4e00de3a79e6c4a6a34c92035497a9a\",\"quay.io/brancz/kube-rbac-proxy:v0.8.0\"],\"sizeBytes\":19991394},{\"names\":[\"docker.io/kubernetesui/metrics-scraper@sha256:555981a24f184420f3be0c79d4efb6c948a85cfce84034f85a563f4151a81cbf\",\"docker.io/kubernetesui/metrics-scraper:v1.0.4\"],\"sizeBytes\":16020077},{\"names\":[\"docker.io/coredns/coredns@sha256:41bee6992c2ed0f4628fcef75751048927bcd6b1cee89c79f6acb63ca5474d5a\",\"docker.io/coredns/coredns:1.6.6\"],\"sizeBytes\":12932169},{\"names\":[\"quay.io/coreos/prometheus-operator@sha256:a54e806fb27d2fb0251da4f3b2a3bb5320759af63a54a755788304775f2384a7\",\"quay.io/coreos/prometheus-operator:v0.40.0\"],\"sizeBytes\":12496211},{\"names\":[\"quay.io/prometheus/node-exporter@sha256:a2f29256e53cc3e0b64d7a472512600b2e9410347d53cdc85b49f659c17e02ee\",\"quay.io/prometheus/node-exporter:v0.18.1\"],\"sizeBytes\":11122661},{\"names\":[\"gcr.io/k8s-staging-kube-state-metrics/kube-state-metrics@sha256:9718f2e7999e75f4993e312fccada801c0eb98eaba73db072f0f806d67fcc238\",\"gcr.io/k8s-staging-kube-state-metrics/kube-state-metrics:v1.9.7\"],\"sizeBytes\":10782953},{\"names\":[\"k8s.gcr.io/metrics-server-amd64@sha256:c9c4e95068b51d6b33a9dccc61875df07dc650abbf4ac1a19d58b4628f89288b\",\"k8s.gcr.io/metrics-server-amd64:v0.3.6\"],\"sizeBytes\":10542830},{\"names\":[\"docker.io/cdkbot/hostpath-provisioner-amd64@sha256:339f78eabc68ffb1656d584e41f121cb4d2b667565428c8dde836caf5b8a0228\",\"docker.io/cdkbot/hostpath-provisioner-amd64:1.0.0\"],\"sizeBytes\":9745308},{\"names\":[\"quay.io/coreos/prometheus-config-reloader@sha256:c679a143b24b7731ad1577a9865aa3805426cbf1b25e30807b951dff68466ffd\",\"quay.io/coreos/prometheus-config-reloader:v0.40.0\"],\"sizeBytes\":4254190},{\"names\":[\"docker.io/jimmidyson/configmap-reload@sha256:d107c7a235c266273b1c3502a391fec374430e5625539403d0de797fa9c556a2\",\"docker.io/jimmidyson/configmap-reload:v0.3.0\"],\"sizeBytes\":4063371},{\"names\":[\"k8s.gcr.io/pause@sha256:f78411e19d84a252e53bff71a4407a5686c46983a2c2eeed83929b888179acea\",\"k8s.gcr.io/pause:3.1\"],\"sizeBytes\":317164}]",
- "labels": "{\"beta.kubernetes.io/arch\":\"amd64\",\"beta.kubernetes.io/os\":\"linux\",\"kubernetes.io/arch\":\"amd64\",\"kubernetes.io/hostname\":\"seshu\",\"kubernetes.io/os\":\"linux\",\"microk8s.io/cluster\":\"true\"}",
- "name": "seshu",
- "node_info": "{\"machineID\":\"c73ef4a4ef2a4ec19a75719b63db3bb7\",\"systemUUID\":\"4c4c4544-0044-3510-8058-c6c04f5a5932\",\"bootID\":\"0b51cb6f-120b-4557-b74a-e53a5f4f00d5\",\"kernelVersion\":\"5.4.0-60-generic\",\"osImage\":\"Ubuntu 20.04.1 LTS\",\"containerRuntimeVersion\":\"containerd://1.3.7\",\"kubeletVersion\":\"v1.20.1-34+e7db93d188d0d1\",\"kubeProxyVersion\":\"v1.20.1-34+e7db93d188d0d1\",\"operatingSystem\":\"linux\",\"architecture\":\"amd64\"}",
- "uid": "d0d45111-421d-4d4f-89c9-3e75ca2dc06c",
- "unschedulable": "0",
- },
- }, ns)
-}
diff --git a/infrastructure/kubequery/internal/k8s/core/persistent_volume.go b/infrastructure/kubequery/internal/k8s/core/persistent_volume.go
deleted file mode 100644
index 1c00743c67..0000000000
--- a/infrastructure/kubequery/internal/k8s/core/persistent_volume.go
+++ /dev/null
@@ -1,330 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package core
-
-import (
- "context"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-type persistentVolume struct {
- k8s.CommonFields
-
- Capacity v1.ResourceList
- AccessModes []v1.PersistentVolumeAccessMode
- ClaimRef *v1.ObjectReference
- PersistentVolumeReclaimPolicy v1.PersistentVolumeReclaimPolicy
- StorageClassName string
- MountOptions []string
- VolumeMode *v1.PersistentVolumeMode
- NodeAffinity *v1.VolumeNodeAffinity
-
- StatusPhase v1.PersistentVolumePhase
- StatusMessage string
- StatusReason string
-
- VolumeType string
- FSType *string
- ReadOnly *bool
- SecretName string
- HostPathPath string
- HostPathType *v1.HostPathType
- GCEPersistentDiskPDName string
- GCEPersistentDiskPartition int32
- AWSElasticBlockStoreVolumeID string
- AWSElasticBlockStorePartition int32
- NFSServer string
- NFSPath string
- ISCSITargetPortal string
- ISCSIIqn string
- ISCSILun int32
- ISCSIInterface string
- ISCSIPortals []string
- ISCSIDiscoveryCHAPAuth bool
- ISCSISessionCHAPAuth bool
- ISCSIInitiatorName *string
- LocalPath string
- GlusterfsEndpointsName string
- GlusterfsPath string
- RBDCephMonitors []string
- RBDImage string
- RBDPool string
- RBDRadosUser string
- RBDKeyring string
- FlexVolumeDriver string
- FlexVolumeOptions map[string]string
- CinderVolumeID string
- CephFSMonitors []string
- CephFSPath string
- CephFSUser string
- CephFSSecretFile string
- FlockerDatasetName string
- FlockerDatasetUUID string
- FCTargetWWNs []string
- FCLun *int32
- FcWWIDs []string
- AzureFileShareName string
- VsphereVolumeVolumePath string
- VsphereVolumeStoragePolicyName string
- VsphereVolumeStoragePolicyID string
- QuobyteRegistry string
- QuobyteVolume string
- QuobyteUser string
- QuobyteGroup string
- QuobyteTenant string
- AzureDiskDiskName string
- AzureDiskDataDiskURI string
- AzureDiskCachingMode *v1.AzureDataDiskCachingMode
- AzureDiskKind *v1.AzureDataDiskKind
- PhotonPersistentDiskPdID string
- PortworxVolumeID string
- ScaleIOGateway string
- ScaleIOSystem string
- ScaleIOSSLEnabled bool
- ScaleIOProtectionDomain string
- ScaleIOStoragePool string
- ScaleIOStorageMode string
- ScaleIOVolumeName string
- StorageOSVolumeName string
- StorageOSVolumeNamespace string
- CSIDriver string
- CSIVolumeAttributes map[string]string
-}
-
-// PersistentVolumeColumns returns kubernetes persistent volume fields as Osquery table columns.
-func PersistentVolumeColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&persistentVolume{})
-}
-
-// PersistentVolumesGenerate generates the kubernetes persistent volumes as Osquery table data.
-func PersistentVolumesGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- pvs, err := k8s.GetClient().CoreV1().PersistentVolumes().List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, pv := range pvs.Items {
- item := &persistentVolume{
- CommonFields: k8s.GetCommonFields(pv.ObjectMeta),
- Capacity: pv.Spec.Capacity,
- AccessModes: pv.Spec.AccessModes,
- ClaimRef: pv.Spec.ClaimRef,
- PersistentVolumeReclaimPolicy: pv.Spec.PersistentVolumeReclaimPolicy,
- StorageClassName: pv.Spec.StorageClassName,
- MountOptions: pv.Spec.MountOptions,
- VolumeMode: pv.Spec.VolumeMode,
- NodeAffinity: pv.Spec.NodeAffinity,
- StatusPhase: pv.Status.Phase,
- StatusMessage: pv.Status.Message,
- StatusReason: pv.Status.Reason,
- }
- if pv.Spec.AWSElasticBlockStore != nil {
- item.VolumeType = "aws_elastic_block_store"
- item.AWSElasticBlockStoreVolumeID = pv.Spec.AWSElasticBlockStore.VolumeID
- item.AWSElasticBlockStorePartition = pv.Spec.AWSElasticBlockStore.Partition
- item.FSType = &pv.Spec.AWSElasticBlockStore.FSType
- item.ReadOnly = &pv.Spec.AWSElasticBlockStore.ReadOnly
- }
- if pv.Spec.AzureDisk != nil {
- item.VolumeType = "azure_disk"
- item.AzureDiskCachingMode = pv.Spec.AzureDisk.CachingMode
- item.AzureDiskDataDiskURI = pv.Spec.AzureDisk.DataDiskURI
- item.AzureDiskDiskName = pv.Spec.AzureDisk.DiskName
- item.AzureDiskKind = pv.Spec.AzureDisk.Kind
- item.FSType = pv.Spec.AzureDisk.FSType
- item.ReadOnly = pv.Spec.AzureDisk.ReadOnly
- }
- if pv.Spec.AzureFile != nil {
- item.VolumeType = "azure_file"
- item.AzureFileShareName = pv.Spec.AzureFile.ShareName
- item.SecretName = pv.Spec.AzureFile.SecretName
- item.ReadOnly = &pv.Spec.AzureFile.ReadOnly
- }
- if pv.Spec.CSI != nil {
- item.VolumeType = "csi"
- item.CSIDriver = pv.Spec.CSI.Driver
- item.CSIVolumeAttributes = pv.Spec.CSI.VolumeAttributes
- item.FSType = &pv.Spec.CSI.FSType
- item.ReadOnly = &pv.Spec.CSI.ReadOnly
- if pv.Spec.CSI.NodePublishSecretRef != nil {
- item.SecretName = pv.Spec.CSI.NodePublishSecretRef.Name
- }
- }
- if pv.Spec.CephFS != nil {
- item.VolumeType = "ceph_fs"
- item.CephFSMonitors = pv.Spec.CephFS.Monitors
- item.CephFSPath = pv.Spec.CephFS.Path
- item.CephFSSecretFile = pv.Spec.CephFS.SecretFile
- item.CephFSUser = pv.Spec.CephFS.User
- item.ReadOnly = &pv.Spec.CephFS.ReadOnly
- if pv.Spec.CephFS.SecretRef != nil {
- item.SecretName = pv.Spec.CephFS.SecretRef.Name
- }
- }
- if pv.Spec.Cinder != nil {
- item.VolumeType = "cinder"
- item.CinderVolumeID = pv.Spec.Cinder.VolumeID
- item.FSType = &pv.Spec.Cinder.FSType
- item.ReadOnly = &pv.Spec.Cinder.ReadOnly
- if pv.Spec.Cinder.SecretRef != nil {
- item.SecretName = pv.Spec.Cinder.SecretRef.Name
- }
- }
- if pv.Spec.FC != nil {
- item.VolumeType = "fc"
- item.FCLun = pv.Spec.FC.Lun
- item.FCTargetWWNs = pv.Spec.FC.TargetWWNs
- item.FcWWIDs = pv.Spec.FC.WWIDs
- item.FSType = &pv.Spec.FC.FSType
- item.ReadOnly = &pv.Spec.FC.ReadOnly
- }
- if pv.Spec.FlexVolume != nil {
- item.VolumeType = "flex_volume"
- item.FlexVolumeDriver = pv.Spec.FlexVolume.Driver
- item.FlexVolumeOptions = pv.Spec.FlexVolume.Options
- item.FSType = &pv.Spec.FlexVolume.FSType
- item.ReadOnly = &pv.Spec.FlexVolume.ReadOnly
- if pv.Spec.FlexVolume.SecretRef != nil {
- item.SecretName = pv.Spec.FlexVolume.SecretRef.Name
- }
- }
- if pv.Spec.Flocker != nil {
- item.VolumeType = "flocker"
- item.FlockerDatasetName = pv.Spec.Flocker.DatasetName
- item.FlockerDatasetUUID = pv.Spec.Flocker.DatasetUUID
- }
- if pv.Spec.GCEPersistentDisk != nil {
- item.VolumeType = "gce_persistent_disk"
- item.GCEPersistentDiskPDName = pv.Spec.GCEPersistentDisk.PDName
- item.GCEPersistentDiskPartition = pv.Spec.GCEPersistentDisk.Partition
- item.FSType = &pv.Spec.GCEPersistentDisk.FSType
- item.ReadOnly = &pv.Spec.GCEPersistentDisk.ReadOnly
- }
- if pv.Spec.Glusterfs != nil {
- item.VolumeType = "gluster_fs"
- item.GlusterfsPath = pv.Spec.Glusterfs.Path
- item.GlusterfsEndpointsName = pv.Spec.Glusterfs.EndpointsName
- item.ReadOnly = &pv.Spec.Glusterfs.ReadOnly
- }
- if pv.Spec.HostPath != nil {
- item.VolumeType = "host_path"
- item.HostPathPath = pv.Spec.HostPath.Path
- item.HostPathType = pv.Spec.HostPath.Type
- }
- if pv.Spec.ISCSI != nil {
- item.VolumeType = "iscsci"
- item.ISCSITargetPortal = pv.Spec.ISCSI.TargetPortal
- item.ISCSIIqn = pv.Spec.ISCSI.IQN
- item.ISCSILun = pv.Spec.ISCSI.Lun
- item.ISCSIInterface = pv.Spec.ISCSI.ISCSIInterface
- item.ISCSIPortals = pv.Spec.ISCSI.Portals
- item.ISCSIDiscoveryCHAPAuth = pv.Spec.ISCSI.DiscoveryCHAPAuth
- item.ISCSISessionCHAPAuth = pv.Spec.ISCSI.SessionCHAPAuth
- item.ISCSIInitiatorName = pv.Spec.ISCSI.InitiatorName
- item.FSType = &pv.Spec.ISCSI.FSType
- item.ReadOnly = &pv.Spec.ISCSI.ReadOnly
- if pv.Spec.ISCSI.SecretRef != nil {
- item.SecretName = pv.Spec.ISCSI.SecretRef.Name
- }
- }
- if pv.Spec.Local != nil {
- item.LocalPath = pv.Spec.Local.Path
- item.FSType = pv.Spec.Local.FSType
- }
- if pv.Spec.NFS != nil {
- item.VolumeType = "nfs"
- item.NFSPath = pv.Spec.NFS.Path
- item.NFSServer = pv.Spec.NFS.Server
- item.ReadOnly = &pv.Spec.NFS.ReadOnly
- }
- if pv.Spec.PhotonPersistentDisk != nil {
- item.VolumeType = "photon_persistent_disk"
- item.PhotonPersistentDiskPdID = pv.Spec.PhotonPersistentDisk.PdID
- item.FSType = &pv.Spec.PhotonPersistentDisk.FSType
- }
- if pv.Spec.PortworxVolume != nil {
- item.VolumeType = "portworx_volume"
- item.PortworxVolumeID = pv.Spec.PortworxVolume.VolumeID
- item.FSType = &pv.Spec.PortworxVolume.FSType
- item.ReadOnly = &pv.Spec.PortworxVolume.ReadOnly
- }
- if pv.Spec.Quobyte != nil {
- item.VolumeType = "quobyte"
- item.QuobyteGroup = pv.Spec.Quobyte.Group
- item.QuobyteRegistry = pv.Spec.Quobyte.Registry
- item.QuobyteTenant = pv.Spec.Quobyte.Tenant
- item.QuobyteUser = pv.Spec.Quobyte.User
- item.QuobyteVolume = pv.Spec.Quobyte.Volume
- item.ReadOnly = &pv.Spec.Quobyte.ReadOnly
- }
- if pv.Spec.RBD != nil {
- item.VolumeType = "rbd"
- item.RBDCephMonitors = pv.Spec.RBD.CephMonitors
- item.RBDImage = pv.Spec.RBD.RBDImage
- item.RBDPool = pv.Spec.RBD.RBDPool
- item.RBDRadosUser = pv.Spec.RBD.RadosUser
- item.RBDKeyring = pv.Spec.RBD.Keyring
- item.FSType = &pv.Spec.RBD.FSType
- item.ReadOnly = &pv.Spec.RBD.ReadOnly
- if pv.Spec.RBD.SecretRef != nil {
- item.SecretName = pv.Spec.RBD.SecretRef.Name
- }
- }
- if pv.Spec.ScaleIO != nil {
- item.VolumeType = "scaleio"
- item.ScaleIOGateway = pv.Spec.ScaleIO.Gateway
- item.ScaleIOSystem = pv.Spec.ScaleIO.System
- item.ScaleIOSSLEnabled = pv.Spec.ScaleIO.SSLEnabled
- item.ScaleIOProtectionDomain = pv.Spec.ScaleIO.ProtectionDomain
- item.ScaleIOStoragePool = pv.Spec.ScaleIO.StoragePool
- item.ScaleIOStorageMode = pv.Spec.ScaleIO.StorageMode
- item.ScaleIOVolumeName = pv.Spec.ScaleIO.VolumeName
- item.FSType = &pv.Spec.ScaleIO.FSType
- item.ReadOnly = &pv.Spec.ScaleIO.ReadOnly
- if pv.Spec.ScaleIO.SecretRef != nil {
- item.SecretName = pv.Spec.ScaleIO.SecretRef.Name
- }
- }
- if pv.Spec.StorageOS != nil {
- item.VolumeType = "storage_os"
- item.StorageOSVolumeName = pv.Spec.StorageOS.VolumeName
- item.StorageOSVolumeNamespace = pv.Spec.StorageOS.VolumeNamespace
- item.FSType = &pv.Spec.StorageOS.FSType
- item.ReadOnly = &pv.Spec.StorageOS.ReadOnly
- if pv.Spec.StorageOS.SecretRef != nil {
- item.SecretName = pv.Spec.StorageOS.SecretRef.Name
- }
- }
- if pv.Spec.VsphereVolume != nil {
- item.VolumeType = "vsphere_volume"
- item.VsphereVolumeStoragePolicyID = pv.Spec.VsphereVolume.StoragePolicyID
- item.VsphereVolumeStoragePolicyName = pv.Spec.VsphereVolume.StoragePolicyName
- item.VsphereVolumeVolumePath = pv.Spec.VsphereVolume.VolumePath
- item.FSType = &pv.Spec.VsphereVolume.FSType
- }
- results = append(results, k8s.ToMap(item))
- }
-
- if pvs.Continue == "" {
- break
- }
- options.Continue = pvs.Continue
- }
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/core/persistent_volume_claim.go b/infrastructure/kubequery/internal/k8s/core/persistent_volume_claim.go
deleted file mode 100644
index 621b6e2dc8..0000000000
--- a/infrastructure/kubequery/internal/k8s/core/persistent_volume_claim.go
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package core
-
-import (
- "context"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-type persistentVolumeClaim struct {
- k8s.CommonFields
- v1.PersistentVolumeClaimSpec
- Phase v1.PersistentVolumeClaimPhase
- Capacity v1.ResourceList
- Conditions []v1.PersistentVolumeClaimCondition
-}
-
-// PersistentVolumeClaimColumns returns kubernetes persistent volume claim fields as Osquery table columns.
-func PersistentVolumeClaimColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&persistentVolumeClaim{})
-}
-
-// PersistentVolumeClaimsGenerate generates the kubernetes persistent volume claims as Osquery table data.
-func PersistentVolumeClaimsGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- pvcs, err := k8s.GetClient().CoreV1().PersistentVolumeClaims(metav1.NamespaceAll).List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, pvc := range pvcs.Items {
- item := &persistentVolumeClaim{
- CommonFields: k8s.GetCommonFields(pvc.ObjectMeta),
- PersistentVolumeClaimSpec: pvc.Spec,
- Phase: pvc.Status.Phase,
- Capacity: pvc.Status.Capacity,
- Conditions: pvc.Status.Conditions,
- }
- results = append(results, k8s.ToMap(item))
- }
-
- if pvcs.Continue == "" {
- break
- }
- options.Continue = pvcs.Continue
- }
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/core/pod.go b/infrastructure/kubequery/internal/k8s/core/pod.go
deleted file mode 100644
index d4c70f2ab9..0000000000
--- a/infrastructure/kubequery/internal/k8s/core/pod.go
+++ /dev/null
@@ -1,233 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package core
-
-import (
- "context"
- "strings"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-type pod struct {
- k8s.CommonNamespacedFields
- k8s.CommonPodFields
- v1.PodStatus
-}
-
-// PodColumns returns kubernetes pod fields as Osquery table columns.
-func PodColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&pod{})
-}
-
-// PodsGenerate generates the kubernetes pods as Osquery table data.
-func PodsGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- pods, err := k8s.GetClient().CoreV1().Pods(metav1.NamespaceAll).List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, p := range pods.Items {
- item := &pod{
- CommonNamespacedFields: k8s.GetCommonNamespacedFields(p.ObjectMeta),
- CommonPodFields: k8s.GetCommonPodFields(p.Spec),
- PodStatus: p.Status,
- }
- results = append(results, k8s.ToMap(item))
- }
-
- if pods.Continue == "" {
- break
- }
- options.Continue = pods.Continue
- }
-
- return results, nil
-}
-
-type podContainer struct {
- k8s.CommonNamespacedFields
- k8s.CommonContainerFields
- PodName string
- ContainerType string
- State v1.ContainerState
- LastTerminationState v1.ContainerState
- Ready bool
- RestartCount int32
- ImageRepo string
- ImageID string
- ContainerID string
- Started *bool
-}
-
-// PodContainerColumns returns kubernetes pod container fields as Osquery table columns.
-func PodContainerColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&podContainer{})
-}
-
-func getImageRepo(id string) string {
- // docker.io/jaegertracing/jaeger-operator@sha256:5a3198179f7972028a29dd7fbf71ac7a21e0dbf46c85e8cc2c37e3b6a5ee26a4
- index := strings.LastIndex(id, "@")
- if index < 0 || index == len(id)-1 {
- return ""
- }
- return id[0:index]
-}
-
-func cleanID(id string) string {
- // containerd://4a8e3f149f24fb5d4429f4a38e86097e1aec3b6b174bb382a44c6706ad4406e1
- // docker.io/jaegertracing/jaeger-operator@sha256:5a3198179f7972028a29dd7fbf71ac7a21e0dbf46c85e8cc2c37e3b6a5ee26a4
- index := -1
- for _, s := range []string{"/", ":", "@"} {
- i := strings.LastIndex(id, s)
- if i > -1 && i > index {
- index = i
- }
- }
-
- if index < 0 || index == len(id)-1 {
- return id
- }
- return id[index+1:]
-}
-
-func updatePodContainerStatus(pc *podContainer, cs *v1.ContainerStatus) {
- if cs != nil {
- pc.State = cs.State
- pc.LastTerminationState = cs.LastTerminationState
- pc.Ready = cs.Ready
- pc.RestartCount = cs.RestartCount
- pc.ImageRepo = getImageRepo(cs.ImageID)
- pc.ImageID = cleanID(cs.ImageID)
- pc.ContainerID = cleanID(cs.ContainerID)
- pc.Started = cs.Started
- }
-}
-
-func createPodContainer(p v1.Pod, c v1.Container, cs *v1.ContainerStatus, containerType string) *podContainer {
- item := &podContainer{
- CommonNamespacedFields: k8s.GetParentCommonNamespacedFields(p.ObjectMeta, c.Name),
- CommonContainerFields: k8s.GetCommonContainerFields(c),
- PodName: p.Name,
- ContainerType: containerType,
- }
- item.Name = c.Name
- updatePodContainerStatus(item, cs)
- return item
-}
-
-func createPodEphemeralContainer(p v1.Pod, c v1.EphemeralContainer, cs *v1.ContainerStatus) *podContainer {
- item := &podContainer{
- CommonNamespacedFields: k8s.GetParentCommonNamespacedFields(p.ObjectMeta, c.Name),
- CommonContainerFields: k8s.GetCommonEphemeralContainerFields(c),
- PodName: p.Name,
- ContainerType: "ephemeral",
- }
- item.Name = c.Name
- updatePodContainerStatus(item, cs)
- return item
-}
-
-// PodContainersGenerate generates the kubernetes pod containers as Osquery table data.
-func PodContainersGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- pods, err := k8s.GetClient().CoreV1().Pods(metav1.NamespaceAll).List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, p := range pods.Items {
- for i, c := range p.Spec.InitContainers {
- var cs *v1.ContainerStatus = nil
- if len(p.Status.InitContainerStatuses) > i {
- cs = &p.Status.InitContainerStatuses[i]
- }
- item := createPodContainer(p, c, cs, "init")
- results = append(results, k8s.ToMap(item))
- }
- for i, c := range p.Spec.Containers {
- var cs *v1.ContainerStatus = nil
- if len(p.Status.ContainerStatuses) > i {
- cs = &p.Status.ContainerStatuses[i]
- }
- item := createPodContainer(p, c, cs, "container")
- results = append(results, k8s.ToMap(item))
- }
- for i, c := range p.Spec.EphemeralContainers {
- var cs *v1.ContainerStatus = nil
- if len(p.Status.EphemeralContainerStatuses) > i {
- cs = &p.Status.EphemeralContainerStatuses[i]
- }
- item := createPodEphemeralContainer(p, c, cs)
- results = append(results, k8s.ToMap(item))
- }
- }
-
- if pods.Continue == "" {
- break
- }
- options.Continue = pods.Continue
- }
-
- return results, nil
-}
-
-type podVolume struct {
- k8s.CommonNamespacedFields
- k8s.CommonVolumeFields
- PodName string
-}
-
-// PodVolumeColumns returns kubernetes pod volume fields as Osquery table columns.
-func PodVolumeColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&podVolume{})
-}
-
-// PodVolumesGenerate generates the kubernetes pod volumes as Osquery table data.
-func PodVolumesGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- pods, err := k8s.GetClient().CoreV1().Pods(metav1.NamespaceAll).List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, p := range pods.Items {
- for _, v := range p.Spec.Volumes {
- item := &podVolume{
- CommonNamespacedFields: k8s.GetCommonNamespacedFields(p.ObjectMeta),
- CommonVolumeFields: k8s.GetCommonVolumeFields(v),
- PodName: p.Name,
- }
- item.Name = v.Name
- results = append(results, k8s.ToMap(item))
- }
- }
-
- if pods.Continue == "" {
- break
- }
- options.Continue = pods.Continue
- }
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/core/pod_template.go b/infrastructure/kubequery/internal/k8s/core/pod_template.go
deleted file mode 100644
index 960b2d0f62..0000000000
--- a/infrastructure/kubequery/internal/k8s/core/pod_template.go
+++ /dev/null
@@ -1,169 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package core
-
-import (
- "context"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-type podTemplate struct {
- k8s.CommonNamespacedFields
- k8s.CommonPodFields
-}
-
-// PodTemplateColumns returns kubernetes pod template fields as Osquery table columns.
-func PodTemplateColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&podTemplate{})
-}
-
-// PodTemplatesGenerate generates the kubernetes pod templates as Osquery table data.
-func PodTemplatesGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- pts, err := k8s.GetClient().CoreV1().PodTemplates(metav1.NamespaceAll).List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, pt := range pts.Items {
- item := &podTemplate{
- CommonNamespacedFields: k8s.GetCommonNamespacedFields(pt.ObjectMeta),
- CommonPodFields: k8s.GetCommonPodFields(pt.Template.Spec),
- }
- results = append(results, k8s.ToMap(item))
- }
-
- if pts.Continue == "" {
- break
- }
- options.Continue = pts.Continue
- }
-
- return results, nil
-}
-
-type podTemplateContainer struct {
- k8s.CommonNamespacedFields
- k8s.CommonContainerFields
- PodTemplateName string
- ContainerType string
-}
-
-// PodTemplateContainerColumns returns kubernetes pod template container fields as Osquery table columns.
-func PodTemplateContainerColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&podTemplateContainer{})
-}
-
-func createPodTemplateContainer(pt v1.PodTemplate, c v1.Container, containerType string) *podTemplateContainer {
- item := &podTemplateContainer{
- CommonNamespacedFields: k8s.GetParentCommonNamespacedFields(pt.ObjectMeta, c.Name),
- CommonContainerFields: k8s.GetCommonContainerFields(c),
- PodTemplateName: pt.Name,
- ContainerType: containerType,
- }
- item.Name = c.Name
- return item
-}
-
-func createPodTemplateEphemeralContainer(pt v1.PodTemplate, c v1.EphemeralContainer) *podTemplateContainer {
- item := &podTemplateContainer{
- CommonNamespacedFields: k8s.GetParentCommonNamespacedFields(pt.ObjectMeta, c.Name),
- CommonContainerFields: k8s.GetCommonEphemeralContainerFields(c),
- PodTemplateName: pt.Name,
- ContainerType: "ephemeral",
- }
- item.Name = c.Name
- return item
-}
-
-// PodTemplateContainersGenerate generates the kubernetes pod template containers as Osquery table data.
-func PodTemplateContainersGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- pts, err := k8s.GetClient().CoreV1().PodTemplates(metav1.NamespaceAll).List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, pt := range pts.Items {
- for _, c := range pt.Template.Spec.InitContainers {
- item := createPodTemplateContainer(pt, c, "init")
- results = append(results, k8s.ToMap(item))
- }
- for _, c := range pt.Template.Spec.Containers {
- item := createPodTemplateContainer(pt, c, "container")
- results = append(results, k8s.ToMap(item))
- }
- for _, c := range pt.Template.Spec.EphemeralContainers {
- item := createPodTemplateEphemeralContainer(pt, c)
- results = append(results, k8s.ToMap(item))
- }
- }
-
- if pts.Continue == "" {
- break
- }
- options.Continue = pts.Continue
- }
-
- return results, nil
-}
-
-type podTemplateVolume struct {
- k8s.CommonNamespacedFields
- k8s.CommonVolumeFields
- PodTemplateName string
-}
-
-// PodTemplateVolumeColumns returns kubernetes pod template volume fields as Osquery table columns.
-func PodTemplateVolumeColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&podTemplateVolume{})
-}
-
-// PodTemplateVolumesGenerate generates the kubernetes pod template volumes as Osquery table data.
-func PodTemplateVolumesGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- pts, err := k8s.GetClient().CoreV1().PodTemplates(metav1.NamespaceAll).List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, pt := range pts.Items {
- for _, v := range pt.Template.Spec.Volumes {
- item := &podTemplateVolume{
- CommonNamespacedFields: k8s.GetCommonNamespacedFields(pt.ObjectMeta),
- CommonVolumeFields: k8s.GetCommonVolumeFields(v),
- PodTemplateName: pt.Name,
- }
- item.Name = v.Name
- results = append(results, k8s.ToMap(item))
- }
- }
-
- if pts.Continue == "" {
- break
- }
- options.Continue = pts.Continue
- }
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/core/pod_test.go b/infrastructure/kubequery/internal/k8s/core/pod_test.go
deleted file mode 100644
index 75580e7e7f..0000000000
--- a/infrastructure/kubequery/internal/k8s/core/pod_test.go
+++ /dev/null
@@ -1,118 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package core
-
-import (
- "context"
- "testing"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/stretchr/testify/assert"
-)
-
-func TestPodsGenerate(t *testing.T) {
- ps, err := PodsGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{
- {
- "annotations": "{\"cni.projectcalico.org/podIP\":\"10.1.26.50/32\",\"cni.projectcalico.org/podIPs\":\"10.1.26.50/32\"}",
- "cluster_uid": "d7fd8e77-93de-4742-9037-5db9a01e966a",
- "conditions": "[{\"type\":\"Initialized\",\"status\":\"True\",\"lastProbeTime\":null,\"lastTransitionTime\":\"2021-01-21T01:08:25Z\"},{\"type\":\"Ready\",\"status\":\"True\",\"lastProbeTime\":null,\"lastTransitionTime\":\"2021-01-21T01:08:52Z\"},{\"type\":\"ContainersReady\",\"status\":\"True\",\"lastProbeTime\":null,\"lastTransitionTime\":\"2021-01-21T01:08:52Z\"},{\"type\":\"PodScheduled\",\"status\":\"True\",\"lastProbeTime\":null,\"lastTransitionTime\":\"2021-01-21T01:08:25Z\"}]",
- "container_statuses": "[{\"name\":\"jaeger-operator\",\"state\":{\"running\":{\"startedAt\":\"2021-01-21T01:08:51Z\"}},\"lastState\":{\"terminated\":{\"exitCode\":1,\"reason\":\"Error\",\"startedAt\":\"2021-01-21T01:08:36Z\",\"finishedAt\":\"2021-01-21T01:08:36Z\",\"containerID\":\"containerd://d4c9607e13f2bd2eec99f5261693557963a1380cfe6aceda23b9e3d3d195962f\"}},\"ready\":true,\"restartCount\":2,\"image\":\"docker.io/jaegertracing/jaeger-operator:1.14.0\",\"imageID\":\"docker.io/jaegertracing/jaeger-operator@sha256:5a3198179f7972028a29dd7fbf71ac7a21e0dbf46c85e8cc2c37e3b6a5ee26a4\",\"containerID\":\"containerd://4a8e3f149f24fb5d4429f4a38e86097e1aec3b6b174bb382a44c6706ad4406e1\",\"started\":true}]",
- "creation_timestamp": "1611191305",
- "dns_policy": "ClusterFirst",
- "enable_service_links": "1",
- "host_ip": "192.168.0.28",
- "host_ipc": "0",
- "host_network": "0",
- "host_pid": "0",
- "labels": "{\"name\":\"jaeger-operator\",\"pod-template-hash\":\"5db4f9d996\"}",
- "name": "jaeger-operator-5db4f9d996-pm7ld",
- "namespace": "default",
- "node_name": "seshu",
- "phase": "Running",
- "pod_ip": "10.1.26.50",
- "pod_ips": "[{\"ip\":\"10.1.26.50\"}]",
- "preemption_policy": "PreemptLowerPriority",
- "priority": "0",
- "qos_class": "BestEffort",
- "restart_policy": "Always",
- "scheduler_name": "default-scheduler",
- "service_account_name": "jaeger-operator",
- "start_time": "1611191305",
- "termination_grace_period_seconds": "30",
- "tolerations": "[{\"key\":\"node.kubernetes.io/not-ready\",\"operator\":\"Exists\",\"effect\":\"NoExecute\",\"tolerationSeconds\":300},{\"key\":\"node.kubernetes.io/unreachable\",\"operator\":\"Exists\",\"effect\":\"NoExecute\",\"tolerationSeconds\":300}]",
- "uid": "2271363b-ffc9-4f00-984c-e0a125ee2d7a",
- },
- }, ps)
-}
-
-func TestPodContainersGenerate(t *testing.T) {
- pcs, err := PodContainersGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{
- {
- "annotations": "{\"cni.projectcalico.org/podIP\":\"10.1.26.50/32\",\"cni.projectcalico.org/podIPs\":\"10.1.26.50/32\"}",
- "args": "[\"start\"]",
- "cluster_uid": "d7fd8e77-93de-4742-9037-5db9a01e966a",
- "container_id": "4a8e3f149f24fb5d4429f4a38e86097e1aec3b6b174bb382a44c6706ad4406e1",
- "container_type": "container",
- "creation_timestamp": "1611191305",
- "env": "[{\"name\":\"WATCH_NAMESPACE\"},{\"name\":\"POD_NAME\",\"valueFrom\":{\"fieldRef\":{\"apiVersion\":\"v1\",\"fieldPath\":\"metadata.name\"}}},{\"name\":\"POD_NAMESPACE\",\"valueFrom\":{\"fieldRef\":{\"apiVersion\":\"v1\",\"fieldPath\":\"metadata.namespace\"}}},{\"name\":\"OPERATOR_NAME\",\"value\":\"jaeger-operator\"}]",
- "image": "jaegertracing/jaeger-operator:1.14.0",
- "image_repo": "docker.io/jaegertracing/jaeger-operator",
- "image_id": "5a3198179f7972028a29dd7fbf71ac7a21e0dbf46c85e8cc2c37e3b6a5ee26a4",
- "image_pull_policy": "Always",
- "labels": "{\"name\":\"jaeger-operator\",\"pod-template-hash\":\"5db4f9d996\"}",
- "last_termination_state": "{\"terminated\":{\"exitCode\":1,\"reason\":\"Error\",\"startedAt\":\"2021-01-21T01:08:36Z\",\"finishedAt\":\"2021-01-21T01:08:36Z\",\"containerID\":\"containerd://d4c9607e13f2bd2eec99f5261693557963a1380cfe6aceda23b9e3d3d195962f\"}}",
- "name": "jaeger-operator",
- "namespace": "default",
- "pod_name": "jaeger-operator-5db4f9d996-pm7ld",
- "ports": "[{\"name\":\"metrics\",\"containerPort\":8383,\"protocol\":\"TCP\"}]",
- "ready": "1",
- "restart_count": "2",
- "started": "1",
- "state": "{\"running\":{\"startedAt\":\"2021-01-21T01:08:51Z\"}}",
- "stdin": "0",
- "stdin_once": "0",
- "termination_message_path": "/dev/termination-log",
- "termination_message_policy": "File",
- "tty": "0",
- "uid": "2e7d1ce3-8546-5b73-beb8-46c109f37668",
- "volume_mounts": "[{\"name\":\"jaeger-operator-token-c94jx\",\"readOnly\":true,\"mountPath\":\"/var/run/secrets/kubernetes.io/serviceaccount\"}]",
- },
- }, pcs)
-}
-
-func TestPodVolumesGenerate(t *testing.T) {
- pcs, err := PodVolumesGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{
- {
- "annotations": "{\"cni.projectcalico.org/podIP\":\"10.1.26.50/32\",\"cni.projectcalico.org/podIPs\":\"10.1.26.50/32\"}",
- "aws_elastic_block_store_partition": "0",
- "cluster_uid": "d7fd8e77-93de-4742-9037-5db9a01e966a",
- "creation_timestamp": "1611191305",
- "gce_persistent_disk_partition": "0",
- "iscsi_discovery_chap_auth": "0",
- "iscsi_lun": "0",
- "iscsi_session_chap_auth": "0",
- "labels": "{\"name\":\"jaeger-operator\",\"pod-template-hash\":\"5db4f9d996\"}",
- "name": "jaeger-operator-token-c94jx",
- "namespace": "default",
- "pod_name": "jaeger-operator-5db4f9d996-pm7ld",
- "scale_iossl_enabled": "0",
- "secret_default_mode": "420",
- "secret_name": "jaeger-operator-token-c94jx",
- "uid": "2271363b-ffc9-4f00-984c-e0a125ee2d7a",
- "volume_type": "secret",
- },
- }, pcs)
-}
diff --git a/infrastructure/kubequery/internal/k8s/core/resource_quota.go b/infrastructure/kubequery/internal/k8s/core/resource_quota.go
deleted file mode 100644
index a3086f4594..0000000000
--- a/infrastructure/kubequery/internal/k8s/core/resource_quota.go
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package core
-
-import (
- "context"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-type resourceQuota struct {
- k8s.CommonNamespacedFields
- v1.ResourceQuotaSpec
- StatusHard v1.ResourceList
- StatusUsed v1.ResourceList
-}
-
-// ResourceQuotaColumns returns kubernetes resource quota fields as Osquery table columns.
-func ResourceQuotaColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&resourceQuota{})
-}
-
-// ResourceQuotasGenerate generates the kubernetes resource quotas as Osquery table data.
-func ResourceQuotasGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- quotas, err := k8s.GetClient().CoreV1().ResourceQuotas(metav1.NamespaceAll).List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, q := range quotas.Items {
- item := &resourceQuota{
- CommonNamespacedFields: k8s.GetCommonNamespacedFields(q.ObjectMeta),
- ResourceQuotaSpec: q.Spec,
- StatusHard: q.Status.Hard,
- StatusUsed: q.Status.Used,
- }
- results = append(results, k8s.ToMap(item))
- }
-
- if quotas.Continue == "" {
- break
- }
- options.Continue = quotas.Continue
- }
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/core/secret.go b/infrastructure/kubequery/internal/k8s/core/secret.go
deleted file mode 100644
index 0789ce75f3..0000000000
--- a/infrastructure/kubequery/internal/k8s/core/secret.go
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package core
-
-import (
- "context"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-type secret struct {
- k8s.CommonNamespacedFields
- Immutable *bool
- Type v1.SecretType
-}
-
-// SecretColumns returns kubernetes secret fields as Osquery table columns.
-func SecretColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&secret{})
-}
-
-// SecretsGenerate generates the kubernetes secrets as Osquery table data.
-func SecretsGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- secrets, err := k8s.GetClient().CoreV1().Secrets(metav1.NamespaceAll).List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, s := range secrets.Items {
- item := &secret{
- CommonNamespacedFields: k8s.GetCommonNamespacedFields(s.ObjectMeta),
- Immutable: s.Immutable,
- Type: s.Type,
- }
- results = append(results, k8s.ToMap(item))
- }
-
- if secrets.Continue == "" {
- break
- }
- options.Continue = secrets.Continue
- }
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/core/secret_test.go b/infrastructure/kubequery/internal/k8s/core/secret_test.go
deleted file mode 100644
index 5f187f6cde..0000000000
--- a/infrastructure/kubequery/internal/k8s/core/secret_test.go
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package core
-
-import (
- "context"
- "testing"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/stretchr/testify/assert"
-)
-
-func TestSecretsGenerate(t *testing.T) {
- ss, err := SecretsGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{
- {
- "annotations": "{\"istio.io/service-account.name\":\"jaeger-operator\"}",
- "cluster_uid": "d7fd8e77-93de-4742-9037-5db9a01e966a",
- "creation_timestamp": "1611191305",
- "name": "istio.jaeger-operator",
- "namespace": "default",
- "type": "istio.io/key-and-cert",
- "uid": "fb60f655-6b24-4f35-8e2d-17d7ca3ba7d4",
- },
- }, ss)
-}
diff --git a/infrastructure/kubequery/internal/k8s/core/service.go b/infrastructure/kubequery/internal/k8s/core/service.go
deleted file mode 100644
index 51ef6e6167..0000000000
--- a/infrastructure/kubequery/internal/k8s/core/service.go
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package core
-
-import (
- "context"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-type service struct {
- k8s.CommonNamespacedFields
- v1.ServiceSpec
- v1.ServiceStatus
-}
-
-// ServiceColumns returns kubernetes service fields as Osquery table columns.
-func ServiceColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&service{})
-}
-
-// ServicesGenerate generates the kubernetes services as Osquery table data.
-func ServicesGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- services, err := k8s.GetClient().CoreV1().Services(metav1.NamespaceAll).List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, s := range services.Items {
- item := &service{
- CommonNamespacedFields: k8s.GetCommonNamespacedFields(s.ObjectMeta),
- ServiceSpec: s.Spec,
- ServiceStatus: s.Status,
- }
- results = append(results, k8s.ToMap(item))
- }
-
- if services.Continue == "" {
- break
- }
- options.Continue = services.Continue
- }
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/core/service_account.go b/infrastructure/kubequery/internal/k8s/core/service_account.go
deleted file mode 100644
index 42ae336dfd..0000000000
--- a/infrastructure/kubequery/internal/k8s/core/service_account.go
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package core
-
-import (
- "context"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-type serviceAccount struct {
- k8s.CommonNamespacedFields
- Secrets []v1.ObjectReference
- ImagePullSecrets []v1.LocalObjectReference
- AutomountServiceAccountToken *bool
-}
-
-// ServiceAccountColumns returns kubernetes service account fields as Osquery table columns.
-func ServiceAccountColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&serviceAccount{})
-}
-
-// ServiceAccountsGenerate generates the kubernetes service accounts as Osquery table data.
-func ServiceAccountsGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- sas, err := k8s.GetClient().CoreV1().ServiceAccounts(metav1.NamespaceAll).List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, sa := range sas.Items {
- item := &serviceAccount{
- CommonNamespacedFields: k8s.GetCommonNamespacedFields(sa.ObjectMeta),
- Secrets: sa.Secrets,
- ImagePullSecrets: sa.ImagePullSecrets,
- AutomountServiceAccountToken: sa.AutomountServiceAccountToken,
- }
- results = append(results, k8s.ToMap(item))
- }
-
- if sas.Continue == "" {
- break
- }
- options.Continue = sas.Continue
- }
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/core/service_account_test.go b/infrastructure/kubequery/internal/k8s/core/service_account_test.go
deleted file mode 100644
index 3359476834..0000000000
--- a/infrastructure/kubequery/internal/k8s/core/service_account_test.go
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package core
-
-import (
- "context"
- "testing"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/stretchr/testify/assert"
-)
-
-func TestServiceAccountsGenerate(t *testing.T) {
- sas, err := ServiceAccountsGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{
- {
- "annotations": "{\"kubectl.kubernetes.io/last-applied-configuration\":\"{\\\"apiVersion\\\":\\\"v1\\\",\\\"kind\\\":\\\"ServiceAccount\\\",\\\"metadata\\\":{\\\"annotations\\\":{},\\\"labels\\\":{\\\"app\\\":\\\"istio-ingressgateway\\\",\\\"chart\\\":\\\"gateways\\\",\\\"heritage\\\":\\\"Tiller\\\",\\\"release\\\":\\\"istio\\\"},\\\"name\\\":\\\"istio-ingressgateway-service-account\\\",\\\"namespace\\\":\\\"istio-system\\\"}}\\n\"}",
- "cluster_uid": "d7fd8e77-93de-4742-9037-5db9a01e966a",
- "creation_timestamp": "1611191143",
- "labels": "{\"app\":\"istio-ingressgateway\",\"chart\":\"gateways\",\"heritage\":\"Tiller\",\"release\":\"istio\"}",
- "name": "istio-ingressgateway-service-account",
- "namespace": "istio-system",
- "secrets": "[{\"name\":\"istio-ingressgateway-service-account-token-zmk8b\"}]",
- "uid": "de09c78a-ea26-42ff-82d5-2f7d3f24a8d1",
- },
- }, sas)
-}
diff --git a/infrastructure/kubequery/internal/k8s/core/service_test.go b/infrastructure/kubequery/internal/k8s/core/service_test.go
deleted file mode 100644
index a5eaf06ce2..0000000000
--- a/infrastructure/kubequery/internal/k8s/core/service_test.go
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package core
-
-import (
- "context"
- "testing"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/stretchr/testify/assert"
-)
-
-func TestServicesGenerate(t *testing.T) {
- ss, err := ServicesGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{
- {
- "cluster_ip": "10.152.183.187",
- "cluster_ips": "[\"10.152.183.187\"]",
- "cluster_uid": "d7fd8e77-93de-4742-9037-5db9a01e966a",
- "creation_timestamp": "1611191332",
- "health_check_node_port": "0",
- "labels": "{\"name\":\"jaeger-operator\"}",
- "load_balancer": "{}",
- "name": "jaeger-operator",
- "namespace": "default",
- "ports": "[{\"name\":\"metrics\",\"protocol\":\"TCP\",\"port\":8383,\"targetPort\":8383}]",
- "publish_not_ready_addresses": "0",
- "selector": "{\"name\":\"jaeger-operator\"}",
- "session_affinity": "None",
- "type": "ClusterIP",
- "uid": "d8dfda88-e2c5-479e-bb2d-d0964805a925",
- },
- }, ss)
-}
diff --git a/infrastructure/kubequery/internal/k8s/core/testdata/component_status_test.json b/infrastructure/kubequery/internal/k8s/core/testdata/component_status_test.json
deleted file mode 100644
index a79df29c58..0000000000
--- a/infrastructure/kubequery/internal/k8s/core/testdata/component_status_test.json
+++ /dev/null
@@ -1,58 +0,0 @@
-{
- "apiVersion": "v1",
- "items": [
- {
- "apiVersion": "v1",
- "conditions": [
- {
- "message": "ok",
- "status": "True",
- "type": "Healthy"
- }
- ],
- "kind": "ComponentStatus",
- "metadata": {
- "creationTimestamp": null,
- "name": "scheduler",
- "selfLink": "/api/v1/componentstatuses/scheduler"
- }
- },
- {
- "apiVersion": "v1",
- "conditions": [
- {
- "message": "ok",
- "status": "True",
- "type": "Healthy"
- }
- ],
- "kind": "ComponentStatus",
- "metadata": {
- "creationTimestamp": null,
- "name": "controller-manager",
- "selfLink": "/api/v1/componentstatuses/controller-manager"
- }
- },
- {
- "apiVersion": "v1",
- "conditions": [
- {
- "message": "{\"health\":\"true\"}",
- "status": "True",
- "type": "Healthy"
- }
- ],
- "kind": "ComponentStatus",
- "metadata": {
- "creationTimestamp": null,
- "name": "etcd-0",
- "selfLink": "/api/v1/componentstatuses/etcd-0"
- }
- }
- ],
- "kind": "List",
- "metadata": {
- "resourceVersion": "",
- "selfLink": ""
- }
-}
\ No newline at end of file
diff --git a/infrastructure/kubequery/internal/k8s/core/testdata/config_map_test.json b/infrastructure/kubequery/internal/k8s/core/testdata/config_map_test.json
deleted file mode 100644
index ac3e301124..0000000000
--- a/infrastructure/kubequery/internal/k8s/core/testdata/config_map_test.json
+++ /dev/null
@@ -1,43 +0,0 @@
-{
- "apiVersion": "v1",
- "kind": "ConfigMap",
- "metadata": {
- "creationTimestamp": "2021-01-21T01:08:51Z",
- "managedFields": [
- {
- "apiVersion": "v1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:metadata": {
- "f:ownerReferences": {
- ".": {},
- "k:{\"uid\":\"2271363b-ffc9-4f00-984c-e0a125ee2d7a\"}": {
- ".": {},
- "f:apiVersion": {},
- "f:kind": {},
- "f:name": {},
- "f:uid": {}
- }
- }
- }
- },
- "manager": "jaeger-operator",
- "operation": "Update",
- "time": "2021-01-21T01:08:51Z"
- }
- ],
- "name": "jaeger-operator-lock",
- "namespace": "default",
- "ownerReferences": [
- {
- "apiVersion": "v1",
- "kind": "Pod",
- "name": "jaeger-operator-5db4f9d996-pm7ld",
- "uid": "2271363b-ffc9-4f00-984c-e0a125ee2d7a"
- }
- ],
- "resourceVersion": "451803",
- "selfLink": "/api/v1/namespaces/default/configmaps/jaeger-operator-lock",
- "uid": "eec6944c-5c13-4e30-8326-1a82e1962e4d"
- }
-}
diff --git a/infrastructure/kubequery/internal/k8s/core/testdata/endpoint_subset_test.json b/infrastructure/kubequery/internal/k8s/core/testdata/endpoint_subset_test.json
deleted file mode 100644
index ba32ca90c9..0000000000
--- a/infrastructure/kubequery/internal/k8s/core/testdata/endpoint_subset_test.json
+++ /dev/null
@@ -1,64 +0,0 @@
-{
- "apiVersion": "v1",
- "kind": "Endpoints",
- "metadata": {
- "annotations": {
- "endpoints.kubernetes.io/last-change-trigger-time": "2021-01-20T20:08:52-05:00"
- },
- "creationTimestamp": "2021-01-21T01:08:52Z",
- "labels": {
- "name": "jaeger-operator"
- },
- "managedFields": [
- {
- "apiVersion": "v1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:metadata": {
- "f:annotations": {
- ".": {},
- "f:endpoints.kubernetes.io/last-change-trigger-time": {}
- },
- "f:labels": {
- ".": {},
- "f:name": {}
- }
- },
- "f:subsets": {}
- },
- "manager": "kube-controller-manager",
- "operation": "Update",
- "time": "2021-01-21T01:08:52Z"
- }
- ],
- "name": "jaeger-operator",
- "namespace": "default",
- "resourceVersion": "451810",
- "selfLink": "/api/v1/namespaces/default/endpoints/jaeger-operator",
- "uid": "013741da-d7a5-4a2d-8f4b-792ac6a40dd3"
- },
- "subsets": [
- {
- "addresses": [
- {
- "ip": "10.1.26.50",
- "nodeName": "seshu",
- "targetRef": {
- "kind": "Pod",
- "name": "jaeger-operator-5db4f9d996-pm7ld",
- "namespace": "default",
- "resourceVersion": "451808",
- "uid": "2271363b-ffc9-4f00-984c-e0a125ee2d7a"
- }
- }
- ],
- "ports": [
- {
- "name": "metrics",
- "port": 8383,
- "protocol": "TCP"
- }
- ]
- }
- ]
-}
diff --git a/infrastructure/kubequery/internal/k8s/core/testdata/namespaces_test.json b/infrastructure/kubequery/internal/k8s/core/testdata/namespaces_test.json
deleted file mode 100644
index dc85639776..0000000000
--- a/infrastructure/kubequery/internal/k8s/core/testdata/namespaces_test.json
+++ /dev/null
@@ -1,275 +0,0 @@
-{
- "apiVersion": "v1",
- "items": [
- {
- "apiVersion": "v1",
- "kind": "Namespace",
- "metadata": {
- "creationTimestamp": "2021-01-12T18:30:15Z",
- "managedFields": [
- {
- "apiVersion": "v1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:status": {
- "f:phase": {}
- }
- },
- "manager": "kube-apiserver",
- "operation": "Update",
- "time": "2021-01-12T18:30:15Z"
- }
- ],
- "name": "kube-system",
- "resourceVersion": "11",
- "selfLink": "/api/v1/namespaces/kube-system",
- "uid": "ebca5546-b939-4765-bf3d-869ac644ea0f"
- },
- "spec": {
- "finalizers": [
- "kubernetes"
- ]
- },
- "status": {
- "phase": "Active"
- }
- },
- {
- "apiVersion": "v1",
- "kind": "Namespace",
- "metadata": {
- "creationTimestamp": "2021-01-12T18:30:15Z",
- "managedFields": [
- {
- "apiVersion": "v1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:status": {
- "f:phase": {}
- }
- },
- "manager": "kube-apiserver",
- "operation": "Update",
- "time": "2021-01-12T18:30:15Z"
- }
- ],
- "name": "kube-public",
- "resourceVersion": "32",
- "selfLink": "/api/v1/namespaces/kube-public",
- "uid": "6c719dfa-3de8-477b-a650-8bf9e2f12ee0"
- },
- "spec": {
- "finalizers": [
- "kubernetes"
- ]
- },
- "status": {
- "phase": "Active"
- }
- },
- {
- "apiVersion": "v1",
- "kind": "Namespace",
- "metadata": {
- "creationTimestamp": "2021-01-12T18:30:15Z",
- "managedFields": [
- {
- "apiVersion": "v1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:status": {
- "f:phase": {}
- }
- },
- "manager": "kube-apiserver",
- "operation": "Update",
- "time": "2021-01-12T18:30:15Z"
- }
- ],
- "name": "kube-node-lease",
- "resourceVersion": "44",
- "selfLink": "/api/v1/namespaces/kube-node-lease",
- "uid": "a8f303fd-0074-475f-935a-122cf8b6d1ad"
- },
- "spec": {
- "finalizers": [
- "kubernetes"
- ]
- },
- "status": {
- "phase": "Active"
- }
- },
- {
- "apiVersion": "v1",
- "kind": "Namespace",
- "metadata": {
- "creationTimestamp": "2021-01-12T18:30:16Z",
- "managedFields": [
- {
- "apiVersion": "v1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:status": {
- "f:phase": {}
- }
- },
- "manager": "kube-apiserver",
- "operation": "Update",
- "time": "2021-01-12T18:30:16Z"
- }
- ],
- "name": "default",
- "resourceVersion": "149",
- "selfLink": "/api/v1/namespaces/default",
- "uid": "7b50dc9c-6149-4cac-a0d0-52bf0fa5356d"
- },
- "spec": {
- "finalizers": [
- "kubernetes"
- ]
- },
- "status": {
- "phase": "Active"
- }
- },
- {
- "apiVersion": "v1",
- "kind": "Namespace",
- "metadata": {
- "annotations": {
- "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"v1\",\"kind\":\"Namespace\",\"metadata\":{\"annotations\":{},\"name\":\"ingress\"}}\n"
- },
- "creationTimestamp": "2021-01-21T01:04:07Z",
- "managedFields": [
- {
- "apiVersion": "v1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:metadata": {
- "f:annotations": {
- ".": {},
- "f:kubectl.kubernetes.io/last-applied-configuration": {}
- }
- },
- "f:status": {
- "f:phase": {}
- }
- },
- "manager": "kubectl-client-side-apply",
- "operation": "Update",
- "time": "2021-01-21T01:04:07Z"
- }
- ],
- "name": "ingress",
- "resourceVersion": "450124",
- "selfLink": "/api/v1/namespaces/ingress",
- "uid": "7653c4b9-3df2-493e-ae28-5e3a777f7e76"
- },
- "spec": {
- "finalizers": [
- "kubernetes"
- ]
- },
- "status": {
- "phase": "Active"
- }
- },
- {
- "apiVersion": "v1",
- "kind": "Namespace",
- "metadata": {
- "annotations": {
- "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"v1\",\"kind\":\"Namespace\",\"metadata\":{\"annotations\":{},\"labels\":{\"istio-injection\":\"disabled\"},\"name\":\"istio-system\"}}\n"
- },
- "creationTimestamp": "2021-01-21T01:05:43Z",
- "labels": {
- "istio-injection": "disabled"
- },
- "managedFields": [
- {
- "apiVersion": "v1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:metadata": {
- "f:annotations": {
- ".": {},
- "f:kubectl.kubernetes.io/last-applied-configuration": {}
- },
- "f:labels": {
- ".": {},
- "f:istio-injection": {}
- }
- },
- "f:status": {
- "f:phase": {}
- }
- },
- "manager": "kubectl-client-side-apply",
- "operation": "Update",
- "time": "2021-01-21T01:05:43Z"
- }
- ],
- "name": "istio-system",
- "resourceVersion": "450427",
- "selfLink": "/api/v1/namespaces/istio-system",
- "uid": "7f931f07-f8d0-4198-bf16-e459914e1866"
- },
- "spec": {
- "finalizers": [
- "kubernetes"
- ]
- },
- "status": {
- "phase": "Active"
- }
- },
- {
- "apiVersion": "v1",
- "kind": "Namespace",
- "metadata": {
- "annotations": {
- "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"v1\",\"kind\":\"Namespace\",\"metadata\":{\"annotations\":{},\"name\":\"monitoring\"}}\n"
- },
- "creationTimestamp": "2021-01-21T01:10:49Z",
- "managedFields": [
- {
- "apiVersion": "v1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:metadata": {
- "f:annotations": {
- ".": {},
- "f:kubectl.kubernetes.io/last-applied-configuration": {}
- }
- },
- "f:status": {
- "f:phase": {}
- }
- },
- "manager": "kubectl-client-side-apply",
- "operation": "Update",
- "time": "2021-01-21T01:10:49Z"
- }
- ],
- "name": "monitoring",
- "resourceVersion": "452095",
- "selfLink": "/api/v1/namespaces/monitoring",
- "uid": "afb98a87-39bb-4c8f-b0dd-8ea3683ba745"
- },
- "spec": {
- "finalizers": [
- "kubernetes"
- ]
- },
- "status": {
- "phase": "Active"
- }
- }
- ],
- "kind": "List",
- "metadata": {
- "resourceVersion": "",
- "selfLink": ""
- }
-}
diff --git a/infrastructure/kubequery/internal/k8s/core/testdata/node_test.json b/infrastructure/kubequery/internal/k8s/core/testdata/node_test.json
deleted file mode 100644
index 217d637e7b..0000000000
--- a/infrastructure/kubequery/internal/k8s/core/testdata/node_test.json
+++ /dev/null
@@ -1,527 +0,0 @@
-{
- "apiVersion": "v1",
- "kind": "Node",
- "metadata": {
- "annotations": {
- "node.alpha.kubernetes.io/ttl": "0",
- "projectcalico.org/IPv4Address": "192.168.192.1/20",
- "projectcalico.org/IPv4VXLANTunnelAddr": "10.1.26.0",
- "volumes.kubernetes.io/controller-managed-attach-detach": "true"
- },
- "creationTimestamp": "2021-01-12T18:30:24Z",
- "labels": {
- "beta.kubernetes.io/arch": "amd64",
- "beta.kubernetes.io/os": "linux",
- "kubernetes.io/arch": "amd64",
- "kubernetes.io/hostname": "seshu",
- "kubernetes.io/os": "linux",
- "microk8s.io/cluster": "true"
- },
- "managedFields": [
- {
- "apiVersion": "v1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:metadata": {
- "f:annotations": {
- "f:projectcalico.org/IPv4Address": {},
- "f:projectcalico.org/IPv4VXLANTunnelAddr": {}
- }
- },
- "f:status": {
- "f:conditions": {
- "k:{\"type\":\"NetworkUnavailable\"}": {
- ".": {},
- "f:lastHeartbeatTime": {},
- "f:lastTransitionTime": {},
- "f:message": {},
- "f:reason": {},
- "f:status": {},
- "f:type": {}
- }
- }
- }
- },
- "manager": "calico-node",
- "operation": "Update",
- "time": "2021-01-12T18:30:48Z"
- },
- {
- "apiVersion": "v1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:metadata": {
- "f:annotations": {
- ".": {},
- "f:volumes.kubernetes.io/controller-managed-attach-detach": {}
- },
- "f:labels": {
- ".": {},
- "f:beta.kubernetes.io/arch": {},
- "f:beta.kubernetes.io/os": {},
- "f:kubernetes.io/arch": {},
- "f:kubernetes.io/hostname": {},
- "f:kubernetes.io/os": {},
- "f:microk8s.io/cluster": {}
- }
- },
- "f:status": {
- "f:addresses": {
- ".": {},
- "k:{\"type\":\"Hostname\"}": {
- ".": {},
- "f:address": {},
- "f:type": {}
- },
- "k:{\"type\":\"InternalIP\"}": {
- ".": {},
- "f:address": {},
- "f:type": {}
- }
- },
- "f:allocatable": {
- ".": {},
- "f:cpu": {},
- "f:ephemeral-storage": {},
- "f:hugepages-1Gi": {},
- "f:hugepages-2Mi": {},
- "f:memory": {},
- "f:pods": {}
- },
- "f:capacity": {
- ".": {},
- "f:cpu": {},
- "f:ephemeral-storage": {},
- "f:hugepages-1Gi": {},
- "f:hugepages-2Mi": {},
- "f:memory": {},
- "f:pods": {}
- },
- "f:conditions": {
- ".": {},
- "k:{\"type\":\"DiskPressure\"}": {
- ".": {},
- "f:lastHeartbeatTime": {},
- "f:lastTransitionTime": {},
- "f:message": {},
- "f:reason": {},
- "f:status": {},
- "f:type": {}
- },
- "k:{\"type\":\"MemoryPressure\"}": {
- ".": {},
- "f:lastHeartbeatTime": {},
- "f:lastTransitionTime": {},
- "f:message": {},
- "f:reason": {},
- "f:status": {},
- "f:type": {}
- },
- "k:{\"type\":\"PIDPressure\"}": {
- ".": {},
- "f:lastHeartbeatTime": {},
- "f:lastTransitionTime": {},
- "f:message": {},
- "f:reason": {},
- "f:status": {},
- "f:type": {}
- },
- "k:{\"type\":\"Ready\"}": {
- ".": {},
- "f:lastHeartbeatTime": {},
- "f:lastTransitionTime": {},
- "f:message": {},
- "f:reason": {},
- "f:status": {},
- "f:type": {}
- }
- },
- "f:daemonEndpoints": {
- "f:kubeletEndpoint": {
- "f:Port": {}
- }
- },
- "f:images": {},
- "f:nodeInfo": {
- "f:architecture": {},
- "f:bootID": {},
- "f:containerRuntimeVersion": {},
- "f:kernelVersion": {},
- "f:kubeProxyVersion": {},
- "f:kubeletVersion": {},
- "f:machineID": {},
- "f:operatingSystem": {},
- "f:osImage": {},
- "f:systemUUID": {}
- }
- }
- },
- "manager": "kubelet",
- "operation": "Update",
- "time": "2021-01-12T18:31:34Z"
- },
- {
- "apiVersion": "v1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:metadata": {
- "f:annotations": {
- "f:node.alpha.kubernetes.io/ttl": {}
- }
- }
- },
- "manager": "kube-controller-manager",
- "operation": "Update",
- "time": "2021-01-21T01:10:50Z"
- }
- ],
- "name": "seshu",
- "resourceVersion": "499998",
- "selfLink": "/api/v1/nodes/seshu",
- "uid": "d0d45111-421d-4d4f-89c9-3e75ca2dc06c"
- },
- "spec": {},
- "status": {
- "addresses": [
- {
- "address": "192.168.0.28",
- "type": "InternalIP"
- },
- {
- "address": "seshu",
- "type": "Hostname"
- }
- ],
- "allocatable": {
- "cpu": "12",
- "ephemeral-storage": "958151776Ki",
- "hugepages-1Gi": "0",
- "hugepages-2Mi": "0",
- "memory": "32411744Ki",
- "pods": "110"
- },
- "capacity": {
- "cpu": "12",
- "ephemeral-storage": "959200352Ki",
- "hugepages-1Gi": "0",
- "hugepages-2Mi": "0",
- "memory": "32514144Ki",
- "pods": "110"
- },
- "conditions": [
- {
- "lastHeartbeatTime": "2021-01-20T16:31:53Z",
- "lastTransitionTime": "2021-01-20T16:31:53Z",
- "message": "Calico is running on this node",
- "reason": "CalicoIsUp",
- "status": "False",
- "type": "NetworkUnavailable"
- },
- {
- "lastHeartbeatTime": "2021-01-21T19:24:08Z",
- "lastTransitionTime": "2021-01-12T18:30:24Z",
- "message": "kubelet has sufficient memory available",
- "reason": "KubeletHasSufficientMemory",
- "status": "False",
- "type": "MemoryPressure"
- },
- {
- "lastHeartbeatTime": "2021-01-21T19:24:08Z",
- "lastTransitionTime": "2021-01-12T18:30:24Z",
- "message": "kubelet has no disk pressure",
- "reason": "KubeletHasNoDiskPressure",
- "status": "False",
- "type": "DiskPressure"
- },
- {
- "lastHeartbeatTime": "2021-01-21T19:24:08Z",
- "lastTransitionTime": "2021-01-12T18:30:24Z",
- "message": "kubelet has sufficient PID available",
- "reason": "KubeletHasSufficientPID",
- "status": "False",
- "type": "PIDPressure"
- },
- {
- "lastHeartbeatTime": "2021-01-21T19:24:08Z",
- "lastTransitionTime": "2021-01-21T01:12:31Z",
- "message": "kubelet is posting ready status. AppArmor enabled",
- "reason": "KubeletReady",
- "status": "True",
- "type": "Ready"
- }
- ],
- "daemonEndpoints": {
- "kubeletEndpoint": {
- "Port": 10250
- }
- },
- "images": [
- {
- "names": [
- "docker.io/library/kubequery:latest"
- ],
- "sizeBytes": 202523444
- },
- {
- "names": null,
- "sizeBytes": 174592418
- },
- {
- "names": [
- "k8s.gcr.io/ingress-nginx/controller@sha256:fc4979d8b8443a831c9789b5155cded454cb7de737a8b727bc2ba0106d2eae8b",
- "k8s.gcr.io/ingress-nginx/controller:v0.35.0"
- ],
- "sizeBytes": 111763794
- },
- {
- "names": [
- "docker.io/istio/proxyv2@sha256:3ad9ee2b43b299e5e6d97aaea5ed47dbf3da9293733607d9b52f358313e852ae",
- "docker.io/istio/proxyv2:1.5.1"
- ],
- "sizeBytes": 106728139
- },
- {
- "names": [
- "docker.io/jaegertracing/jaeger-operator@sha256:5a3198179f7972028a29dd7fbf71ac7a21e0dbf46c85e8cc2c37e3b6a5ee26a4",
- "docker.io/jaegertracing/jaeger-operator:1.14.0"
- ],
- "sizeBytes": 99946252
- },
- {
- "names": [
- "docker.io/calico/node@sha256:cb9dea7b86471c71925ae318f7c60af72d9ddf1dab0fe2029832a671b83bba6a",
- "docker.io/calico/node:v3.13.2"
- ],
- "sizeBytes": 88917441
- },
- {
- "names": [
- "docker.io/istio/mixer@sha256:92940f04e9aa20a41e330eb8a00a0b8ee7a3f4029dcdadfca4a5d009774474b2",
- "docker.io/istio/mixer:1.5.1"
- ],
- "sizeBytes": 86988340
- },
- {
- "names": [
- "docker.io/istio/pilot@sha256:818aecc1c73c53af9091ac1d4f500d9d7cec6d135d372d03cffab1addaff4ec0",
- "docker.io/istio/pilot:1.5.1"
- ],
- "sizeBytes": 85950908
- },
- {
- "names": [
- "docker.io/uptycs/kubequery@sha256:96b6c15753941f58e97fc6f80ee7ec06ce63d48a14b53ee0cc1dd10dc3585e7d",
- "docker.io/uptycs/kubequery:latest"
- ],
- "sizeBytes": 82661645
- },
- {
- "names": [
- "docker.io/istio/galley@sha256:d69acf890e5c82cb0c000fc15c540777ee566ae225762d85f157f69c9665338c",
- "docker.io/istio/galley:1.5.1"
- ],
- "sizeBytes": 82020368
- },
- {
- "names": [
- "docker.io/istio/sidecar_injector@sha256:cf334211f192378e7fcb66baeeb43412e483e34d739e93711d0a61568dd00462",
- "docker.io/istio/sidecar_injector:1.5.1"
- ],
- "sizeBytes": 77988679
- },
- {
- "names": [
- "docker.io/calico/cni@sha256:bbf7e3ac3f80d0a356a6c27b095bd313d1106f8ed84f85850816ed79295843c1",
- "docker.io/calico/cni:v3.13.2"
- ],
- "sizeBytes": 76710099
- },
- {
- "names": [
- "docker.io/istio/kubectl@sha256:83ea57063cf3344a2462c5bbaa5b125810f2e8ef7283d2ba3bfd9393e624b80f",
- "docker.io/istio/kubectl:1.5.1"
- ],
- "sizeBytes": 76608582
- },
- {
- "names": [
- "docker.io/grafana/grafana@sha256:bd55ea2bad17f5016431734b42fdfc202ebdc7d08b6c4ad35ebb03d06efdff69",
- "docker.io/grafana/grafana:6.4.3"
- ],
- "sizeBytes": 76169588
- },
- {
- "names": [
- "quay.io/kiali/kiali:v1.9"
- ],
- "sizeBytes": 75529164
- },
- {
- "names": [
- "docker.io/istio/citadel@sha256:92b985411af9844b75c5fc9c39c33fc27ef549c31b5221358f334062aadb86ec",
- "docker.io/istio/citadel:1.5.1"
- ],
- "sizeBytes": 72604439
- },
- {
- "names": [
- "docker.io/kubernetesui/dashboard@sha256:06868692fb9a7f2ede1a06de1b7b32afabc40ec739c1181d83b5ed3eb147ec6e",
- "docker.io/kubernetesui/dashboard:v2.0.0"
- ],
- "sizeBytes": 66209190
- },
- {
- "names": [
- "docker.io/grafana/grafana@sha256:89304bc2335f4976618548d7b93d165ed67369d3a051d2f627fc4e0aa3d0aff1",
- "docker.io/grafana/grafana:7.1.0"
- ],
- "sizeBytes": 59911815
- },
- {
- "names": [
- "quay.io/prometheus/prometheus@sha256:d4ba4dd1a9ebb90916d0bfed3c204adcb118ed24546bf8dd2e6b30fc0fd2009e",
- "quay.io/prometheus/prometheus:v2.20.0"
- ],
- "sizeBytes": 59435495
- },
- {
- "names": [
- "docker.io/prom/prometheus@sha256:cd93b8711bb92eb9c437d74217311519e0a93bc55779aa664325dc83cd13cb32",
- "docker.io/prom/prometheus:v2.12.0"
- ],
- "sizeBytes": 54819393
- },
- {
- "names": [
- "docker.io/calico/pod2daemon-flexvol@sha256:0022da5a9a89512f8a117f12d2088b3f1f8f22c094ee15aae24d58085f2c186a",
- "docker.io/calico/pod2daemon-flexvol:v3.13.2"
- ],
- "sizeBytes": 37530211
- },
- {
- "names": [
- "quay.io/prometheus/alertmanager@sha256:24a5204b418e8fa0214cfb628486749003b039c279c56b5bddb5b10cd100d926",
- "quay.io/prometheus/alertmanager:v0.21.0"
- ],
- "sizeBytes": 27097956
- },
- {
- "names": [
- "docker.io/jaegertracing/all-in-one@sha256:738442983b772a5d413c8a2c44a5563956adaff224e5b38f52a959124dafc119",
- "docker.io/jaegertracing/all-in-one:1.16"
- ],
- "sizeBytes": 23571671
- },
- {
- "names": [
- "docker.io/directxman12/k8s-prometheus-adapter@sha256:44558d3ae98467e44fee72ebc3948ce59630996013a51d49cf925682a7b87c18",
- "docker.io/directxman12/k8s-prometheus-adapter:v0.7.0"
- ],
- "sizeBytes": 23407634
- },
- {
- "names": [
- "docker.io/jaegertracing/all-in-one@sha256:021aefafecbb5559078206996f1f4e8fc5907debab047f4fcc5c837689a66cfa",
- "docker.io/jaegertracing/all-in-one:1.14.0"
- ],
- "sizeBytes": 23208939
- },
- {
- "names": [
- "docker.io/calico/kube-controllers@sha256:a635173cbe9deb33deba9baadffd933f61c63fbdadc0e3fa60ff1a14198c1da8",
- "docker.io/calico/kube-controllers:v3.13.2"
- ],
- "sizeBytes": 23132265
- },
- {
- "names": [
- "quay.io/brancz/kube-rbac-proxy@sha256:05e15e1164fd7ac85f5702b3f87ef548f4e00de3a79e6c4a6a34c92035497a9a",
- "quay.io/brancz/kube-rbac-proxy:v0.8.0"
- ],
- "sizeBytes": 19991394
- },
- {
- "names": [
- "docker.io/kubernetesui/metrics-scraper@sha256:555981a24f184420f3be0c79d4efb6c948a85cfce84034f85a563f4151a81cbf",
- "docker.io/kubernetesui/metrics-scraper:v1.0.4"
- ],
- "sizeBytes": 16020077
- },
- {
- "names": [
- "docker.io/coredns/coredns@sha256:41bee6992c2ed0f4628fcef75751048927bcd6b1cee89c79f6acb63ca5474d5a",
- "docker.io/coredns/coredns:1.6.6"
- ],
- "sizeBytes": 12932169
- },
- {
- "names": [
- "quay.io/coreos/prometheus-operator@sha256:a54e806fb27d2fb0251da4f3b2a3bb5320759af63a54a755788304775f2384a7",
- "quay.io/coreos/prometheus-operator:v0.40.0"
- ],
- "sizeBytes": 12496211
- },
- {
- "names": [
- "quay.io/prometheus/node-exporter@sha256:a2f29256e53cc3e0b64d7a472512600b2e9410347d53cdc85b49f659c17e02ee",
- "quay.io/prometheus/node-exporter:v0.18.1"
- ],
- "sizeBytes": 11122661
- },
- {
- "names": [
- "gcr.io/k8s-staging-kube-state-metrics/kube-state-metrics@sha256:9718f2e7999e75f4993e312fccada801c0eb98eaba73db072f0f806d67fcc238",
- "gcr.io/k8s-staging-kube-state-metrics/kube-state-metrics:v1.9.7"
- ],
- "sizeBytes": 10782953
- },
- {
- "names": [
- "k8s.gcr.io/metrics-server-amd64@sha256:c9c4e95068b51d6b33a9dccc61875df07dc650abbf4ac1a19d58b4628f89288b",
- "k8s.gcr.io/metrics-server-amd64:v0.3.6"
- ],
- "sizeBytes": 10542830
- },
- {
- "names": [
- "docker.io/cdkbot/hostpath-provisioner-amd64@sha256:339f78eabc68ffb1656d584e41f121cb4d2b667565428c8dde836caf5b8a0228",
- "docker.io/cdkbot/hostpath-provisioner-amd64:1.0.0"
- ],
- "sizeBytes": 9745308
- },
- {
- "names": [
- "quay.io/coreos/prometheus-config-reloader@sha256:c679a143b24b7731ad1577a9865aa3805426cbf1b25e30807b951dff68466ffd",
- "quay.io/coreos/prometheus-config-reloader:v0.40.0"
- ],
- "sizeBytes": 4254190
- },
- {
- "names": [
- "docker.io/jimmidyson/configmap-reload@sha256:d107c7a235c266273b1c3502a391fec374430e5625539403d0de797fa9c556a2",
- "docker.io/jimmidyson/configmap-reload:v0.3.0"
- ],
- "sizeBytes": 4063371
- },
- {
- "names": [
- "k8s.gcr.io/pause@sha256:f78411e19d84a252e53bff71a4407a5686c46983a2c2eeed83929b888179acea",
- "k8s.gcr.io/pause:3.1"
- ],
- "sizeBytes": 317164
- }
- ],
- "nodeInfo": {
- "architecture": "amd64",
- "bootID": "0b51cb6f-120b-4557-b74a-e53a5f4f00d5",
- "containerRuntimeVersion": "containerd://1.3.7",
- "kernelVersion": "5.4.0-60-generic",
- "kubeProxyVersion": "v1.20.1-34+e7db93d188d0d1",
- "kubeletVersion": "v1.20.1-34+e7db93d188d0d1",
- "machineID": "c73ef4a4ef2a4ec19a75719b63db3bb7",
- "operatingSystem": "linux",
- "osImage": "Ubuntu 20.04.1 LTS",
- "systemUUID": "4c4c4544-0044-3510-8058-c6c04f5a5932"
- }
- }
-}
diff --git a/infrastructure/kubequery/internal/k8s/core/testdata/pod_test.json b/infrastructure/kubequery/internal/k8s/core/testdata/pod_test.json
deleted file mode 100644
index 3053fb6a66..0000000000
--- a/infrastructure/kubequery/internal/k8s/core/testdata/pod_test.json
+++ /dev/null
@@ -1,344 +0,0 @@
-{
- "apiVersion": "v1",
- "kind": "Pod",
- "metadata": {
- "annotations": {
- "cni.projectcalico.org/podIP": "10.1.26.50/32",
- "cni.projectcalico.org/podIPs": "10.1.26.50/32"
- },
- "creationTimestamp": "2021-01-21T01:08:25Z",
- "generateName": "jaeger-operator-5db4f9d996-",
- "labels": {
- "name": "jaeger-operator",
- "pod-template-hash": "5db4f9d996"
- },
- "managedFields": [
- {
- "apiVersion": "v1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:metadata": {
- "f:generateName": {},
- "f:labels": {
- ".": {},
- "f:name": {},
- "f:pod-template-hash": {}
- },
- "f:ownerReferences": {
- ".": {},
- "k:{\"uid\":\"2efeb411-ff99-434b-a5a2-4e06c2b0afaa\"}": {
- ".": {},
- "f:apiVersion": {},
- "f:blockOwnerDeletion": {},
- "f:controller": {},
- "f:kind": {},
- "f:name": {},
- "f:uid": {}
- }
- }
- },
- "f:spec": {
- "f:containers": {
- "k:{\"name\":\"jaeger-operator\"}": {
- ".": {},
- "f:args": {},
- "f:env": {
- ".": {},
- "k:{\"name\":\"OPERATOR_NAME\"}": {
- ".": {},
- "f:name": {},
- "f:value": {}
- },
- "k:{\"name\":\"POD_NAME\"}": {
- ".": {},
- "f:name": {},
- "f:valueFrom": {
- ".": {},
- "f:fieldRef": {
- ".": {},
- "f:apiVersion": {},
- "f:fieldPath": {}
- }
- }
- },
- "k:{\"name\":\"POD_NAMESPACE\"}": {
- ".": {},
- "f:name": {},
- "f:valueFrom": {
- ".": {},
- "f:fieldRef": {
- ".": {},
- "f:apiVersion": {},
- "f:fieldPath": {}
- }
- }
- },
- "k:{\"name\":\"WATCH_NAMESPACE\"}": {
- ".": {},
- "f:name": {}
- }
- },
- "f:image": {},
- "f:imagePullPolicy": {},
- "f:name": {},
- "f:ports": {
- ".": {},
- "k:{\"containerPort\":8383,\"protocol\":\"TCP\"}": {
- ".": {},
- "f:containerPort": {},
- "f:name": {},
- "f:protocol": {}
- }
- },
- "f:resources": {},
- "f:terminationMessagePath": {},
- "f:terminationMessagePolicy": {}
- }
- },
- "f:dnsPolicy": {},
- "f:enableServiceLinks": {},
- "f:restartPolicy": {},
- "f:schedulerName": {},
- "f:securityContext": {},
- "f:serviceAccount": {},
- "f:serviceAccountName": {},
- "f:terminationGracePeriodSeconds": {}
- }
- },
- "manager": "kube-controller-manager",
- "operation": "Update",
- "time": "2021-01-21T01:08:25Z"
- },
- {
- "apiVersion": "v1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:metadata": {
- "f:annotations": {
- ".": {},
- "f:cni.projectcalico.org/podIP": {},
- "f:cni.projectcalico.org/podIPs": {}
- }
- }
- },
- "manager": "calico",
- "operation": "Update",
- "time": "2021-01-21T01:08:26Z"
- },
- {
- "apiVersion": "v1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:status": {
- "f:conditions": {
- "k:{\"type\":\"ContainersReady\"}": {
- ".": {},
- "f:lastProbeTime": {},
- "f:lastTransitionTime": {},
- "f:status": {},
- "f:type": {}
- },
- "k:{\"type\":\"Initialized\"}": {
- ".": {},
- "f:lastProbeTime": {},
- "f:lastTransitionTime": {},
- "f:status": {},
- "f:type": {}
- },
- "k:{\"type\":\"Ready\"}": {
- ".": {},
- "f:lastProbeTime": {},
- "f:lastTransitionTime": {},
- "f:status": {},
- "f:type": {}
- }
- },
- "f:containerStatuses": {},
- "f:hostIP": {},
- "f:phase": {},
- "f:podIP": {},
- "f:podIPs": {
- ".": {},
- "k:{\"ip\":\"10.1.26.50\"}": {
- ".": {},
- "f:ip": {}
- }
- },
- "f:startTime": {}
- }
- },
- "manager": "kubelet",
- "operation": "Update",
- "time": "2021-01-21T01:08:52Z"
- }
- ],
- "name": "jaeger-operator-5db4f9d996-pm7ld",
- "namespace": "default",
- "ownerReferences": [
- {
- "apiVersion": "apps/v1",
- "blockOwnerDeletion": true,
- "controller": true,
- "kind": "ReplicaSet",
- "name": "jaeger-operator-5db4f9d996",
- "uid": "2efeb411-ff99-434b-a5a2-4e06c2b0afaa"
- }
- ],
- "resourceVersion": "451808",
- "selfLink": "/api/v1/namespaces/default/pods/jaeger-operator-5db4f9d996-pm7ld",
- "uid": "2271363b-ffc9-4f00-984c-e0a125ee2d7a"
- },
- "spec": {
- "containers": [
- {
- "args": [
- "start"
- ],
- "env": [
- {
- "name": "WATCH_NAMESPACE"
- },
- {
- "name": "POD_NAME",
- "valueFrom": {
- "fieldRef": {
- "apiVersion": "v1",
- "fieldPath": "metadata.name"
- }
- }
- },
- {
- "name": "POD_NAMESPACE",
- "valueFrom": {
- "fieldRef": {
- "apiVersion": "v1",
- "fieldPath": "metadata.namespace"
- }
- }
- },
- {
- "name": "OPERATOR_NAME",
- "value": "jaeger-operator"
- }
- ],
- "image": "jaegertracing/jaeger-operator:1.14.0",
- "imagePullPolicy": "Always",
- "name": "jaeger-operator",
- "ports": [
- {
- "containerPort": 8383,
- "name": "metrics",
- "protocol": "TCP"
- }
- ],
- "resources": {},
- "terminationMessagePath": "/dev/termination-log",
- "terminationMessagePolicy": "File",
- "volumeMounts": [
- {
- "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount",
- "name": "jaeger-operator-token-c94jx",
- "readOnly": true
- }
- ]
- }
- ],
- "dnsPolicy": "ClusterFirst",
- "enableServiceLinks": true,
- "nodeName": "seshu",
- "preemptionPolicy": "PreemptLowerPriority",
- "priority": 0,
- "restartPolicy": "Always",
- "schedulerName": "default-scheduler",
- "securityContext": {},
- "serviceAccount": "jaeger-operator",
- "serviceAccountName": "jaeger-operator",
- "terminationGracePeriodSeconds": 30,
- "tolerations": [
- {
- "effect": "NoExecute",
- "key": "node.kubernetes.io/not-ready",
- "operator": "Exists",
- "tolerationSeconds": 300
- },
- {
- "effect": "NoExecute",
- "key": "node.kubernetes.io/unreachable",
- "operator": "Exists",
- "tolerationSeconds": 300
- }
- ],
- "volumes": [
- {
- "name": "jaeger-operator-token-c94jx",
- "secret": {
- "defaultMode": 420,
- "secretName": "jaeger-operator-token-c94jx"
- }
- }
- ]
- },
- "status": {
- "conditions": [
- {
- "lastProbeTime": null,
- "lastTransitionTime": "2021-01-21T01:08:25Z",
- "status": "True",
- "type": "Initialized"
- },
- {
- "lastProbeTime": null,
- "lastTransitionTime": "2021-01-21T01:08:52Z",
- "status": "True",
- "type": "Ready"
- },
- {
- "lastProbeTime": null,
- "lastTransitionTime": "2021-01-21T01:08:52Z",
- "status": "True",
- "type": "ContainersReady"
- },
- {
- "lastProbeTime": null,
- "lastTransitionTime": "2021-01-21T01:08:25Z",
- "status": "True",
- "type": "PodScheduled"
- }
- ],
- "containerStatuses": [
- {
- "containerID": "containerd://4a8e3f149f24fb5d4429f4a38e86097e1aec3b6b174bb382a44c6706ad4406e1",
- "image": "docker.io/jaegertracing/jaeger-operator:1.14.0",
- "imageID": "docker.io/jaegertracing/jaeger-operator@sha256:5a3198179f7972028a29dd7fbf71ac7a21e0dbf46c85e8cc2c37e3b6a5ee26a4",
- "lastState": {
- "terminated": {
- "containerID": "containerd://d4c9607e13f2bd2eec99f5261693557963a1380cfe6aceda23b9e3d3d195962f",
- "exitCode": 1,
- "finishedAt": "2021-01-21T01:08:36Z",
- "reason": "Error",
- "startedAt": "2021-01-21T01:08:36Z"
- }
- },
- "name": "jaeger-operator",
- "ready": true,
- "restartCount": 2,
- "started": true,
- "state": {
- "running": {
- "startedAt": "2021-01-21T01:08:51Z"
- }
- }
- }
- ],
- "hostIP": "192.168.0.28",
- "phase": "Running",
- "podIP": "10.1.26.50",
- "podIPs": [
- {
- "ip": "10.1.26.50"
- }
- ],
- "qosClass": "BestEffort",
- "startTime": "2021-01-21T01:08:25Z"
- }
-}
diff --git a/infrastructure/kubequery/internal/k8s/core/testdata/secret_test.json b/infrastructure/kubequery/internal/k8s/core/testdata/secret_test.json
deleted file mode 100644
index 98cd9c37f9..0000000000
--- a/infrastructure/kubequery/internal/k8s/core/testdata/secret_test.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
- "apiVersion": "v1",
- "data": {
- "cert-chain.pem": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURKekNDQWcrZ0F3SUJBZ0lRSzZFK3FQVGpGRjM5TVRaU2FYSU1HekFOQmdrcWhraUc5dzBCQVFzRkFEQVkKTVJZd0ZBWURWUVFLRXcxamJIVnpkR1Z5TG14dlkyRnNNQjRYRFRJeE1ERXlNVEF4TURneU5Wb1hEVEl4TURReQpNVEF4TURneU5Wb3dBRENDQVNJd0RRWUpLb1pJaHZjTkFRRUJCUUFEZ2dFUEFEQ0NBUW9DZ2dFQkFPWkZqazZWCkgxY1RoM1ZEdGowZy9rMWticnJadzQ3NHN1SkduSlJFVDArK1FBa1BDdE1sRzJOYVNENTByQWNFdTBBSlZzaXAKTmM0NTZkRlVzdk1IYVErQWhZYURQTDdHa3c2eDRyVVBRQkQwa3lYQUhjenUrY3FhZklXdGcrTGZibDhYYVZHTQpQMk5HVEJ1aEhtQVV0V0VORVB4NW1jaUlVOWpDZXQ0Szh0ZDFZQ2FtS1hSak1ldFBrR3ZrRDBGdGQ0WTVNSVNyCnNyNjdVdE9rWmgvTEpEWnFJVlBqa0JWdEJnQXdZNGdFRTV5SUdna3lNaVlreE9xL1JMOGxQejN2WVA5ci85aEMKQUtWVTJTSGxrNGFMa3VmVzJWaTdzSTJpRnZIYzgxeVJ6VE5UYkVFWkY2MUxFQm1MNzVIamdTbVN5R0poZTBQcwpzYWJQTzk2RDJOTkFNbjhDQXdFQUFhT0JoRENCZ1RBT0JnTlZIUThCQWY4RUJBTUNCYUF3SFFZRFZSMGxCQll3CkZBWUlLd1lCQlFVSEF3RUdDQ3NHQVFVRkJ3TUNNQXdHQTFVZEV3RUIvd1FDTUFBd1FnWURWUjBSQVFIL0JEZ3cKTm9ZMGMzQnBabVpsT2k4dlkyeDFjM1JsY2k1c2IyTmhiQzl1Y3k5a1pXWmhkV3gwTDNOaEwycGhaV2RsY2kxdgpjR1Z5WVhSdmNqQU5CZ2txaGtpRzl3MEJBUXNGQUFPQ0FRRUFDYXFzY09QNXJnMm96ZmlpckdEWmx2dUFWOFZJCmR6ZUxEaTlMMHpLVjBxLy9TQW5SUEl5bWk0ampDYkRkbmYvYnpWWEdnZVNUNTNTeUR4Z3ZXVkQ2akZzK0JwTlcKcXFFWWE0NWdLUEFreUVpaVJJbW0vRFBQSzk4T2FKbGROK2xpVDllU1o1SUFocCtvVml5WnVwZURTR3cvTXdIdwphQ3dPbjYwSDdrUEU3cTY3NlZLU2tXd1BtdWpQU0xqeE5UWXhQVklPblZsVmo4REZwNUM4LzZGM3VUb1J6Qm1aCmM2Znhvblo1UWdreDBWRHl4R3lMU0w2UXRudFBXdkpha0RsZFphek4zUlM2ZnFqZ0dFa01FUWQwdjhGcEh3RTQKZmRJbTNMYksvWWtWSXkwZ0l1TGYzVklKNkxBcjdCWW11ODE3dGxjRExud3FIZUVFL1Z3cGxvWHpWZz09Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K",
- "root-cert.pem": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUMzVENDQWNXZ0F3SUJBZ0lRUWlNTDcvcFoyV0hMWVZRMGFIelpMREFOQmdrcWhraUc5dzBCQVFzRkFEQVkKTVJZd0ZBWURWUVFLRXcxamJIVnpkR1Z5TG14dlkyRnNNQjRYRFRJeE1ERXlNVEF4TURZek1Gb1hEVE14TURFeApPVEF4TURZek1Gb3dHREVXTUJRR0ExVUVDaE1OWTJ4MWMzUmxjaTVzYjJOaGJEQ0NBU0l3RFFZSktvWklodmNOCkFRRUJCUUFEZ2dFUEFEQ0NBUW9DZ2dFQkFLZGJpM0JYZ0FkcElYcDVCaThYdWMxVWhZei91SmtXYkxBODRxRTAKdmtHQ3R6N3cycFltUEJ2dmdvUzZzdyt2MGlHcFdsZllGdDQ0U1p1V1M4Um5SR2QzeXhtK09oWmFab1c0eFI2bwpRdE9wRTFUMnc3QUVFeTVKY2MvUkdjTHBiWXpPUFdCamtXU01YSmZoeEJSeTZZL3J3dUJMVjBrRjNlZnF5cUVUCklUcUxaWVYxYS9BYzhGcGVkcnlieVFBSHRzcWdnTUNMN250VlgrMUZwdUg5QVhmRGxpV0tTNnJ1T2tPUEMrY1IKY3l2ZkUyRmlINmMyZkVqeU5WMTU3cEc1UHliQTFsaGdMUVVXSUsxZ1FBTGg1Um9IVE1BUDFYakt3S2FWeDBRVApSeDhpaWlhZnVvdHEyZ3Q2NDRtL2ZmRndRUmVKVTcwLytrV2h6NXBsNGQrVVQzOENBd0VBQWFNak1DRXdEZ1lEClZSMFBBUUgvQkFRREFnSUVNQThHQTFVZEV3RUIvd1FGTUFNQkFmOHdEUVlKS29aSWh2Y05BUUVMQlFBRGdnRUIKQUtCcDdxS1MrNENhb29naCtiVmVmOWoyaFRLOFVPRDNWSzFuQXFLRllZcCtvU3l4dzI2bGNmcWpBVXlBYmp2RQpUSEtQaHhaL3NtbVd1RGU0SWI0YTAvNi9RaWRqemJSMTVCOWlwWTFESExqUGU4anJMMm1uSjd0YzBSYnM0ZFVrCjVIV0VXbzRDZXM0SFUwajVFVGdycHdUY2J5VXYyVTRXNjA1WTRMRnJCNVJWOS9wSkRyKzhtb1FhdWhEZEpTTHIKaW1yZ0xyVmRxZHRTOTl6dDdVRTRsZ3ovckpKV1h6eSs4S1dZRjh5RXUxSjVnNUhMR25ubXJZbjRGUUFEZW1iSQp3bnBvc1FObm5XUnZqSXZlRDE3dDNnOHFSbFhDa1krZGM4VGJKT2lEZ1JUOC9yUlo3REpiMjlsQlp0NkpkOE10CjRCZzNSaDllTVBhWHFIZUdlckhHMzgwPQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg=="
- },
- "kind": "Secret",
- "metadata": {
- "annotations": {
- "istio.io/service-account.name": "jaeger-operator"
- },
- "creationTimestamp": "2021-01-21T01:08:25Z",
- "managedFields": [
- {
- "apiVersion": "v1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:data": {
- ".": {},
- "f:cert-chain.pem": {},
- "f:key.pem": {},
- "f:root-cert.pem": {}
- },
- "f:metadata": {
- "f:annotations": {
- ".": {},
- "f:istio.io/service-account.name": {}
- }
- },
- "f:type": {}
- },
- "manager": "istio_ca",
- "operation": "Update",
- "time": "2021-01-21T01:08:25Z"
- }
- ],
- "name": "istio.jaeger-operator",
- "namespace": "default",
- "resourceVersion": "451570",
- "selfLink": "/api/v1/namespaces/default/secrets/istio.jaeger-operator",
- "uid": "fb60f655-6b24-4f35-8e2d-17d7ca3ba7d4"
- },
- "type": "istio.io/key-and-cert"
-}
diff --git a/infrastructure/kubequery/internal/k8s/core/testdata/service_account_test.json b/infrastructure/kubequery/internal/k8s/core/testdata/service_account_test.json
deleted file mode 100644
index 274a092183..0000000000
--- a/infrastructure/kubequery/internal/k8s/core/testdata/service_account_test.json
+++ /dev/null
@@ -1,66 +0,0 @@
-{
- "apiVersion": "v1",
- "kind": "ServiceAccount",
- "metadata": {
- "annotations": {
- "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"v1\",\"kind\":\"ServiceAccount\",\"metadata\":{\"annotations\":{},\"labels\":{\"app\":\"istio-ingressgateway\",\"chart\":\"gateways\",\"heritage\":\"Tiller\",\"release\":\"istio\"},\"name\":\"istio-ingressgateway-service-account\",\"namespace\":\"istio-system\"}}\n"
- },
- "creationTimestamp": "2021-01-21T01:05:43Z",
- "labels": {
- "app": "istio-ingressgateway",
- "chart": "gateways",
- "heritage": "Tiller",
- "release": "istio"
- },
- "managedFields": [
- {
- "apiVersion": "v1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:secrets": {
- ".": {},
- "k:{\"name\":\"istio-ingressgateway-service-account-token-zmk8b\"}": {
- ".": {},
- "f:name": {}
- }
- }
- },
- "manager": "kube-controller-manager",
- "operation": "Update",
- "time": "2021-01-21T01:05:43Z"
- },
- {
- "apiVersion": "v1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:metadata": {
- "f:annotations": {
- ".": {},
- "f:kubectl.kubernetes.io/last-applied-configuration": {}
- },
- "f:labels": {
- ".": {},
- "f:app": {},
- "f:chart": {},
- "f:heritage": {},
- "f:release": {}
- }
- }
- },
- "manager": "kubectl-client-side-apply",
- "operation": "Update",
- "time": "2021-01-21T01:05:43Z"
- }
- ],
- "name": "istio-ingressgateway-service-account",
- "namespace": "istio-system",
- "resourceVersion": "450491",
- "selfLink": "/api/v1/namespaces/istio-system/serviceaccounts/istio-ingressgateway-service-account",
- "uid": "de09c78a-ea26-42ff-82d5-2f7d3f24a8d1"
- },
- "secrets": [
- {
- "name": "istio-ingressgateway-service-account-token-zmk8b"
- }
- ]
-}
diff --git a/infrastructure/kubequery/internal/k8s/core/testdata/services_test.json b/infrastructure/kubequery/internal/k8s/core/testdata/services_test.json
deleted file mode 100644
index 4c52d6bfef..0000000000
--- a/infrastructure/kubequery/internal/k8s/core/testdata/services_test.json
+++ /dev/null
@@ -1,94 +0,0 @@
-{
- "apiVersion": "v1",
- "kind": "Service",
- "metadata": {
- "creationTimestamp": "2021-01-21T01:08:52Z",
- "labels": {
- "name": "jaeger-operator"
- },
- "managedFields": [
- {
- "apiVersion": "v1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:metadata": {
- "f:labels": {
- ".": {},
- "f:name": {}
- },
- "f:ownerReferences": {
- ".": {},
- "k:{\"uid\":\"baa856ea-2d04-4bbb-b9be-aa5b89c58087\"}": {
- ".": {},
- "f:apiVersion": {},
- "f:blockOwnerDeletion": {},
- "f:controller": {},
- "f:kind": {},
- "f:name": {},
- "f:uid": {}
- }
- }
- },
- "f:spec": {
- "f:ports": {
- ".": {},
- "k:{\"port\":8383,\"protocol\":\"TCP\"}": {
- ".": {},
- "f:name": {},
- "f:port": {},
- "f:protocol": {},
- "f:targetPort": {}
- }
- },
- "f:selector": {
- ".": {},
- "f:name": {}
- },
- "f:sessionAffinity": {},
- "f:type": {}
- }
- },
- "manager": "jaeger-operator",
- "operation": "Update",
- "time": "2021-01-21T01:08:52Z"
- }
- ],
- "name": "jaeger-operator",
- "namespace": "default",
- "ownerReferences": [
- {
- "apiVersion": "apps/v1",
- "blockOwnerDeletion": true,
- "controller": true,
- "kind": "Deployment",
- "name": "jaeger-operator",
- "uid": "baa856ea-2d04-4bbb-b9be-aa5b89c58087"
- }
- ],
- "resourceVersion": "451805",
- "selfLink": "/api/v1/namespaces/default/services/jaeger-operator",
- "uid": "d8dfda88-e2c5-479e-bb2d-d0964805a925"
- },
- "spec": {
- "clusterIP": "10.152.183.187",
- "clusterIPs": [
- "10.152.183.187"
- ],
- "ports": [
- {
- "name": "metrics",
- "port": 8383,
- "protocol": "TCP",
- "targetPort": 8383
- }
- ],
- "selector": {
- "name": "jaeger-operator"
- },
- "sessionAffinity": "None",
- "type": "ClusterIP"
- },
- "status": {
- "loadBalancer": {}
- }
-}
diff --git a/infrastructure/kubequery/internal/k8s/discovery/api_resource.go b/infrastructure/kubequery/internal/k8s/discovery/api_resource.go
deleted file mode 100644
index 55405aca33..0000000000
--- a/infrastructure/kubequery/internal/k8s/discovery/api_resource.go
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package discovery
-
-import (
- "context"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/types"
-)
-
-type apiResource struct {
- ClusterName string
- ClusterUID types.UID
- metav1.APIResource
- GroupVersion string
-}
-
-// APIResourceColumns returns kubernetes API resource fields as Osquery table columns.
-func APIResourceColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&apiResource{})
-}
-
-// APIResourcesGenerate generates the kubernetes API resources as Osquery table data.
-func APIResourcesGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- results := make([]map[string]string, 0)
-
- sr, err := k8s.GetClient().Discovery().ServerResources()
- if err != nil {
- return nil, err
- }
-
- for _, rl := range sr {
- for _, r := range rl.APIResources {
- item := &apiResource{
- ClusterName: k8s.GetClusterName(),
- ClusterUID: k8s.GetClusterUID(),
- GroupVersion: rl.GroupVersion,
- APIResource: r,
- }
- results = append(results, k8s.ToMap(item))
- }
- }
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/discovery/api_resource_test.go b/infrastructure/kubequery/internal/k8s/discovery/api_resource_test.go
deleted file mode 100644
index 4f8383b83d..0000000000
--- a/infrastructure/kubequery/internal/k8s/discovery/api_resource_test.go
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package discovery
-
-import (
- "context"
- "testing"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- "github.com/stretchr/testify/assert"
- "k8s.io/apimachinery/pkg/types"
- "k8s.io/client-go/kubernetes/fake"
-)
-
-func TestAPIResourcesGenerate(t *testing.T) {
- clientset := fake.NewSimpleClientset()
- k8s.SetClient(clientset, types.UID("hello"), "cluster-name")
-
- ars, err := APIResourcesGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{}, ars)
-}
diff --git a/infrastructure/kubequery/internal/k8s/discovery/info.go b/infrastructure/kubequery/internal/k8s/discovery/info.go
deleted file mode 100644
index 11627eeb0d..0000000000
--- a/infrastructure/kubequery/internal/k8s/discovery/info.go
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package discovery
-
-import (
- "context"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- "k8s.io/apimachinery/pkg/types"
- "k8s.io/apimachinery/pkg/version"
-)
-
-type info struct {
- ClusterUID types.UID
- ClusterName string
- version.Info
-}
-
-// InfoColumns returns kubernetes info fields as Osquery table columns.
-func InfoColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&info{})
-}
-
-// InfoGenerate generates the kubernetes info as Osquery table data.
-func InfoGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- results := make([]map[string]string, 0)
-
- sv, err := k8s.GetClient().Discovery().ServerVersion()
- if err != nil {
- return nil, err
- }
-
- item := &info{
- ClusterUID: k8s.GetClusterUID(),
- ClusterName: k8s.GetClusterName(),
- Info: *sv,
- }
- results = append(results, k8s.ToMap(item))
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/discovery/info_test.go b/infrastructure/kubequery/internal/k8s/discovery/info_test.go
deleted file mode 100644
index 9c24c796d6..0000000000
--- a/infrastructure/kubequery/internal/k8s/discovery/info_test.go
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package discovery
-
-import (
- "context"
- "testing"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- "github.com/stretchr/testify/assert"
- "k8s.io/apimachinery/pkg/types"
- "k8s.io/apimachinery/pkg/version"
- fakediscovery "k8s.io/client-go/discovery/fake"
- "k8s.io/client-go/kubernetes/fake"
-)
-
-func TestInfoGenerate(t *testing.T) {
- clientset := fake.NewSimpleClientset()
- clientset.Discovery().(*fakediscovery.FakeDiscovery).FakedServerVersion = &version.Info{
- Major: "1",
- Minor: "46",
- GitVersion: "master",
- GitCommit: "123",
- BuildDate: "1970-01-01T00:00:00Z",
- GoVersion: "go1.15",
- Compiler: "gc",
- Platform: "linux/amd64",
- }
- k8s.SetClient(clientset, types.UID("hello"), "cluster-name")
-
- ars, err := InfoGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{
- {
- "build_date": "1970-01-01T00:00:00Z",
- "cluster_uid": "hello",
- "cluster_name": "cluster-name",
- "compiler": "gc",
- "git_commit": "123",
- "git_version": "master",
- "go_version": "go1.15",
- "major": "1",
- "minor": "46",
- "platform": "linux/amd64",
- },
- }, ars)
-}
diff --git a/infrastructure/kubequery/internal/k8s/event/watcher.go b/infrastructure/kubequery/internal/k8s/event/watcher.go
deleted file mode 100644
index 85b9ea1788..0000000000
--- a/infrastructure/kubequery/internal/k8s/event/watcher.go
+++ /dev/null
@@ -1,159 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package event
-
-import (
- "context"
- "sync"
- "time"
-
- osquery "github.com/Uptycs/basequery-go"
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/api/events/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/types"
- "k8s.io/client-go/informers"
- "k8s.io/client-go/tools/cache"
-)
-
-const tableName = "kubernetes_events"
-
-// Watcher holds the kubernetes informer. Can be started to receive events from k8s.
-type Watcher struct {
- lock sync.Mutex
- client *osquery.ExtensionManagerClient
- stopper chan struct{}
- informer cache.SharedInformer
-}
-
-type event struct {
- Time metav1.Time
- EventType string
- ClusterUID types.UID
- ClusterName string
- Name string
- Namespace string
- CreationTimestamp metav1.Time
- Labels map[string]string
- Annotations map[string]string
- ReportingController string
- ReportingInstance string
- Action string
- Reason string
- Note string
- Type string
- RegardingKind string
- RegardingNamespace string
- RegardingName string
- RegardingUID types.UID
- RelatedKind string
- RelatedNamespace string
- RelatedName string
- RelatedUID types.UID
-}
-
-// Columns returns kubernetes event fields as Osquery table columns.
-func Columns() []table.ColumnDefinition {
- return k8s.GetSchema(&event{})
-}
-
-// Generate generates the kubernetes events as Osquery table data.
-// For event'ed table Generate method should never be called. So this always returns nil.
-func Generate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- return nil, nil
-}
-
-func streamEvent(client *osquery.ExtensionManagerClient, eventType string, e *v1.Event) {
- event := &event{
- EventType: eventType,
- ClusterName: k8s.GetClusterName(),
- ClusterUID: k8s.GetClusterUID(),
- Name: e.Name,
- Namespace: e.Namespace,
- CreationTimestamp: e.CreationTimestamp,
- Reason: e.Reason,
- Note: e.Note,
- Type: e.Type,
- Labels: e.Labels,
- Annotations: e.Annotations,
- ReportingController: e.ReportingController,
- ReportingInstance: e.ReportingInstance,
- Action: e.Action,
- RegardingUID: e.Regarding.UID,
- RegardingKind: e.Regarding.Kind,
- RegardingName: e.Regarding.Name,
- RegardingNamespace: e.Regarding.Namespace,
- }
- if e.EventTime.IsZero() {
- event.Time = metav1.Now()
- } else {
- event.Time = metav1.Time(e.EventTime)
- }
- if e.Related != nil {
- event.RelatedUID = e.Related.UID
- event.RelatedKind = e.Related.Kind
- event.RelatedName = e.Related.Name
- event.RelatedNamespace = e.Related.Namespace
- }
-
- events := make([]map[string]string, 1)
- events[0] = k8s.ToMap(event)
-
- // TODO: Returned status, error is ignored
- client.StreamEvents(tableName, events)
-}
-
-// CreateEventWatcher when started will get events from kubernetes that will be streamed to Osquery.
-func CreateEventWatcher(socket string, timeout time.Duration) (*Watcher, error) {
- client, err := osquery.NewClient(socket, timeout)
- if err != nil {
- return nil, err
- }
-
- factory := informers.NewSharedInformerFactory(k8s.GetClient(), 0)
- watcher := &Watcher{
- client: client,
- stopper: make(chan struct{}),
- informer: factory.Events().V1().Events().Informer(),
- }
-
- watcher.informer.AddEventHandler(cache.ResourceEventHandlerFuncs{
- AddFunc: func(obj interface{}) {
- watcher.lock.Lock()
- streamEvent(client, "add", obj.(*v1.Event))
- watcher.lock.Unlock()
- },
- UpdateFunc: func(old interface{}, new interface{}) {
- watcher.lock.Lock()
- streamEvent(client, "update", new.(*v1.Event))
- watcher.lock.Unlock()
- },
- DeleteFunc: func(obj interface{}) {
- watcher.lock.Lock()
- streamEvent(client, "delete", obj.(*v1.Event))
- watcher.lock.Unlock()
- },
- })
-
- return watcher, nil
-}
-
-// Start will start the watcher to stream kubernetes events as they come in.
-func (e *Watcher) Start() {
- go e.informer.Run(e.stopper)
-}
-
-// Stop terminates the watcher.
-func (e *Watcher) Stop() {
- e.client.Close()
- e.stopper <- struct{}{}
- close(e.stopper)
-}
diff --git a/infrastructure/kubequery/internal/k8s/networking/ingress.go b/infrastructure/kubequery/internal/k8s/networking/ingress.go
deleted file mode 100644
index 0da7ac8918..0000000000
--- a/infrastructure/kubequery/internal/k8s/networking/ingress.go
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package networking
-
-import (
- "context"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/api/networking/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-type ingress struct {
- k8s.CommonNamespacedFields
- v1.IngressSpec
- v1.IngressStatus
-}
-
-// IngressColumns returns kubernetes ingress fields as Osquery table columns.
-func IngressColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&ingress{})
-}
-
-// IngressesGenerate generates the kubernetes ingresses as Osquery table data.
-func IngressesGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- ingresses, err := k8s.GetClient().NetworkingV1().Ingresses(metav1.NamespaceAll).List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, i := range ingresses.Items {
- item := &ingress{
- CommonNamespacedFields: k8s.GetCommonNamespacedFields(i.ObjectMeta),
- IngressSpec: i.Spec,
- IngressStatus: i.Status,
- }
- results = append(results, k8s.ToMap(item))
- }
-
- if ingresses.Continue == "" {
- break
- }
- options.Continue = ingresses.Continue
- }
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/networking/ingress_class.go b/infrastructure/kubequery/internal/k8s/networking/ingress_class.go
deleted file mode 100644
index 89090a51e1..0000000000
--- a/infrastructure/kubequery/internal/k8s/networking/ingress_class.go
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package networking
-
-import (
- "context"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/api/networking/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-type ingressClass struct {
- k8s.CommonFields
- v1.IngressClassSpec
-}
-
-// IngressClassColumns returns kubernetes ingress class fields as Osquery table columns.
-func IngressClassColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&ingressClass{})
-}
-
-// IngressClassesGenerate generates the kubernetes ingress classes as Osquery table data.
-func IngressClassesGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- ics, err := k8s.GetClient().NetworkingV1().IngressClasses().List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, ic := range ics.Items {
- item := &ingressClass{
- CommonFields: k8s.GetCommonFields(ic.ObjectMeta),
- IngressClassSpec: ic.Spec,
- }
- results = append(results, k8s.ToMap(item))
- }
-
- if ics.Continue == "" {
- break
- }
- options.Continue = ics.Continue
- }
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/networking/ingress_class_test.go b/infrastructure/kubequery/internal/k8s/networking/ingress_class_test.go
deleted file mode 100644
index eb405d6643..0000000000
--- a/infrastructure/kubequery/internal/k8s/networking/ingress_class_test.go
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package networking
-
-import (
- "context"
- "testing"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/stretchr/testify/assert"
-)
-
-func TestIngressClassesGenerate(t *testing.T) {
- igcs, err := IngressClassesGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{
- {
- "annotations": "{\"ingressclass.kubernetes.io/is-default-class\":\"true\",\"kubectl.kubernetes.io/last-applied-configuration\":\"{\\\"apiVersion\\\":\\\"networking.k8s.io/v1\\\",\\\"kind\\\":\\\"IngressClass\\\",\\\"metadata\\\":{\\\"annotations\\\":{\\\"ingressclass.kubernetes.io/is-default-class\\\":\\\"true\\\"},\\\"name\\\":\\\"public\\\"},\\\"spec\\\":{\\\"controller\\\":\\\"k8s.io/ingress-nginx\\\"}}\\n\"}",
- "cluster_uid": "c7fd8e77-93de-4742-9037-5db9a01e966a",
- "controller": "k8s.io/ingress-nginx",
- "creation_timestamp": "1611191047",
- "name": "public",
- "uid": "dab8c076-3158-4a4a-8ee4-5632990ce074",
- },
- }, igcs)
-}
diff --git a/infrastructure/kubequery/internal/k8s/networking/ingress_test.go b/infrastructure/kubequery/internal/k8s/networking/ingress_test.go
deleted file mode 100644
index 00139e7e40..0000000000
--- a/infrastructure/kubequery/internal/k8s/networking/ingress_test.go
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package networking
-
-import (
- "context"
- "testing"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/stretchr/testify/assert"
-)
-
-func TestIngressesGenerate(t *testing.T) {
- igs, err := IngressesGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{
- {
- "cluster_uid": "c7fd8e77-93de-4742-9037-5db9a01e966a",
- "creation_timestamp": "1611191344",
- "default_backend": "{\"service\":{\"name\":\"simplest-query\",\"port\":{\"number\":16686}}}",
- "labels": "{\"app\":\"jaeger\",\"app.kubernetes.io/component\":\"query-ingress\",\"app.kubernetes.io/instance\":\"simplest\",\"app.kubernetes.io/managed-by\":\"jaeger-operator\",\"app.kubernetes.io/name\":\"simplest-query\",\"app.kubernetes.io/part-of\":\"jaeger\"}",
- "load_balancer": "{}",
- "name": "simplest-query",
- "namespace": "default",
- "uid": "0cdc9181-0cb1-43bd-97b4-e31c864a13e2",
- },
- }, igs)
-}
diff --git a/infrastructure/kubequery/internal/k8s/networking/init_test.go b/infrastructure/kubequery/internal/k8s/networking/init_test.go
deleted file mode 100644
index 42b0f88553..0000000000
--- a/infrastructure/kubequery/internal/k8s/networking/init_test.go
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package networking
-
-import (
- "encoding/json"
- "io/ioutil"
- "path/filepath"
-
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/api/networking/v1"
- "k8s.io/apimachinery/pkg/types"
- "k8s.io/client-go/kubernetes/fake"
-)
-
-func loadTestResource(name string, v interface{}) {
- path := filepath.Join("testdata", name)
- data, err := ioutil.ReadFile(path)
- if err != nil {
- panic(err)
- }
-
- err = json.Unmarshal(data, v)
- if err != nil {
- panic(err)
- }
-}
-
-func init() {
- ig := &v1.Ingress{}
- loadTestResource("ingress_test.json", ig)
- igc := &v1.IngressClass{}
- loadTestResource("ingress_class_test.json", igc)
- npl := &v1.NetworkPolicyList{}
- loadTestResource("network_policy_test.json", npl)
-
- k8s.SetClient(fake.NewSimpleClientset(ig, igc, npl), types.UID("c7fd8e77-93de-4742-9037-5db9a01e966a"), "")
-}
diff --git a/infrastructure/kubequery/internal/k8s/networking/network_policy.go b/infrastructure/kubequery/internal/k8s/networking/network_policy.go
deleted file mode 100644
index b31203049a..0000000000
--- a/infrastructure/kubequery/internal/k8s/networking/network_policy.go
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package networking
-
-import (
- "context"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/api/networking/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-type networkPolicy struct {
- k8s.CommonNamespacedFields
- PodSelector metav1.LabelSelector
- PolicyTypes []v1.PolicyType
- Type string
- Ports []v1.NetworkPolicyPort
- FromTo []v1.NetworkPolicyPeer
-}
-
-// NetworkPolicyColumns returns kubernetes network policy fields as Osquery table columns.
-func NetworkPolicyColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&networkPolicy{})
-}
-
-// NetworkPoliciesGenerate generates the kubernetes network policies as Osquery table data.
-func NetworkPoliciesGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- nps, err := k8s.GetClient().NetworkingV1().NetworkPolicies(metav1.NamespaceAll).List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, np := range nps.Items {
- for _, i := range np.Spec.Ingress {
- item := &networkPolicy{
- CommonNamespacedFields: k8s.GetCommonNamespacedFields(np.ObjectMeta),
- PodSelector: np.Spec.PodSelector,
- PolicyTypes: np.Spec.PolicyTypes,
- Type: "ingress",
- Ports: i.Ports,
- FromTo: i.From,
- }
- results = append(results, k8s.ToMap(item))
- }
- for _, e := range np.Spec.Egress {
- item := &networkPolicy{
- CommonNamespacedFields: k8s.GetCommonNamespacedFields(np.ObjectMeta),
- PodSelector: np.Spec.PodSelector,
- PolicyTypes: np.Spec.PolicyTypes,
- Type: "egress",
- Ports: e.Ports,
- FromTo: e.To,
- }
- results = append(results, k8s.ToMap(item))
- }
- }
-
- if nps.Continue == "" {
- break
- }
- options.Continue = nps.Continue
- }
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/networking/network_policy_test.go b/infrastructure/kubequery/internal/k8s/networking/network_policy_test.go
deleted file mode 100644
index 5467b3ca5a..0000000000
--- a/infrastructure/kubequery/internal/k8s/networking/network_policy_test.go
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package networking
-
-import (
- "context"
- "testing"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/stretchr/testify/assert"
-)
-
-func TestNetworkPoliciesGenerate(t *testing.T) {
- nps, err := NetworkPoliciesGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{
- {
- "annotations": "{\"kubectl.kubernetes.io/last-applied-configuration\":\"{\\\"apiVersion\\\":\\\"networking.k8s.io/v1\\\",\\\"kind\\\":\\\"NetworkPolicy\\\",\\\"metadata\\\":{\\\"annotations\\\":{},\\\"name\\\":\\\"test-network-policy\\\",\\\"namespace\\\":\\\"default\\\"},\\\"spec\\\":{\\\"egress\\\":[{\\\"ports\\\":[{\\\"port\\\":5978,\\\"protocol\\\":\\\"TCP\\\"}],\\\"to\\\":[{\\\"ipBlock\\\":{\\\"cidr\\\":\\\"10.0.0.0/24\\\"}}]}],\\\"ingress\\\":[{\\\"from\\\":[{\\\"ipBlock\\\":{\\\"cidr\\\":\\\"172.17.0.0/16\\\",\\\"except\\\":[\\\"172.17.1.0/24\\\"]}},{\\\"namespaceSelector\\\":{\\\"matchLabels\\\":{\\\"project\\\":\\\"myproject\\\"}}},{\\\"podSelector\\\":{\\\"matchLabels\\\":{\\\"role\\\":\\\"frontend\\\"}}}],\\\"ports\\\":[{\\\"port\\\":6379,\\\"protocol\\\":\\\"TCP\\\"}]}],\\\"podSelector\\\":{\\\"matchLabels\\\":{\\\"role\\\":\\\"db\\\"}},\\\"policyTypes\\\":[\\\"Ingress\\\",\\\"Egress\\\"]}}\\n\"}",
- "cluster_uid": "c7fd8e77-93de-4742-9037-5db9a01e966a",
- "creation_timestamp": "1611328106",
- "from_to": "[{\"ipBlock\":{\"cidr\":\"172.17.0.0/16\",\"except\":[\"172.17.1.0/24\"]}},{\"namespaceSelector\":{\"matchLabels\":{\"project\":\"myproject\"}}},{\"podSelector\":{\"matchLabels\":{\"role\":\"frontend\"}}}]",
- "name": "test-network-policy",
- "namespace": "default",
- "pod_selector": "{\"matchLabels\":{\"role\":\"db\"}}",
- "policy_types": "[\"Ingress\",\"Egress\"]",
- "ports": "[{\"protocol\":\"TCP\",\"port\":6379}]",
- "type": "ingress",
- "uid": "ef70a000-9460-4098-9100-1d2b4bf608e1",
- },
- {
- "annotations": "{\"kubectl.kubernetes.io/last-applied-configuration\":\"{\\\"apiVersion\\\":\\\"networking.k8s.io/v1\\\",\\\"kind\\\":\\\"NetworkPolicy\\\",\\\"metadata\\\":{\\\"annotations\\\":{},\\\"name\\\":\\\"test-network-policy\\\",\\\"namespace\\\":\\\"default\\\"},\\\"spec\\\":{\\\"egress\\\":[{\\\"ports\\\":[{\\\"port\\\":5978,\\\"protocol\\\":\\\"TCP\\\"}],\\\"to\\\":[{\\\"ipBlock\\\":{\\\"cidr\\\":\\\"10.0.0.0/24\\\"}}]}],\\\"ingress\\\":[{\\\"from\\\":[{\\\"ipBlock\\\":{\\\"cidr\\\":\\\"172.17.0.0/16\\\",\\\"except\\\":[\\\"172.17.1.0/24\\\"]}},{\\\"namespaceSelector\\\":{\\\"matchLabels\\\":{\\\"project\\\":\\\"myproject\\\"}}},{\\\"podSelector\\\":{\\\"matchLabels\\\":{\\\"role\\\":\\\"frontend\\\"}}}],\\\"ports\\\":[{\\\"port\\\":6379,\\\"protocol\\\":\\\"TCP\\\"}]}],\\\"podSelector\\\":{\\\"matchLabels\\\":{\\\"role\\\":\\\"db\\\"}},\\\"policyTypes\\\":[\\\"Ingress\\\",\\\"Egress\\\"]}}\\n\"}",
- "cluster_uid": "c7fd8e77-93de-4742-9037-5db9a01e966a",
- "creation_timestamp": "1611328106",
- "from_to": "[{\"ipBlock\":{\"cidr\":\"10.0.0.0/24\"}}]",
- "name": "test-network-policy",
- "namespace": "default",
- "pod_selector": "{\"matchLabels\":{\"role\":\"db\"}}",
- "policy_types": "[\"Ingress\",\"Egress\"]",
- "ports": "[{\"protocol\":\"TCP\",\"port\":5978}]",
- "type": "egress",
- "uid": "ef70a000-9460-4098-9100-1d2b4bf608e1",
- },
- }, nps)
-}
diff --git a/infrastructure/kubequery/internal/k8s/networking/testdata/ingress_class_test.json b/infrastructure/kubequery/internal/k8s/networking/testdata/ingress_class_test.json
deleted file mode 100644
index 1b4c8d62e5..0000000000
--- a/infrastructure/kubequery/internal/k8s/networking/testdata/ingress_class_test.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "apiVersion": "networking.k8s.io/v1",
- "kind": "IngressClass",
- "metadata": {
- "annotations": {
- "ingressclass.kubernetes.io/is-default-class": "true",
- "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"networking.k8s.io/v1\",\"kind\":\"IngressClass\",\"metadata\":{\"annotations\":{\"ingressclass.kubernetes.io/is-default-class\":\"true\"},\"name\":\"public\"},\"spec\":{\"controller\":\"k8s.io/ingress-nginx\"}}\n"
- },
- "creationTimestamp": "2021-01-21T01:04:07Z",
- "generation": 1,
- "managedFields": [
- {
- "apiVersion": "networking.k8s.io/v1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:metadata": {
- "f:annotations": {
- ".": {},
- "f:ingressclass.kubernetes.io/is-default-class": {},
- "f:kubectl.kubernetes.io/last-applied-configuration": {}
- }
- },
- "f:spec": {
- "f:controller": {}
- }
- },
- "manager": "kubectl-client-side-apply",
- "operation": "Update",
- "time": "2021-01-21T01:04:07Z"
- }
- ],
- "name": "public",
- "resourceVersion": "450123",
- "selfLink": "/apis/networking.k8s.io/v1/ingressclasses/public",
- "uid": "dab8c076-3158-4a4a-8ee4-5632990ce074"
- },
- "spec": {
- "controller": "k8s.io/ingress-nginx"
- }
-}
diff --git a/infrastructure/kubequery/internal/k8s/networking/testdata/ingress_test.json b/infrastructure/kubequery/internal/k8s/networking/testdata/ingress_test.json
deleted file mode 100644
index 518dc0edf7..0000000000
--- a/infrastructure/kubequery/internal/k8s/networking/testdata/ingress_test.json
+++ /dev/null
@@ -1,83 +0,0 @@
-{
- "apiVersion": "networking.k8s.io/v1",
- "kind": "Ingress",
- "metadata": {
- "creationTimestamp": "2021-01-21T01:09:04Z",
- "generation": 1,
- "labels": {
- "app": "jaeger",
- "app.kubernetes.io/component": "query-ingress",
- "app.kubernetes.io/instance": "simplest",
- "app.kubernetes.io/managed-by": "jaeger-operator",
- "app.kubernetes.io/name": "simplest-query",
- "app.kubernetes.io/part-of": "jaeger"
- },
- "managedFields": [
- {
- "apiVersion": "extensions/v1beta1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:metadata": {
- "f:labels": {
- ".": {},
- "f:app": {},
- "f:app.kubernetes.io/component": {},
- "f:app.kubernetes.io/instance": {},
- "f:app.kubernetes.io/managed-by": {},
- "f:app.kubernetes.io/name": {},
- "f:app.kubernetes.io/part-of": {}
- },
- "f:ownerReferences": {
- ".": {},
- "k:{\"uid\":\"95d303e8-d347-4f8f-b008-a4da3e44b847\"}": {
- ".": {},
- "f:apiVersion": {},
- "f:controller": {},
- "f:kind": {},
- "f:name": {},
- "f:uid": {}
- }
- }
- },
- "f:spec": {
- "f:backend": {
- ".": {},
- "f:serviceName": {},
- "f:servicePort": {}
- }
- }
- },
- "manager": "jaeger-operator",
- "operation": "Update",
- "time": "2021-01-21T01:09:04Z"
- }
- ],
- "name": "simplest-query",
- "namespace": "default",
- "ownerReferences": [
- {
- "apiVersion": "jaegertracing.io/v1",
- "controller": true,
- "kind": "Jaeger",
- "name": "simplest",
- "uid": "95d303e8-d347-4f8f-b008-a4da3e44b847"
- }
- ],
- "resourceVersion": "451926",
- "selfLink": "/apis/networking.k8s.io/v1/namespaces/default/ingresses/simplest-query",
- "uid": "0cdc9181-0cb1-43bd-97b4-e31c864a13e2"
- },
- "spec": {
- "defaultBackend": {
- "service": {
- "name": "simplest-query",
- "port": {
- "number": 16686
- }
- }
- }
- },
- "status": {
- "loadBalancer": {}
- }
-}
diff --git a/infrastructure/kubequery/internal/k8s/networking/testdata/network_policy_test.json b/infrastructure/kubequery/internal/k8s/networking/testdata/network_policy_test.json
deleted file mode 100644
index 76b84d861b..0000000000
--- a/infrastructure/kubequery/internal/k8s/networking/testdata/network_policy_test.json
+++ /dev/null
@@ -1,111 +0,0 @@
-{
- "apiVersion": "v1",
- "items": [
- {
- "apiVersion": "networking.k8s.io/v1",
- "kind": "NetworkPolicy",
- "metadata": {
- "annotations": {
- "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"networking.k8s.io/v1\",\"kind\":\"NetworkPolicy\",\"metadata\":{\"annotations\":{},\"name\":\"test-network-policy\",\"namespace\":\"default\"},\"spec\":{\"egress\":[{\"ports\":[{\"port\":5978,\"protocol\":\"TCP\"}],\"to\":[{\"ipBlock\":{\"cidr\":\"10.0.0.0/24\"}}]}],\"ingress\":[{\"from\":[{\"ipBlock\":{\"cidr\":\"172.17.0.0/16\",\"except\":[\"172.17.1.0/24\"]}},{\"namespaceSelector\":{\"matchLabels\":{\"project\":\"myproject\"}}},{\"podSelector\":{\"matchLabels\":{\"role\":\"frontend\"}}}],\"ports\":[{\"port\":6379,\"protocol\":\"TCP\"}]}],\"podSelector\":{\"matchLabels\":{\"role\":\"db\"}},\"policyTypes\":[\"Ingress\",\"Egress\"]}}\n"
- },
- "creationTimestamp": "2021-01-22T15:08:26Z",
- "generation": 1,
- "managedFields": [
- {
- "apiVersion": "networking.k8s.io/v1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:metadata": {
- "f:annotations": {
- ".": {},
- "f:kubectl.kubernetes.io/last-applied-configuration": {}
- }
- },
- "f:spec": {
- "f:egress": {},
- "f:ingress": {},
- "f:podSelector": {},
- "f:policyTypes": {}
- }
- },
- "manager": "kubectl-client-side-apply",
- "operation": "Update",
- "time": "2021-01-22T15:08:26Z"
- }
- ],
- "name": "test-network-policy",
- "namespace": "default",
- "resourceVersion": "536004",
- "selfLink": "/apis/networking.k8s.io/v1/namespaces/default/networkpolicies/test-network-policy",
- "uid": "ef70a000-9460-4098-9100-1d2b4bf608e1"
- },
- "spec": {
- "egress": [
- {
- "ports": [
- {
- "port": 5978,
- "protocol": "TCP"
- }
- ],
- "to": [
- {
- "ipBlock": {
- "cidr": "10.0.0.0/24"
- }
- }
- ]
- }
- ],
- "ingress": [
- {
- "from": [
- {
- "ipBlock": {
- "cidr": "172.17.0.0/16",
- "except": [
- "172.17.1.0/24"
- ]
- }
- },
- {
- "namespaceSelector": {
- "matchLabels": {
- "project": "myproject"
- }
- }
- },
- {
- "podSelector": {
- "matchLabels": {
- "role": "frontend"
- }
- }
- }
- ],
- "ports": [
- {
- "port": 6379,
- "protocol": "TCP"
- }
- ]
- }
- ],
- "podSelector": {
- "matchLabels": {
- "role": "db"
- }
- },
- "policyTypes": [
- "Ingress",
- "Egress"
- ]
- }
- }
- ],
- "kind": "List",
- "metadata": {
- "resourceVersion": "",
- "selfLink": ""
- }
-}
diff --git a/infrastructure/kubequery/internal/k8s/policy/init_test.go b/infrastructure/kubequery/internal/k8s/policy/init_test.go
deleted file mode 100644
index ba9b3b5f43..0000000000
--- a/infrastructure/kubequery/internal/k8s/policy/init_test.go
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package policy
-
-import (
- "encoding/json"
- "io/ioutil"
- "path/filepath"
-
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/api/policy/v1"
- v1beta1 "k8s.io/api/policy/v1beta1"
- "k8s.io/apimachinery/pkg/types"
- "k8s.io/client-go/kubernetes/fake"
-)
-
-func loadTestResource(name string, v interface{}) {
- path := filepath.Join("testdata", name)
- data, err := ioutil.ReadFile(path)
- if err != nil {
- panic(err)
- }
-
- err = json.Unmarshal(data, v)
- if err != nil {
- panic(err)
- }
-}
-
-func init() {
- pdb := &v1.PodDisruptionBudget{}
- loadTestResource("pod_disruption_budget_test.json", pdb)
- psp := &v1beta1.PodSecurityPolicy{}
- loadTestResource("pod_security_policy_test.json", psp)
-
- k8s.SetClient(fake.NewSimpleClientset(pdb, psp), types.UID("b7fd8e77-93de-4742-9037-5db9a01e966a"), "")
-}
diff --git a/infrastructure/kubequery/internal/k8s/policy/pod_disruption_budget.go b/infrastructure/kubequery/internal/k8s/policy/pod_disruption_budget.go
deleted file mode 100644
index 2af59d6d4a..0000000000
--- a/infrastructure/kubequery/internal/k8s/policy/pod_disruption_budget.go
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package policy
-
-import (
- "context"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/api/policy/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-type podDisruptionBudget struct {
- k8s.CommonNamespacedFields
- v1.PodDisruptionBudgetSpec
- v1.PodDisruptionBudgetStatus
-}
-
-// PodDisruptionBudgetColumns returns kubernetes pod disruption budget fields as Osquery table columns.
-func PodDisruptionBudgetColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&podDisruptionBudget{})
-}
-
-// PodDisruptionBudgetsGenerate generates the kubernetes pod disruption budgets as Osquery table data.
-func PodDisruptionBudgetsGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- pdbs, err := k8s.GetClient().PolicyV1().PodDisruptionBudgets(metav1.NamespaceAll).List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, pdb := range pdbs.Items {
- item := &podDisruptionBudget{
- CommonNamespacedFields: k8s.GetCommonNamespacedFields(pdb.ObjectMeta),
- PodDisruptionBudgetSpec: pdb.Spec,
- PodDisruptionBudgetStatus: pdb.Status,
- }
- results = append(results, k8s.ToMap(item))
- }
-
- if pdbs.Continue == "" {
- break
- }
- options.Continue = pdbs.Continue
- }
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/policy/pod_disruption_budget_test.go b/infrastructure/kubequery/internal/k8s/policy/pod_disruption_budget_test.go
deleted file mode 100644
index bbf0aff161..0000000000
--- a/infrastructure/kubequery/internal/k8s/policy/pod_disruption_budget_test.go
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package policy
-
-import (
- "context"
- "testing"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/stretchr/testify/assert"
-)
-
-func TestPodDisruptionBudgetsGenerate(t *testing.T) {
- pdbs, err := PodDisruptionBudgetsGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{
- {
- "annotations": "{\"kubectl.kubernetes.io/last-applied-configuration\":\"{\\\"apiVersion\\\":\\\"policy/v1\\\",\\\"kind\\\":\\\"PodDisruptionBudget\\\",\\\"metadata\\\":{\\\"annotations\\\":{},\\\"labels\\\":{\\\"app\\\":\\\"policy\\\",\\\"chart\\\":\\\"mixer\\\",\\\"heritage\\\":\\\"Tiller\\\",\\\"istio\\\":\\\"mixer\\\",\\\"istio-mixer-type\\\":\\\"policy\\\",\\\"release\\\":\\\"istio\\\",\\\"version\\\":\\\"1.5.1\\\"},\\\"name\\\":\\\"istio-policy\\\",\\\"namespace\\\":\\\"istio-system\\\"},\\\"spec\\\":{\\\"minAvailable\\\":1,\\\"selector\\\":{\\\"matchLabels\\\":{\\\"app\\\":\\\"policy\\\",\\\"istio\\\":\\\"mixer\\\",\\\"istio-mixer-type\\\":\\\"policy\\\",\\\"release\\\":\\\"istio\\\"}}}}\\n\"}",
- "cluster_uid": "b7fd8e77-93de-4742-9037-5db9a01e966a",
- "creation_timestamp": "1611191143",
- "current_healthy": "1",
- "desired_healthy": "1",
- "disruptions_allowed": "0",
- "expected_pods": "1",
- "labels": "{\"app\":\"policy\",\"chart\":\"mixer\",\"heritage\":\"Tiller\",\"istio\":\"mixer\",\"istio-mixer-type\":\"policy\",\"release\":\"istio\",\"version\":\"1.5.1\"}",
- "min_available": "1",
- "name": "istio-policy",
- "namespace": "istio-system",
- "observed_generation": "1",
- "selector": "{\"matchLabels\":{\"app\":\"policy\",\"istio\":\"mixer\",\"istio-mixer-type\":\"policy\",\"release\":\"istio\"}}",
- "uid": "77dc4487-d95d-40a9-8fdb-f3bbe334c4e3",
- },
- }, pdbs)
-}
diff --git a/infrastructure/kubequery/internal/k8s/policy/pod_security_policy.go b/infrastructure/kubequery/internal/k8s/policy/pod_security_policy.go
deleted file mode 100644
index 36a3478f0e..0000000000
--- a/infrastructure/kubequery/internal/k8s/policy/pod_security_policy.go
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package policy
-
-import (
- "context"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- v1beta1 "k8s.io/api/policy/v1beta1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-type podSecurityPolicy struct {
- k8s.CommonFields
- v1beta1.PodSecurityPolicySpec
-}
-
-// PodSecurityPolicyColumns returns kubernetes pod security policy fields as Osquery table columns.
-func PodSecurityPolicyColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&podSecurityPolicy{})
-}
-
-// PodSecurityPoliciesGenerate generates the kubernetes pod security policies as Osquery table data.
-func PodSecurityPoliciesGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- psps, err := k8s.GetClient().PolicyV1beta1().PodSecurityPolicies().List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, psp := range psps.Items {
- item := &podSecurityPolicy{
- CommonFields: k8s.GetCommonFields(psp.ObjectMeta),
- PodSecurityPolicySpec: psp.Spec,
- }
- results = append(results, k8s.ToMap(item))
- }
-
- if psps.Continue == "" {
- break
- }
- options.Continue = psps.Continue
- }
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/policy/pod_security_policy_test.go b/infrastructure/kubequery/internal/k8s/policy/pod_security_policy_test.go
deleted file mode 100644
index e48f1a575e..0000000000
--- a/infrastructure/kubequery/internal/k8s/policy/pod_security_policy_test.go
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package policy
-
-import (
- "context"
- "testing"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/stretchr/testify/assert"
-)
-
-func TestPodSecurityPoliciesGenerate(t *testing.T) {
- psps, err := PodSecurityPoliciesGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{
- {
- "allow_privilege_escalation": "0",
- "annotations": "{\"apparmor.security.beta.kubernetes.io/allowedProfileNames\":\"runtime/default\",\"apparmor.security.beta.kubernetes.io/defaultProfileName\":\"runtime/default\",\"kubectl.kubernetes.io/last-applied-configuration\":\"{\\\"apiVersion\\\":\\\"policy/v1beta1\\\",\\\"kind\\\":\\\"PodSecurityPolicy\\\",\\\"metadata\\\":{\\\"annotations\\\":{\\\"apparmor.security.beta.kubernetes.io/allowedProfileNames\\\":\\\"runtime/default\\\",\\\"apparmor.security.beta.kubernetes.io/defaultProfileName\\\":\\\"runtime/default\\\",\\\"seccomp.security.alpha.kubernetes.io/allowedProfileNames\\\":\\\"docker/default,runtime/default\\\",\\\"seccomp.security.alpha.kubernetes.io/defaultProfileName\\\":\\\"runtime/default\\\"},\\\"name\\\":\\\"restricted\\\"},\\\"spec\\\":{\\\"allowPrivilegeEscalation\\\":false,\\\"fsGroup\\\":{\\\"ranges\\\":[{\\\"max\\\":65535,\\\"min\\\":1}],\\\"rule\\\":\\\"MustRunAs\\\"},\\\"hostIPC\\\":false,\\\"hostNetwork\\\":false,\\\"hostPID\\\":false,\\\"privileged\\\":false,\\\"readOnlyRootFilesystem\\\":false,\\\"requiredDropCapabilities\\\":[\\\"ALL\\\"],\\\"runAsUser\\\":{\\\"rule\\\":\\\"MustRunAsNonRoot\\\"},\\\"seLinux\\\":{\\\"rule\\\":\\\"RunAsAny\\\"},\\\"supplementalGroups\\\":{\\\"ranges\\\":[{\\\"max\\\":65535,\\\"min\\\":1}],\\\"rule\\\":\\\"MustRunAs\\\"},\\\"volumes\\\":[\\\"configMap\\\",\\\"emptyDir\\\",\\\"projected\\\",\\\"secret\\\",\\\"downwardAPI\\\",\\\"persistentVolumeClaim\\\"]}}\\n\",\"seccomp.security.alpha.kubernetes.io/allowedProfileNames\":\"docker/default,runtime/default\",\"seccomp.security.alpha.kubernetes.io/defaultProfileName\":\"runtime/default\"}",
- "cluster_uid": "b7fd8e77-93de-4742-9037-5db9a01e966a",
- "creation_timestamp": "1611164232",
- "fs_group": "{\"rule\":\"MustRunAs\",\"ranges\":[{\"min\":1,\"max\":65535}]}",
- "host_ipc": "0",
- "host_network": "0",
- "host_pid": "0",
- "name": "restricted",
- "privileged": "0",
- "read_only_root_filesystem": "0",
- "required_drop_capabilities": "[\"ALL\"]",
- "run_as_user": "{\"rule\":\"MustRunAsNonRoot\"}",
- "se_linux": "{\"rule\":\"RunAsAny\"}",
- "supplemental_groups": "{\"rule\":\"MustRunAs\",\"ranges\":[{\"min\":1,\"max\":65535}]}",
- "uid": "de6eb036-24db-4490-8811-590a2c2e1529",
- "volumes": "[\"configMap\",\"emptyDir\",\"projected\",\"secret\",\"downwardAPI\",\"persistentVolumeClaim\"]",
- },
- }, psps)
-}
diff --git a/infrastructure/kubequery/internal/k8s/policy/testdata/pod_disruption_budget_test.json b/infrastructure/kubequery/internal/k8s/policy/testdata/pod_disruption_budget_test.json
deleted file mode 100644
index ddfb9c077e..0000000000
--- a/infrastructure/kubequery/internal/k8s/policy/testdata/pod_disruption_budget_test.json
+++ /dev/null
@@ -1,89 +0,0 @@
-{
- "apiVersion": "policy/v1",
- "kind": "PodDisruptionBudget",
- "metadata": {
- "annotations": {
- "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"policy/v1\",\"kind\":\"PodDisruptionBudget\",\"metadata\":{\"annotations\":{},\"labels\":{\"app\":\"policy\",\"chart\":\"mixer\",\"heritage\":\"Tiller\",\"istio\":\"mixer\",\"istio-mixer-type\":\"policy\",\"release\":\"istio\",\"version\":\"1.5.1\"},\"name\":\"istio-policy\",\"namespace\":\"istio-system\"},\"spec\":{\"minAvailable\":1,\"selector\":{\"matchLabels\":{\"app\":\"policy\",\"istio\":\"mixer\",\"istio-mixer-type\":\"policy\",\"release\":\"istio\"}}}}\n"
- },
- "creationTimestamp": "2021-01-21T01:05:43Z",
- "generation": 1,
- "labels": {
- "app": "policy",
- "chart": "mixer",
- "heritage": "Tiller",
- "istio": "mixer",
- "istio-mixer-type": "policy",
- "release": "istio",
- "version": "1.5.1"
- },
- "managedFields": [
- {
- "apiVersion": "policy/v1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:metadata": {
- "f:annotations": {
- ".": {},
- "f:kubectl.kubernetes.io/last-applied-configuration": {}
- },
- "f:labels": {
- ".": {},
- "f:app": {},
- "f:chart": {},
- "f:heritage": {},
- "f:istio": {},
- "f:istio-mixer-type": {},
- "f:release": {},
- "f:version": {}
- }
- },
- "f:spec": {
- "f:minAvailable": {},
- "f:selector": {}
- }
- },
- "manager": "kubectl-client-side-apply",
- "operation": "Update",
- "time": "2021-01-21T01:05:43Z"
- },
- {
- "apiVersion": "policy/v1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:status": {
- "f:currentHealthy": {},
- "f:desiredHealthy": {},
- "f:expectedPods": {},
- "f:observedGeneration": {}
- }
- },
- "manager": "kube-controller-manager",
- "operation": "Update",
- "time": "2021-01-21T01:06:23Z"
- }
- ],
- "name": "istio-policy",
- "namespace": "istio-system",
- "resourceVersion": "451148",
- "selfLink": "/apis/policy/v1/namespaces/istio-system/poddisruptionbudgets/istio-policy",
- "uid": "77dc4487-d95d-40a9-8fdb-f3bbe334c4e3"
- },
- "spec": {
- "minAvailable": 1,
- "selector": {
- "matchLabels": {
- "app": "policy",
- "istio": "mixer",
- "istio-mixer-type": "policy",
- "release": "istio"
- }
- }
- },
- "status": {
- "currentHealthy": 1,
- "desiredHealthy": 1,
- "disruptionsAllowed": 0,
- "expectedPods": 1,
- "observedGeneration": 1
- }
-}
diff --git a/infrastructure/kubequery/internal/k8s/policy/testdata/pod_security_policy_test.json b/infrastructure/kubequery/internal/k8s/policy/testdata/pod_security_policy_test.json
deleted file mode 100644
index 1fb6795585..0000000000
--- a/infrastructure/kubequery/internal/k8s/policy/testdata/pod_security_policy_test.json
+++ /dev/null
@@ -1,96 +0,0 @@
-{
- "apiVersion": "policy/v1beta1",
- "kind": "PodSecurityPolicy",
- "metadata": {
- "annotations": {
- "apparmor.security.beta.kubernetes.io/allowedProfileNames": "runtime/default",
- "apparmor.security.beta.kubernetes.io/defaultProfileName": "runtime/default",
- "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"policy/v1beta1\",\"kind\":\"PodSecurityPolicy\",\"metadata\":{\"annotations\":{\"apparmor.security.beta.kubernetes.io/allowedProfileNames\":\"runtime/default\",\"apparmor.security.beta.kubernetes.io/defaultProfileName\":\"runtime/default\",\"seccomp.security.alpha.kubernetes.io/allowedProfileNames\":\"docker/default,runtime/default\",\"seccomp.security.alpha.kubernetes.io/defaultProfileName\":\"runtime/default\"},\"name\":\"restricted\"},\"spec\":{\"allowPrivilegeEscalation\":false,\"fsGroup\":{\"ranges\":[{\"max\":65535,\"min\":1}],\"rule\":\"MustRunAs\"},\"hostIPC\":false,\"hostNetwork\":false,\"hostPID\":false,\"privileged\":false,\"readOnlyRootFilesystem\":false,\"requiredDropCapabilities\":[\"ALL\"],\"runAsUser\":{\"rule\":\"MustRunAsNonRoot\"},\"seLinux\":{\"rule\":\"RunAsAny\"},\"supplementalGroups\":{\"ranges\":[{\"max\":65535,\"min\":1}],\"rule\":\"MustRunAs\"},\"volumes\":[\"configMap\",\"emptyDir\",\"projected\",\"secret\",\"downwardAPI\",\"persistentVolumeClaim\"]}}\n",
- "seccomp.security.alpha.kubernetes.io/allowedProfileNames": "docker/default,runtime/default",
- "seccomp.security.alpha.kubernetes.io/defaultProfileName": "runtime/default"
- },
- "creationTimestamp": "2021-01-20T17:37:12Z",
- "managedFields": [
- {
- "apiVersion": "policy/v1beta1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:metadata": {
- "f:annotations": {
- ".": {},
- "f:apparmor.security.beta.kubernetes.io/allowedProfileNames": {},
- "f:apparmor.security.beta.kubernetes.io/defaultProfileName": {},
- "f:kubectl.kubernetes.io/last-applied-configuration": {},
- "f:seccomp.security.alpha.kubernetes.io/allowedProfileNames": {},
- "f:seccomp.security.alpha.kubernetes.io/defaultProfileName": {}
- }
- },
- "f:spec": {
- "f:allowPrivilegeEscalation": {},
- "f:fsGroup": {
- "f:ranges": {},
- "f:rule": {}
- },
- "f:requiredDropCapabilities": {},
- "f:runAsUser": {
- "f:rule": {}
- },
- "f:seLinux": {
- "f:rule": {}
- },
- "f:supplementalGroups": {
- "f:ranges": {},
- "f:rule": {}
- },
- "f:volumes": {}
- }
- },
- "manager": "kubectl-client-side-apply",
- "operation": "Update",
- "time": "2021-01-20T17:37:12Z"
- }
- ],
- "name": "restricted",
- "resourceVersion": "421294",
- "selfLink": "/apis/policy/v1beta1/podsecuritypolicies/restricted",
- "uid": "de6eb036-24db-4490-8811-590a2c2e1529"
- },
- "spec": {
- "allowPrivilegeEscalation": false,
- "fsGroup": {
- "ranges": [
- {
- "max": 65535,
- "min": 1
- }
- ],
- "rule": "MustRunAs"
- },
- "requiredDropCapabilities": [
- "ALL"
- ],
- "runAsUser": {
- "rule": "MustRunAsNonRoot"
- },
- "seLinux": {
- "rule": "RunAsAny"
- },
- "supplementalGroups": {
- "ranges": [
- {
- "max": 65535,
- "min": 1
- }
- ],
- "rule": "MustRunAs"
- },
- "volumes": [
- "configMap",
- "emptyDir",
- "projected",
- "secret",
- "downwardAPI",
- "persistentVolumeClaim"
- ]
- }
-}
diff --git a/infrastructure/kubequery/internal/k8s/rbac/cluster_role_binding_subject.go b/infrastructure/kubequery/internal/k8s/rbac/cluster_role_binding_subject.go
deleted file mode 100644
index bffc63ca54..0000000000
--- a/infrastructure/kubequery/internal/k8s/rbac/cluster_role_binding_subject.go
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package rbac
-
-import (
- "context"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-type clusterRoleBindingSubject struct {
- k8s.CommonFields
- RoleAPIGroup string
- RoleName string
- RoleKind string
- SubjectName string
- SubjectKind string
- SubjectNamespace string
-}
-
-// ClusterRoleBindingSubjectColumns returns kubernetes cluster role binding subject fields as Osquery table columns.
-func ClusterRoleBindingSubjectColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&clusterRoleBindingSubject{})
-}
-
-// ClusterRoleBindingSubjectsGenerate generates the kubernetes cluster role binding subjects as Osquery table data.
-func ClusterRoleBindingSubjectsGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- crbs, err := k8s.GetClient().RbacV1().ClusterRoleBindings().List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, crb := range crbs.Items {
- for _, s := range crb.Subjects {
- item := &clusterRoleBindingSubject{
- CommonFields: k8s.GetCommonFields(crb.ObjectMeta),
- RoleAPIGroup: crb.RoleRef.APIGroup,
- RoleName: crb.RoleRef.Name,
- RoleKind: crb.RoleRef.Kind,
- SubjectName: s.Name,
- SubjectKind: s.Kind,
- SubjectNamespace: s.Namespace,
- }
- results = append(results, k8s.ToMap(item))
- }
- }
-
- if crbs.Continue == "" {
- break
- }
- options.Continue = crbs.Continue
- }
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/rbac/cluster_role_binding_subject_test.go b/infrastructure/kubequery/internal/k8s/rbac/cluster_role_binding_subject_test.go
deleted file mode 100644
index d710b7553d..0000000000
--- a/infrastructure/kubequery/internal/k8s/rbac/cluster_role_binding_subject_test.go
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package rbac
-
-import (
- "context"
- "testing"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/stretchr/testify/assert"
-)
-
-func TestClusterRoleBindingSubjectsGenerate(t *testing.T) {
- crbss, err := ClusterRoleBindingSubjectsGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{
- {
- "annotations": "{\"kubectl.kubernetes.io/last-applied-configuration\":\"{\\\"apiVersion\\\":\\\"rbac.authorization.k8s.io/v1\\\",\\\"kind\\\":\\\"ClusterRoleBinding\\\",\\\"metadata\\\":{\\\"annotations\\\":{},\\\"name\\\":\\\"kubernetes-dashboard\\\"},\\\"roleRef\\\":{\\\"apiGroup\\\":\\\"rbac.authorization.k8s.io\\\",\\\"kind\\\":\\\"ClusterRole\\\",\\\"name\\\":\\\"kubernetes-dashboard\\\"},\\\"subjects\\\":[{\\\"kind\\\":\\\"ServiceAccount\\\",\\\"name\\\":\\\"kubernetes-dashboard\\\",\\\"namespace\\\":\\\"kube-system\\\"}]}\\n\"}",
- "cluster_uid": "a7fd8e77-93de-4742-9037-5db9a01e966a",
- "creation_timestamp": "1611190911",
- "name": "kubernetes-dashboard",
- "role_api_group": "rbac.authorization.k8s.io",
- "role_kind": "ClusterRole",
- "role_name": "kubernetes-dashboard",
- "subject_kind": "ServiceAccount",
- "subject_name": "kubernetes-dashboard",
- "subject_namespace": "kube-system",
- "uid": "7e3bf161-3a4e-495d-98a8-f71248d0ba36",
- },
- {
- "annotations": "{\"kubectl.kubernetes.io/last-applied-configuration\":\"{\\\"apiVersion\\\":\\\"rbac.authorization.k8s.io/v1\\\",\\\"kind\\\":\\\"ClusterRoleBinding\\\",\\\"metadata\\\":{\\\"annotations\\\":{},\\\"name\\\":\\\"nginx-ingress-microk8s\\\"},\\\"roleRef\\\":{\\\"apiGroup\\\":\\\"rbac.authorization.k8s.io\\\",\\\"kind\\\":\\\"ClusterRole\\\",\\\"name\\\":\\\"nginx-ingress-microk8s-clusterrole\\\"},\\\"subjects\\\":[{\\\"kind\\\":\\\"ServiceAccount\\\",\\\"name\\\":\\\"nginx-ingress-microk8s-serviceaccount\\\",\\\"namespace\\\":\\\"ingress\\\"}]}\\n\"}",
- "cluster_uid": "a7fd8e77-93de-4742-9037-5db9a01e966a",
- "creation_timestamp": "1611191047",
- "name": "nginx-ingress-microk8s",
- "role_api_group": "rbac.authorization.k8s.io",
- "role_kind": "ClusterRole",
- "role_name": "nginx-ingress-microk8s-clusterrole",
- "subject_kind": "ServiceAccount",
- "subject_name": "nginx-ingress-microk8s-serviceaccount",
- "subject_namespace": "ingress",
- "uid": "aa9c6e0e-3dd4-4da3-936a-a6edea62c7b7",
- },
- }, crbss)
-}
diff --git a/infrastructure/kubequery/internal/k8s/rbac/cluster_role_policy_rule.go b/infrastructure/kubequery/internal/k8s/rbac/cluster_role_policy_rule.go
deleted file mode 100644
index c784bf64ef..0000000000
--- a/infrastructure/kubequery/internal/k8s/rbac/cluster_role_policy_rule.go
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package rbac
-
-import (
- "context"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/api/rbac/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-type clusterRolePolicyRule struct {
- k8s.CommonFields
- v1.PolicyRule
- AggregationRule *v1.AggregationRule
-}
-
-// ClusterRolePolicyRuleColumns returns kubernetes cluster role policy rule fields as Osquery table columns.
-func ClusterRolePolicyRuleColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&clusterRolePolicyRule{})
-}
-
-// ClusterRolePolicyRulesGenerate generates the kubernetes cluster role policy rules as Osquery table data.
-func ClusterRolePolicyRulesGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- crs, err := k8s.GetClient().RbacV1().ClusterRoles().List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, cr := range crs.Items {
- for _, r := range cr.Rules {
- item := &clusterRolePolicyRule{
- CommonFields: k8s.GetCommonFields(cr.ObjectMeta),
- PolicyRule: r,
- AggregationRule: cr.AggregationRule,
- }
- results = append(results, k8s.ToMap(item))
- }
- }
-
- if crs.Continue == "" {
- break
- }
- options.Continue = crs.Continue
- }
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/rbac/cluster_role_policy_rule_test.go b/infrastructure/kubequery/internal/k8s/rbac/cluster_role_policy_rule_test.go
deleted file mode 100644
index 17e0014776..0000000000
--- a/infrastructure/kubequery/internal/k8s/rbac/cluster_role_policy_rule_test.go
+++ /dev/null
@@ -1,102 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package rbac
-
-import (
- "context"
- "testing"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/stretchr/testify/assert"
-)
-
-func TestClusterRolePolicyRulesGenerate(t *testing.T) {
- crprs, err := ClusterRolePolicyRulesGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{
- {
- "annotations": "{\"kubectl.kubernetes.io/last-applied-configuration\":\"{\\\"apiVersion\\\":\\\"rbac.authorization.k8s.io/v1\\\",\\\"kind\\\":\\\"ClusterRole\\\",\\\"metadata\\\":{\\\"annotations\\\":{},\\\"labels\\\":{\\\"app\\\":\\\"kiali\\\",\\\"chart\\\":\\\"kiali\\\",\\\"heritage\\\":\\\"Tiller\\\",\\\"release\\\":\\\"istio\\\"},\\\"name\\\":\\\"kiali-viewer\\\"},\\\"rules\\\":[{\\\"apiGroups\\\":[\\\"\\\"],\\\"resources\\\":[\\\"configmaps\\\",\\\"endpoints\\\",\\\"namespaces\\\",\\\"nodes\\\",\\\"pods\\\",\\\"pods/log\\\",\\\"replicationcontrollers\\\",\\\"services\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"list\\\",\\\"watch\\\"]},{\\\"apiGroups\\\":[\\\"extensions\\\",\\\"apps\\\"],\\\"resources\\\":[\\\"deployments\\\",\\\"replicasets\\\",\\\"statefulsets\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"list\\\",\\\"watch\\\"]},{\\\"apiGroups\\\":[\\\"autoscaling\\\"],\\\"resources\\\":[\\\"horizontalpodautoscalers\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"list\\\",\\\"watch\\\"]},{\\\"apiGroups\\\":[\\\"batch\\\"],\\\"resources\\\":[\\\"cronjobs\\\",\\\"jobs\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"list\\\",\\\"watch\\\"]},{\\\"apiGroups\\\":[\\\"config.istio.io\\\",\\\"networking.istio.io\\\",\\\"authentication.istio.io\\\",\\\"rbac.istio.io\\\",\\\"security.istio.io\\\"],\\\"resources\\\":[\\\"*\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"list\\\",\\\"watch\\\"]},{\\\"apiGroups\\\":[\\\"monitoring.kiali.io\\\"],\\\"resources\\\":[\\\"monitoringdashboards\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"list\\\"]}]}\\n\"}",
- "api_groups": "[\"\"]",
- "cluster_uid": "a7fd8e77-93de-4742-9037-5db9a01e966a",
- "creation_timestamp": "1611191143",
- "labels": "{\"app\":\"kiali\",\"chart\":\"kiali\",\"heritage\":\"Tiller\",\"release\":\"istio\"}",
- "name": "kiali-viewer",
- "resources": "[\"configmaps\",\"endpoints\",\"namespaces\",\"nodes\",\"pods\",\"pods/log\",\"replicationcontrollers\",\"services\"]",
- "uid": "b5d5ca79-f4e3-4478-b954-fe62a146f279",
- "verbs": "[\"get\",\"list\",\"watch\"]",
- },
- {
- "annotations": "{\"kubectl.kubernetes.io/last-applied-configuration\":\"{\\\"apiVersion\\\":\\\"rbac.authorization.k8s.io/v1\\\",\\\"kind\\\":\\\"ClusterRole\\\",\\\"metadata\\\":{\\\"annotations\\\":{},\\\"labels\\\":{\\\"app\\\":\\\"kiali\\\",\\\"chart\\\":\\\"kiali\\\",\\\"heritage\\\":\\\"Tiller\\\",\\\"release\\\":\\\"istio\\\"},\\\"name\\\":\\\"kiali-viewer\\\"},\\\"rules\\\":[{\\\"apiGroups\\\":[\\\"\\\"],\\\"resources\\\":[\\\"configmaps\\\",\\\"endpoints\\\",\\\"namespaces\\\",\\\"nodes\\\",\\\"pods\\\",\\\"pods/log\\\",\\\"replicationcontrollers\\\",\\\"services\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"list\\\",\\\"watch\\\"]},{\\\"apiGroups\\\":[\\\"extensions\\\",\\\"apps\\\"],\\\"resources\\\":[\\\"deployments\\\",\\\"replicasets\\\",\\\"statefulsets\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"list\\\",\\\"watch\\\"]},{\\\"apiGroups\\\":[\\\"autoscaling\\\"],\\\"resources\\\":[\\\"horizontalpodautoscalers\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"list\\\",\\\"watch\\\"]},{\\\"apiGroups\\\":[\\\"batch\\\"],\\\"resources\\\":[\\\"cronjobs\\\",\\\"jobs\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"list\\\",\\\"watch\\\"]},{\\\"apiGroups\\\":[\\\"config.istio.io\\\",\\\"networking.istio.io\\\",\\\"authentication.istio.io\\\",\\\"rbac.istio.io\\\",\\\"security.istio.io\\\"],\\\"resources\\\":[\\\"*\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"list\\\",\\\"watch\\\"]},{\\\"apiGroups\\\":[\\\"monitoring.kiali.io\\\"],\\\"resources\\\":[\\\"monitoringdashboards\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"list\\\"]}]}\\n\"}",
- "api_groups": "[\"extensions\",\"apps\"]",
- "cluster_uid": "a7fd8e77-93de-4742-9037-5db9a01e966a",
- "creation_timestamp": "1611191143",
- "labels": "{\"app\":\"kiali\",\"chart\":\"kiali\",\"heritage\":\"Tiller\",\"release\":\"istio\"}",
- "name": "kiali-viewer",
- "resources": "[\"deployments\",\"replicasets\",\"statefulsets\"]",
- "uid": "b5d5ca79-f4e3-4478-b954-fe62a146f279",
- "verbs": "[\"get\",\"list\",\"watch\"]",
- },
- {
- "annotations": "{\"kubectl.kubernetes.io/last-applied-configuration\":\"{\\\"apiVersion\\\":\\\"rbac.authorization.k8s.io/v1\\\",\\\"kind\\\":\\\"ClusterRole\\\",\\\"metadata\\\":{\\\"annotations\\\":{},\\\"labels\\\":{\\\"app\\\":\\\"kiali\\\",\\\"chart\\\":\\\"kiali\\\",\\\"heritage\\\":\\\"Tiller\\\",\\\"release\\\":\\\"istio\\\"},\\\"name\\\":\\\"kiali-viewer\\\"},\\\"rules\\\":[{\\\"apiGroups\\\":[\\\"\\\"],\\\"resources\\\":[\\\"configmaps\\\",\\\"endpoints\\\",\\\"namespaces\\\",\\\"nodes\\\",\\\"pods\\\",\\\"pods/log\\\",\\\"replicationcontrollers\\\",\\\"services\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"list\\\",\\\"watch\\\"]},{\\\"apiGroups\\\":[\\\"extensions\\\",\\\"apps\\\"],\\\"resources\\\":[\\\"deployments\\\",\\\"replicasets\\\",\\\"statefulsets\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"list\\\",\\\"watch\\\"]},{\\\"apiGroups\\\":[\\\"autoscaling\\\"],\\\"resources\\\":[\\\"horizontalpodautoscalers\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"list\\\",\\\"watch\\\"]},{\\\"apiGroups\\\":[\\\"batch\\\"],\\\"resources\\\":[\\\"cronjobs\\\",\\\"jobs\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"list\\\",\\\"watch\\\"]},{\\\"apiGroups\\\":[\\\"config.istio.io\\\",\\\"networking.istio.io\\\",\\\"authentication.istio.io\\\",\\\"rbac.istio.io\\\",\\\"security.istio.io\\\"],\\\"resources\\\":[\\\"*\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"list\\\",\\\"watch\\\"]},{\\\"apiGroups\\\":[\\\"monitoring.kiali.io\\\"],\\\"resources\\\":[\\\"monitoringdashboards\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"list\\\"]}]}\\n\"}",
- "api_groups": "[\"autoscaling\"]",
- "cluster_uid": "a7fd8e77-93de-4742-9037-5db9a01e966a",
- "creation_timestamp": "1611191143",
- "labels": "{\"app\":\"kiali\",\"chart\":\"kiali\",\"heritage\":\"Tiller\",\"release\":\"istio\"}",
- "name": "kiali-viewer",
- "resources": "[\"horizontalpodautoscalers\"]",
- "uid": "b5d5ca79-f4e3-4478-b954-fe62a146f279",
- "verbs": "[\"get\",\"list\",\"watch\"]",
- },
- {
- "annotations": "{\"kubectl.kubernetes.io/last-applied-configuration\":\"{\\\"apiVersion\\\":\\\"rbac.authorization.k8s.io/v1\\\",\\\"kind\\\":\\\"ClusterRole\\\",\\\"metadata\\\":{\\\"annotations\\\":{},\\\"labels\\\":{\\\"app\\\":\\\"kiali\\\",\\\"chart\\\":\\\"kiali\\\",\\\"heritage\\\":\\\"Tiller\\\",\\\"release\\\":\\\"istio\\\"},\\\"name\\\":\\\"kiali-viewer\\\"},\\\"rules\\\":[{\\\"apiGroups\\\":[\\\"\\\"],\\\"resources\\\":[\\\"configmaps\\\",\\\"endpoints\\\",\\\"namespaces\\\",\\\"nodes\\\",\\\"pods\\\",\\\"pods/log\\\",\\\"replicationcontrollers\\\",\\\"services\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"list\\\",\\\"watch\\\"]},{\\\"apiGroups\\\":[\\\"extensions\\\",\\\"apps\\\"],\\\"resources\\\":[\\\"deployments\\\",\\\"replicasets\\\",\\\"statefulsets\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"list\\\",\\\"watch\\\"]},{\\\"apiGroups\\\":[\\\"autoscaling\\\"],\\\"resources\\\":[\\\"horizontalpodautoscalers\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"list\\\",\\\"watch\\\"]},{\\\"apiGroups\\\":[\\\"batch\\\"],\\\"resources\\\":[\\\"cronjobs\\\",\\\"jobs\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"list\\\",\\\"watch\\\"]},{\\\"apiGroups\\\":[\\\"config.istio.io\\\",\\\"networking.istio.io\\\",\\\"authentication.istio.io\\\",\\\"rbac.istio.io\\\",\\\"security.istio.io\\\"],\\\"resources\\\":[\\\"*\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"list\\\",\\\"watch\\\"]},{\\\"apiGroups\\\":[\\\"monitoring.kiali.io\\\"],\\\"resources\\\":[\\\"monitoringdashboards\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"list\\\"]}]}\\n\"}",
- "api_groups": "[\"batch\"]",
- "cluster_uid": "a7fd8e77-93de-4742-9037-5db9a01e966a",
- "creation_timestamp": "1611191143",
- "labels": "{\"app\":\"kiali\",\"chart\":\"kiali\",\"heritage\":\"Tiller\",\"release\":\"istio\"}",
- "name": "kiali-viewer",
- "resources": "[\"cronjobs\",\"jobs\"]",
- "uid": "b5d5ca79-f4e3-4478-b954-fe62a146f279",
- "verbs": "[\"get\",\"list\",\"watch\"]",
- },
- {
- "annotations": "{\"kubectl.kubernetes.io/last-applied-configuration\":\"{\\\"apiVersion\\\":\\\"rbac.authorization.k8s.io/v1\\\",\\\"kind\\\":\\\"ClusterRole\\\",\\\"metadata\\\":{\\\"annotations\\\":{},\\\"labels\\\":{\\\"app\\\":\\\"kiali\\\",\\\"chart\\\":\\\"kiali\\\",\\\"heritage\\\":\\\"Tiller\\\",\\\"release\\\":\\\"istio\\\"},\\\"name\\\":\\\"kiali-viewer\\\"},\\\"rules\\\":[{\\\"apiGroups\\\":[\\\"\\\"],\\\"resources\\\":[\\\"configmaps\\\",\\\"endpoints\\\",\\\"namespaces\\\",\\\"nodes\\\",\\\"pods\\\",\\\"pods/log\\\",\\\"replicationcontrollers\\\",\\\"services\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"list\\\",\\\"watch\\\"]},{\\\"apiGroups\\\":[\\\"extensions\\\",\\\"apps\\\"],\\\"resources\\\":[\\\"deployments\\\",\\\"replicasets\\\",\\\"statefulsets\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"list\\\",\\\"watch\\\"]},{\\\"apiGroups\\\":[\\\"autoscaling\\\"],\\\"resources\\\":[\\\"horizontalpodautoscalers\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"list\\\",\\\"watch\\\"]},{\\\"apiGroups\\\":[\\\"batch\\\"],\\\"resources\\\":[\\\"cronjobs\\\",\\\"jobs\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"list\\\",\\\"watch\\\"]},{\\\"apiGroups\\\":[\\\"config.istio.io\\\",\\\"networking.istio.io\\\",\\\"authentication.istio.io\\\",\\\"rbac.istio.io\\\",\\\"security.istio.io\\\"],\\\"resources\\\":[\\\"*\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"list\\\",\\\"watch\\\"]},{\\\"apiGroups\\\":[\\\"monitoring.kiali.io\\\"],\\\"resources\\\":[\\\"monitoringdashboards\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"list\\\"]}]}\\n\"}",
- "api_groups": "[\"config.istio.io\",\"networking.istio.io\",\"authentication.istio.io\",\"rbac.istio.io\",\"security.istio.io\"]",
- "cluster_uid": "a7fd8e77-93de-4742-9037-5db9a01e966a",
- "creation_timestamp": "1611191143",
- "labels": "{\"app\":\"kiali\",\"chart\":\"kiali\",\"heritage\":\"Tiller\",\"release\":\"istio\"}",
- "name": "kiali-viewer",
- "resources": "[\"*\"]",
- "uid": "b5d5ca79-f4e3-4478-b954-fe62a146f279",
- "verbs": "[\"get\",\"list\",\"watch\"]",
- },
- {
- "annotations": "{\"kubectl.kubernetes.io/last-applied-configuration\":\"{\\\"apiVersion\\\":\\\"rbac.authorization.k8s.io/v1\\\",\\\"kind\\\":\\\"ClusterRole\\\",\\\"metadata\\\":{\\\"annotations\\\":{},\\\"labels\\\":{\\\"app\\\":\\\"kiali\\\",\\\"chart\\\":\\\"kiali\\\",\\\"heritage\\\":\\\"Tiller\\\",\\\"release\\\":\\\"istio\\\"},\\\"name\\\":\\\"kiali-viewer\\\"},\\\"rules\\\":[{\\\"apiGroups\\\":[\\\"\\\"],\\\"resources\\\":[\\\"configmaps\\\",\\\"endpoints\\\",\\\"namespaces\\\",\\\"nodes\\\",\\\"pods\\\",\\\"pods/log\\\",\\\"replicationcontrollers\\\",\\\"services\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"list\\\",\\\"watch\\\"]},{\\\"apiGroups\\\":[\\\"extensions\\\",\\\"apps\\\"],\\\"resources\\\":[\\\"deployments\\\",\\\"replicasets\\\",\\\"statefulsets\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"list\\\",\\\"watch\\\"]},{\\\"apiGroups\\\":[\\\"autoscaling\\\"],\\\"resources\\\":[\\\"horizontalpodautoscalers\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"list\\\",\\\"watch\\\"]},{\\\"apiGroups\\\":[\\\"batch\\\"],\\\"resources\\\":[\\\"cronjobs\\\",\\\"jobs\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"list\\\",\\\"watch\\\"]},{\\\"apiGroups\\\":[\\\"config.istio.io\\\",\\\"networking.istio.io\\\",\\\"authentication.istio.io\\\",\\\"rbac.istio.io\\\",\\\"security.istio.io\\\"],\\\"resources\\\":[\\\"*\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"list\\\",\\\"watch\\\"]},{\\\"apiGroups\\\":[\\\"monitoring.kiali.io\\\"],\\\"resources\\\":[\\\"monitoringdashboards\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"list\\\"]}]}\\n\"}",
- "api_groups": "[\"monitoring.kiali.io\"]",
- "cluster_uid": "a7fd8e77-93de-4742-9037-5db9a01e966a",
- "creation_timestamp": "1611191143",
- "labels": "{\"app\":\"kiali\",\"chart\":\"kiali\",\"heritage\":\"Tiller\",\"release\":\"istio\"}",
- "name": "kiali-viewer",
- "resources": "[\"monitoringdashboards\"]",
- "uid": "b5d5ca79-f4e3-4478-b954-fe62a146f279",
- "verbs": "[\"get\",\"list\"]",
- },
- {
- "annotations": "{\"kubectl.kubernetes.io/last-applied-configuration\":\"{\\\"apiVersion\\\":\\\"rbac.authorization.k8s.io/v1\\\",\\\"kind\\\":\\\"ClusterRole\\\",\\\"metadata\\\":{\\\"annotations\\\":{},\\\"labels\\\":{\\\"k8s-app\\\":\\\"kubernetes-dashboard\\\"},\\\"name\\\":\\\"kubernetes-dashboard\\\"},\\\"rules\\\":[{\\\"apiGroups\\\":[\\\"metrics.k8s.io\\\"],\\\"resources\\\":[\\\"pods\\\",\\\"nodes\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"list\\\",\\\"watch\\\"]}]}\\n\"}",
- "api_groups": "[\"metrics.k8s.io\"]",
- "cluster_uid": "a7fd8e77-93de-4742-9037-5db9a01e966a",
- "creation_timestamp": "1611190911",
- "labels": "{\"k8s-app\":\"kubernetes-dashboard\"}",
- "name": "kubernetes-dashboard",
- "resources": "[\"pods\",\"nodes\"]",
- "uid": "5afb084d-e4da-4207-844d-d3a2e002ecda",
- "verbs": "[\"get\",\"list\",\"watch\"]",
- },
- }, crprs)
-}
diff --git a/infrastructure/kubequery/internal/k8s/rbac/init_test.go b/infrastructure/kubequery/internal/k8s/rbac/init_test.go
deleted file mode 100644
index 570f452892..0000000000
--- a/infrastructure/kubequery/internal/k8s/rbac/init_test.go
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package rbac
-
-import (
- "encoding/json"
- "io/ioutil"
- "path/filepath"
-
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/api/rbac/v1"
- "k8s.io/apimachinery/pkg/types"
- "k8s.io/client-go/kubernetes/fake"
-)
-
-func loadTestResource(name string, v interface{}) {
- path := filepath.Join("testdata", name)
- data, err := ioutil.ReadFile(path)
- if err != nil {
- panic(err)
- }
-
- err = json.Unmarshal(data, v)
- if err != nil {
- panic(err)
- }
-}
-
-func init() {
- rs := &v1.Role{}
- loadTestResource("role_policy_rule_test.json", rs)
- rbs := &v1.RoleBinding{}
- loadTestResource("role_binding_subject_test.json", rbs)
- crs := &v1.ClusterRoleList{}
- loadTestResource("cluster_role_policy_rule_test.json", crs)
- crbs := &v1.ClusterRoleBindingList{}
- loadTestResource("cluster_role_binding_subject_test.json", crbs)
-
- k8s.SetClient(fake.NewSimpleClientset(rs, rbs, crs, crbs), types.UID("a7fd8e77-93de-4742-9037-5db9a01e966a"), "")
-}
diff --git a/infrastructure/kubequery/internal/k8s/rbac/role_binding_subject.go b/infrastructure/kubequery/internal/k8s/rbac/role_binding_subject.go
deleted file mode 100644
index c08b4225cd..0000000000
--- a/infrastructure/kubequery/internal/k8s/rbac/role_binding_subject.go
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package rbac
-
-import (
- "context"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-type roleBindingSubject struct {
- k8s.CommonNamespacedFields
- RoleName string
- RoleKind string
- SubjectName string
- SubjectKind string
- SubjectNamespace string
-}
-
-// RoleBindingSubjectColumns returns kubernetes role binding subject fields as Osquery table columns.
-func RoleBindingSubjectColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&roleBindingSubject{})
-}
-
-// RoleBindingSubjectsGenerate generates the kubernetes role binding subjects as Osquery table data.
-func RoleBindingSubjectsGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- rbs, err := k8s.GetClient().RbacV1().RoleBindings(metav1.NamespaceAll).List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, rb := range rbs.Items {
- for _, s := range rb.Subjects {
- item := &roleBindingSubject{
- CommonNamespacedFields: k8s.GetCommonNamespacedFields(rb.ObjectMeta),
- RoleName: rb.RoleRef.Name,
- RoleKind: rb.RoleRef.Kind,
- SubjectName: s.Name,
- SubjectKind: s.Kind,
- SubjectNamespace: s.Namespace,
- }
- results = append(results, k8s.ToMap(item))
- }
- }
-
- if rbs.Continue == "" {
- break
- }
- options.Continue = rbs.Continue
- }
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/rbac/role_binding_subject_test.go b/infrastructure/kubequery/internal/k8s/rbac/role_binding_subject_test.go
deleted file mode 100644
index c09e15e22c..0000000000
--- a/infrastructure/kubequery/internal/k8s/rbac/role_binding_subject_test.go
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package rbac
-
-import (
- "context"
- "testing"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/stretchr/testify/assert"
-)
-
-func TestRoleBindingSubjectsGenerate(t *testing.T) {
- rbss, err := RoleBindingSubjectsGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{
- {
- "annotations": "{\"kubectl.kubernetes.io/last-applied-configuration\":\"{\\\"apiVersion\\\":\\\"rbac.authorization.k8s.io/v1\\\",\\\"kind\\\":\\\"RoleBinding\\\",\\\"metadata\\\":{\\\"annotations\\\":{},\\\"labels\\\":{\\\"k8s-app\\\":\\\"kubernetes-dashboard\\\"},\\\"name\\\":\\\"kubernetes-dashboard\\\",\\\"namespace\\\":\\\"kube-system\\\"},\\\"roleRef\\\":{\\\"apiGroup\\\":\\\"rbac.authorization.k8s.io\\\",\\\"kind\\\":\\\"Role\\\",\\\"name\\\":\\\"kubernetes-dashboard\\\"},\\\"subjects\\\":[{\\\"kind\\\":\\\"ServiceAccount\\\",\\\"name\\\":\\\"kubernetes-dashboard\\\",\\\"namespace\\\":\\\"kube-system\\\"}]}\\n\"}",
- "cluster_uid": "a7fd8e77-93de-4742-9037-5db9a01e966a",
- "creation_timestamp": "1611190911",
- "labels": "{\"k8s-app\":\"kubernetes-dashboard\"}",
- "name": "kubernetes-dashboard",
- "namespace": "kube-system",
- "role_kind": "Role",
- "role_name": "kubernetes-dashboard",
- "subject_kind": "ServiceAccount",
- "subject_name": "kubernetes-dashboard",
- "subject_namespace": "kube-system",
- "uid": "216b24d7-0611-4cb9-991b-fad53856241d",
- },
- }, rbss)
-}
diff --git a/infrastructure/kubequery/internal/k8s/rbac/role_policy_rule.go b/infrastructure/kubequery/internal/k8s/rbac/role_policy_rule.go
deleted file mode 100644
index ccc23e9ec4..0000000000
--- a/infrastructure/kubequery/internal/k8s/rbac/role_policy_rule.go
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package rbac
-
-import (
- "context"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/api/rbac/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-type rolePolicyRule struct {
- k8s.CommonNamespacedFields
- v1.PolicyRule
-}
-
-// RolePolicyRuleColumns returns kubernetes role policy rule fields as Osquery table columns.
-func RolePolicyRuleColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&rolePolicyRule{})
-}
-
-// RolePolicyRulesGenerate generates the kubernetes role policy rules as Osquery table data.
-func RolePolicyRulesGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- roles, err := k8s.GetClient().RbacV1().Roles(metav1.NamespaceAll).List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, r := range roles.Items {
- for _, p := range r.Rules {
- item := &rolePolicyRule{
- CommonNamespacedFields: k8s.GetCommonNamespacedFields(r.ObjectMeta),
- PolicyRule: p,
- }
- results = append(results, k8s.ToMap(item))
- }
- }
-
- if roles.Continue == "" {
- break
- }
- options.Continue = roles.Continue
- }
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/rbac/role_policy_rule_test.go b/infrastructure/kubequery/internal/k8s/rbac/role_policy_rule_test.go
deleted file mode 100644
index 443d85a87d..0000000000
--- a/infrastructure/kubequery/internal/k8s/rbac/role_policy_rule_test.go
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package rbac
-
-import (
- "context"
- "testing"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/stretchr/testify/assert"
-)
-
-func TestRolePolicyRulesGenerate(t *testing.T) {
- rprs, err := RolePolicyRulesGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{
- {
- "annotations": "{\"kubectl.kubernetes.io/last-applied-configuration\":\"{\\\"apiVersion\\\":\\\"rbac.authorization.k8s.io/v1\\\",\\\"kind\\\":\\\"Role\\\",\\\"metadata\\\":{\\\"annotations\\\":{},\\\"labels\\\":{\\\"k8s-app\\\":\\\"kubernetes-dashboard\\\"},\\\"name\\\":\\\"kubernetes-dashboard\\\",\\\"namespace\\\":\\\"kube-system\\\"},\\\"rules\\\":[{\\\"apiGroups\\\":[\\\"\\\"],\\\"resourceNames\\\":[\\\"kubernetes-dashboard-key-holder\\\",\\\"kubernetes-dashboard-certs\\\",\\\"kubernetes-dashboard-csrf\\\"],\\\"resources\\\":[\\\"secrets\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"update\\\",\\\"delete\\\"]},{\\\"apiGroups\\\":[\\\"\\\"],\\\"resourceNames\\\":[\\\"kubernetes-dashboard-settings\\\"],\\\"resources\\\":[\\\"configmaps\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"update\\\"]},{\\\"apiGroups\\\":[\\\"\\\"],\\\"resourceNames\\\":[\\\"heapster\\\",\\\"dashboard-metrics-scraper\\\"],\\\"resources\\\":[\\\"services\\\"],\\\"verbs\\\":[\\\"proxy\\\"]},{\\\"apiGroups\\\":[\\\"\\\"],\\\"resourceNames\\\":[\\\"heapster\\\",\\\"http:heapster:\\\",\\\"https:heapster:\\\",\\\"dashboard-metrics-scraper\\\",\\\"http:dashboard-metrics-scraper\\\"],\\\"resources\\\":[\\\"services/proxy\\\"],\\\"verbs\\\":[\\\"get\\\"]}]}\\n\"}",
- "api_groups": "[\"\"]",
- "cluster_uid": "a7fd8e77-93de-4742-9037-5db9a01e966a",
- "creation_timestamp": "1611190911",
- "labels": "{\"k8s-app\":\"kubernetes-dashboard\"}",
- "name": "kubernetes-dashboard",
- "namespace": "kube-system",
- "resource_names": "[\"kubernetes-dashboard-key-holder\",\"kubernetes-dashboard-certs\",\"kubernetes-dashboard-csrf\"]",
- "resources": "[\"secrets\"]",
- "uid": "74e02baa-2c11-413f-828a-2cbe39011469",
- "verbs": "[\"get\",\"update\",\"delete\"]",
- },
- {
- "annotations": "{\"kubectl.kubernetes.io/last-applied-configuration\":\"{\\\"apiVersion\\\":\\\"rbac.authorization.k8s.io/v1\\\",\\\"kind\\\":\\\"Role\\\",\\\"metadata\\\":{\\\"annotations\\\":{},\\\"labels\\\":{\\\"k8s-app\\\":\\\"kubernetes-dashboard\\\"},\\\"name\\\":\\\"kubernetes-dashboard\\\",\\\"namespace\\\":\\\"kube-system\\\"},\\\"rules\\\":[{\\\"apiGroups\\\":[\\\"\\\"],\\\"resourceNames\\\":[\\\"kubernetes-dashboard-key-holder\\\",\\\"kubernetes-dashboard-certs\\\",\\\"kubernetes-dashboard-csrf\\\"],\\\"resources\\\":[\\\"secrets\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"update\\\",\\\"delete\\\"]},{\\\"apiGroups\\\":[\\\"\\\"],\\\"resourceNames\\\":[\\\"kubernetes-dashboard-settings\\\"],\\\"resources\\\":[\\\"configmaps\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"update\\\"]},{\\\"apiGroups\\\":[\\\"\\\"],\\\"resourceNames\\\":[\\\"heapster\\\",\\\"dashboard-metrics-scraper\\\"],\\\"resources\\\":[\\\"services\\\"],\\\"verbs\\\":[\\\"proxy\\\"]},{\\\"apiGroups\\\":[\\\"\\\"],\\\"resourceNames\\\":[\\\"heapster\\\",\\\"http:heapster:\\\",\\\"https:heapster:\\\",\\\"dashboard-metrics-scraper\\\",\\\"http:dashboard-metrics-scraper\\\"],\\\"resources\\\":[\\\"services/proxy\\\"],\\\"verbs\\\":[\\\"get\\\"]}]}\\n\"}",
- "api_groups": "[\"\"]",
- "cluster_uid": "a7fd8e77-93de-4742-9037-5db9a01e966a",
- "creation_timestamp": "1611190911",
- "labels": "{\"k8s-app\":\"kubernetes-dashboard\"}",
- "name": "kubernetes-dashboard",
- "namespace": "kube-system",
- "resource_names": "[\"kubernetes-dashboard-settings\"]",
- "resources": "[\"configmaps\"]",
- "uid": "74e02baa-2c11-413f-828a-2cbe39011469",
- "verbs": "[\"get\",\"update\"]",
- },
- {
- "annotations": "{\"kubectl.kubernetes.io/last-applied-configuration\":\"{\\\"apiVersion\\\":\\\"rbac.authorization.k8s.io/v1\\\",\\\"kind\\\":\\\"Role\\\",\\\"metadata\\\":{\\\"annotations\\\":{},\\\"labels\\\":{\\\"k8s-app\\\":\\\"kubernetes-dashboard\\\"},\\\"name\\\":\\\"kubernetes-dashboard\\\",\\\"namespace\\\":\\\"kube-system\\\"},\\\"rules\\\":[{\\\"apiGroups\\\":[\\\"\\\"],\\\"resourceNames\\\":[\\\"kubernetes-dashboard-key-holder\\\",\\\"kubernetes-dashboard-certs\\\",\\\"kubernetes-dashboard-csrf\\\"],\\\"resources\\\":[\\\"secrets\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"update\\\",\\\"delete\\\"]},{\\\"apiGroups\\\":[\\\"\\\"],\\\"resourceNames\\\":[\\\"kubernetes-dashboard-settings\\\"],\\\"resources\\\":[\\\"configmaps\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"update\\\"]},{\\\"apiGroups\\\":[\\\"\\\"],\\\"resourceNames\\\":[\\\"heapster\\\",\\\"dashboard-metrics-scraper\\\"],\\\"resources\\\":[\\\"services\\\"],\\\"verbs\\\":[\\\"proxy\\\"]},{\\\"apiGroups\\\":[\\\"\\\"],\\\"resourceNames\\\":[\\\"heapster\\\",\\\"http:heapster:\\\",\\\"https:heapster:\\\",\\\"dashboard-metrics-scraper\\\",\\\"http:dashboard-metrics-scraper\\\"],\\\"resources\\\":[\\\"services/proxy\\\"],\\\"verbs\\\":[\\\"get\\\"]}]}\\n\"}",
- "api_groups": "[\"\"]",
- "cluster_uid": "a7fd8e77-93de-4742-9037-5db9a01e966a",
- "creation_timestamp": "1611190911",
- "labels": "{\"k8s-app\":\"kubernetes-dashboard\"}",
- "name": "kubernetes-dashboard",
- "namespace": "kube-system",
- "resource_names": "[\"heapster\",\"dashboard-metrics-scraper\"]",
- "resources": "[\"services\"]",
- "uid": "74e02baa-2c11-413f-828a-2cbe39011469",
- "verbs": "[\"proxy\"]",
- },
- {
- "annotations": "{\"kubectl.kubernetes.io/last-applied-configuration\":\"{\\\"apiVersion\\\":\\\"rbac.authorization.k8s.io/v1\\\",\\\"kind\\\":\\\"Role\\\",\\\"metadata\\\":{\\\"annotations\\\":{},\\\"labels\\\":{\\\"k8s-app\\\":\\\"kubernetes-dashboard\\\"},\\\"name\\\":\\\"kubernetes-dashboard\\\",\\\"namespace\\\":\\\"kube-system\\\"},\\\"rules\\\":[{\\\"apiGroups\\\":[\\\"\\\"],\\\"resourceNames\\\":[\\\"kubernetes-dashboard-key-holder\\\",\\\"kubernetes-dashboard-certs\\\",\\\"kubernetes-dashboard-csrf\\\"],\\\"resources\\\":[\\\"secrets\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"update\\\",\\\"delete\\\"]},{\\\"apiGroups\\\":[\\\"\\\"],\\\"resourceNames\\\":[\\\"kubernetes-dashboard-settings\\\"],\\\"resources\\\":[\\\"configmaps\\\"],\\\"verbs\\\":[\\\"get\\\",\\\"update\\\"]},{\\\"apiGroups\\\":[\\\"\\\"],\\\"resourceNames\\\":[\\\"heapster\\\",\\\"dashboard-metrics-scraper\\\"],\\\"resources\\\":[\\\"services\\\"],\\\"verbs\\\":[\\\"proxy\\\"]},{\\\"apiGroups\\\":[\\\"\\\"],\\\"resourceNames\\\":[\\\"heapster\\\",\\\"http:heapster:\\\",\\\"https:heapster:\\\",\\\"dashboard-metrics-scraper\\\",\\\"http:dashboard-metrics-scraper\\\"],\\\"resources\\\":[\\\"services/proxy\\\"],\\\"verbs\\\":[\\\"get\\\"]}]}\\n\"}",
- "api_groups": "[\"\"]",
- "cluster_uid": "a7fd8e77-93de-4742-9037-5db9a01e966a",
- "creation_timestamp": "1611190911",
- "labels": "{\"k8s-app\":\"kubernetes-dashboard\"}",
- "name": "kubernetes-dashboard",
- "namespace": "kube-system",
- "resource_names": "[\"heapster\",\"http:heapster:\",\"https:heapster:\",\"dashboard-metrics-scraper\",\"http:dashboard-metrics-scraper\"]",
- "resources": "[\"services/proxy\"]",
- "uid": "74e02baa-2c11-413f-828a-2cbe39011469",
- "verbs": "[\"get\"]",
- },
- }, rprs)
-}
diff --git a/infrastructure/kubequery/internal/k8s/rbac/testdata/cluster_role_binding_subject_test.json b/infrastructure/kubequery/internal/k8s/rbac/testdata/cluster_role_binding_subject_test.json
deleted file mode 100644
index 7f4a4e03a1..0000000000
--- a/infrastructure/kubequery/internal/k8s/rbac/testdata/cluster_role_binding_subject_test.json
+++ /dev/null
@@ -1,108 +0,0 @@
-{
- "apiVersion": "v1",
- "items": [
- {
- "apiVersion": "rbac.authorization.k8s.io/v1",
- "kind": "ClusterRoleBinding",
- "metadata": {
- "annotations": {
- "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"rbac.authorization.k8s.io/v1\",\"kind\":\"ClusterRoleBinding\",\"metadata\":{\"annotations\":{},\"name\":\"kubernetes-dashboard\"},\"roleRef\":{\"apiGroup\":\"rbac.authorization.k8s.io\",\"kind\":\"ClusterRole\",\"name\":\"kubernetes-dashboard\"},\"subjects\":[{\"kind\":\"ServiceAccount\",\"name\":\"kubernetes-dashboard\",\"namespace\":\"kube-system\"}]}\n"
- },
- "creationTimestamp": "2021-01-21T01:01:51Z",
- "managedFields": [
- {
- "apiVersion": "rbac.authorization.k8s.io/v1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:metadata": {
- "f:annotations": {
- ".": {},
- "f:kubectl.kubernetes.io/last-applied-configuration": {}
- }
- },
- "f:roleRef": {
- "f:apiGroup": {},
- "f:kind": {},
- "f:name": {}
- },
- "f:subjects": {}
- },
- "manager": "kubectl-client-side-apply",
- "operation": "Update",
- "time": "2021-01-21T01:01:51Z"
- }
- ],
- "name": "kubernetes-dashboard",
- "resourceVersion": "449798",
- "selfLink": "/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/kubernetes-dashboard",
- "uid": "7e3bf161-3a4e-495d-98a8-f71248d0ba36"
- },
- "roleRef": {
- "apiGroup": "rbac.authorization.k8s.io",
- "kind": "ClusterRole",
- "name": "kubernetes-dashboard"
- },
- "subjects": [
- {
- "kind": "ServiceAccount",
- "name": "kubernetes-dashboard",
- "namespace": "kube-system"
- }
- ]
- },
- {
- "apiVersion": "rbac.authorization.k8s.io/v1",
- "kind": "ClusterRoleBinding",
- "metadata": {
- "annotations": {
- "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"rbac.authorization.k8s.io/v1\",\"kind\":\"ClusterRoleBinding\",\"metadata\":{\"annotations\":{},\"name\":\"nginx-ingress-microk8s\"},\"roleRef\":{\"apiGroup\":\"rbac.authorization.k8s.io\",\"kind\":\"ClusterRole\",\"name\":\"nginx-ingress-microk8s-clusterrole\"},\"subjects\":[{\"kind\":\"ServiceAccount\",\"name\":\"nginx-ingress-microk8s-serviceaccount\",\"namespace\":\"ingress\"}]}\n"
- },
- "creationTimestamp": "2021-01-21T01:04:07Z",
- "managedFields": [
- {
- "apiVersion": "rbac.authorization.k8s.io/v1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:metadata": {
- "f:annotations": {
- ".": {},
- "f:kubectl.kubernetes.io/last-applied-configuration": {}
- }
- },
- "f:roleRef": {
- "f:apiGroup": {},
- "f:kind": {},
- "f:name": {}
- },
- "f:subjects": {}
- },
- "manager": "kubectl-client-side-apply",
- "operation": "Update",
- "time": "2021-01-21T01:04:07Z"
- }
- ],
- "name": "nginx-ingress-microk8s",
- "resourceVersion": "450134",
- "selfLink": "/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/nginx-ingress-microk8s",
- "uid": "aa9c6e0e-3dd4-4da3-936a-a6edea62c7b7"
- },
- "roleRef": {
- "apiGroup": "rbac.authorization.k8s.io",
- "kind": "ClusterRole",
- "name": "nginx-ingress-microk8s-clusterrole"
- },
- "subjects": [
- {
- "kind": "ServiceAccount",
- "name": "nginx-ingress-microk8s-serviceaccount",
- "namespace": "ingress"
- }
- ]
- }
- ],
- "kind": "List",
- "metadata": {
- "resourceVersion": "",
- "selfLink": ""
- }
-}
diff --git a/infrastructure/kubequery/internal/k8s/rbac/testdata/cluster_role_policy_rule_test.json b/infrastructure/kubequery/internal/k8s/rbac/testdata/cluster_role_policy_rule_test.json
deleted file mode 100644
index bda5a78e53..0000000000
--- a/infrastructure/kubequery/internal/k8s/rbac/testdata/cluster_role_policy_rule_test.json
+++ /dev/null
@@ -1,204 +0,0 @@
-{
- "apiVersion": "v1",
- "items": [
- {
- "apiVersion": "rbac.authorization.k8s.io/v1",
- "kind": "ClusterRole",
- "metadata": {
- "annotations": {
- "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"rbac.authorization.k8s.io/v1\",\"kind\":\"ClusterRole\",\"metadata\":{\"annotations\":{},\"labels\":{\"app\":\"kiali\",\"chart\":\"kiali\",\"heritage\":\"Tiller\",\"release\":\"istio\"},\"name\":\"kiali-viewer\"},\"rules\":[{\"apiGroups\":[\"\"],\"resources\":[\"configmaps\",\"endpoints\",\"namespaces\",\"nodes\",\"pods\",\"pods/log\",\"replicationcontrollers\",\"services\"],\"verbs\":[\"get\",\"list\",\"watch\"]},{\"apiGroups\":[\"extensions\",\"apps\"],\"resources\":[\"deployments\",\"replicasets\",\"statefulsets\"],\"verbs\":[\"get\",\"list\",\"watch\"]},{\"apiGroups\":[\"autoscaling\"],\"resources\":[\"horizontalpodautoscalers\"],\"verbs\":[\"get\",\"list\",\"watch\"]},{\"apiGroups\":[\"batch\"],\"resources\":[\"cronjobs\",\"jobs\"],\"verbs\":[\"get\",\"list\",\"watch\"]},{\"apiGroups\":[\"config.istio.io\",\"networking.istio.io\",\"authentication.istio.io\",\"rbac.istio.io\",\"security.istio.io\"],\"resources\":[\"*\"],\"verbs\":[\"get\",\"list\",\"watch\"]},{\"apiGroups\":[\"monitoring.kiali.io\"],\"resources\":[\"monitoringdashboards\"],\"verbs\":[\"get\",\"list\"]}]}\n"
- },
- "creationTimestamp": "2021-01-21T01:05:43Z",
- "labels": {
- "app": "kiali",
- "chart": "kiali",
- "heritage": "Tiller",
- "release": "istio"
- },
- "managedFields": [
- {
- "apiVersion": "rbac.authorization.k8s.io/v1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:metadata": {
- "f:annotations": {
- ".": {},
- "f:kubectl.kubernetes.io/last-applied-configuration": {}
- },
- "f:labels": {
- ".": {},
- "f:app": {},
- "f:chart": {},
- "f:heritage": {},
- "f:release": {}
- }
- },
- "f:rules": {}
- },
- "manager": "kubectl-client-side-apply",
- "operation": "Update",
- "time": "2021-01-21T01:05:43Z"
- }
- ],
- "name": "kiali-viewer",
- "resourceVersion": "450538",
- "selfLink": "/apis/rbac.authorization.k8s.io/v1/clusterroles/kiali-viewer",
- "uid": "b5d5ca79-f4e3-4478-b954-fe62a146f279"
- },
- "rules": [
- {
- "apiGroups": [
- ""
- ],
- "resources": [
- "configmaps",
- "endpoints",
- "namespaces",
- "nodes",
- "pods",
- "pods/log",
- "replicationcontrollers",
- "services"
- ],
- "verbs": [
- "get",
- "list",
- "watch"
- ]
- },
- {
- "apiGroups": [
- "extensions",
- "apps"
- ],
- "resources": [
- "deployments",
- "replicasets",
- "statefulsets"
- ],
- "verbs": [
- "get",
- "list",
- "watch"
- ]
- },
- {
- "apiGroups": [
- "autoscaling"
- ],
- "resources": [
- "horizontalpodautoscalers"
- ],
- "verbs": [
- "get",
- "list",
- "watch"
- ]
- },
- {
- "apiGroups": [
- "batch"
- ],
- "resources": [
- "cronjobs",
- "jobs"
- ],
- "verbs": [
- "get",
- "list",
- "watch"
- ]
- },
- {
- "apiGroups": [
- "config.istio.io",
- "networking.istio.io",
- "authentication.istio.io",
- "rbac.istio.io",
- "security.istio.io"
- ],
- "resources": [
- "*"
- ],
- "verbs": [
- "get",
- "list",
- "watch"
- ]
- },
- {
- "apiGroups": [
- "monitoring.kiali.io"
- ],
- "resources": [
- "monitoringdashboards"
- ],
- "verbs": [
- "get",
- "list"
- ]
- }
- ]
- },
- {
- "apiVersion": "rbac.authorization.k8s.io/v1",
- "kind": "ClusterRole",
- "metadata": {
- "annotations": {
- "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"rbac.authorization.k8s.io/v1\",\"kind\":\"ClusterRole\",\"metadata\":{\"annotations\":{},\"labels\":{\"k8s-app\":\"kubernetes-dashboard\"},\"name\":\"kubernetes-dashboard\"},\"rules\":[{\"apiGroups\":[\"metrics.k8s.io\"],\"resources\":[\"pods\",\"nodes\"],\"verbs\":[\"get\",\"list\",\"watch\"]}]}\n"
- },
- "creationTimestamp": "2021-01-21T01:01:51Z",
- "labels": {
- "k8s-app": "kubernetes-dashboard"
- },
- "managedFields": [
- {
- "apiVersion": "rbac.authorization.k8s.io/v1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:metadata": {
- "f:annotations": {
- ".": {},
- "f:kubectl.kubernetes.io/last-applied-configuration": {}
- },
- "f:labels": {
- ".": {},
- "f:k8s-app": {}
- }
- },
- "f:rules": {}
- },
- "manager": "kubectl-client-side-apply",
- "operation": "Update",
- "time": "2021-01-21T01:01:51Z"
- }
- ],
- "name": "kubernetes-dashboard",
- "resourceVersion": "449796",
- "selfLink": "/apis/rbac.authorization.k8s.io/v1/clusterroles/kubernetes-dashboard",
- "uid": "5afb084d-e4da-4207-844d-d3a2e002ecda"
- },
- "rules": [
- {
- "apiGroups": [
- "metrics.k8s.io"
- ],
- "resources": [
- "pods",
- "nodes"
- ],
- "verbs": [
- "get",
- "list",
- "watch"
- ]
- }
- ]
- }
- ],
- "kind": "List",
- "metadata": {
- "resourceVersion": "",
- "selfLink": ""
- }
-}
diff --git a/infrastructure/kubequery/internal/k8s/rbac/testdata/role_binding_subject_test.json b/infrastructure/kubequery/internal/k8s/rbac/testdata/role_binding_subject_test.json
deleted file mode 100644
index ed557d4bbc..0000000000
--- a/infrastructure/kubequery/internal/k8s/rbac/testdata/role_binding_subject_test.json
+++ /dev/null
@@ -1,57 +0,0 @@
-{
- "apiVersion": "rbac.authorization.k8s.io/v1",
- "kind": "RoleBinding",
- "metadata": {
- "annotations": {
- "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"rbac.authorization.k8s.io/v1\",\"kind\":\"RoleBinding\",\"metadata\":{\"annotations\":{},\"labels\":{\"k8s-app\":\"kubernetes-dashboard\"},\"name\":\"kubernetes-dashboard\",\"namespace\":\"kube-system\"},\"roleRef\":{\"apiGroup\":\"rbac.authorization.k8s.io\",\"kind\":\"Role\",\"name\":\"kubernetes-dashboard\"},\"subjects\":[{\"kind\":\"ServiceAccount\",\"name\":\"kubernetes-dashboard\",\"namespace\":\"kube-system\"}]}\n"
- },
- "creationTimestamp": "2021-01-21T01:01:51Z",
- "labels": {
- "k8s-app": "kubernetes-dashboard"
- },
- "managedFields": [
- {
- "apiVersion": "rbac.authorization.k8s.io/v1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:metadata": {
- "f:annotations": {
- ".": {},
- "f:kubectl.kubernetes.io/last-applied-configuration": {}
- },
- "f:labels": {
- ".": {},
- "f:k8s-app": {}
- }
- },
- "f:roleRef": {
- "f:apiGroup": {},
- "f:kind": {},
- "f:name": {}
- },
- "f:subjects": {}
- },
- "manager": "kubectl-client-side-apply",
- "operation": "Update",
- "time": "2021-01-21T01:01:51Z"
- }
- ],
- "name": "kubernetes-dashboard",
- "namespace": "kube-system",
- "resourceVersion": "449797",
- "selfLink": "/apis/rbac.authorization.k8s.io/v1/namespaces/kube-system/rolebindings/kubernetes-dashboard",
- "uid": "216b24d7-0611-4cb9-991b-fad53856241d"
- },
- "roleRef": {
- "apiGroup": "rbac.authorization.k8s.io",
- "kind": "Role",
- "name": "kubernetes-dashboard"
- },
- "subjects": [
- {
- "kind": "ServiceAccount",
- "name": "kubernetes-dashboard",
- "namespace": "kube-system"
- }
- ]
-}
diff --git a/infrastructure/kubequery/internal/k8s/rbac/testdata/role_policy_rule_test.json b/infrastructure/kubequery/internal/k8s/rbac/testdata/role_policy_rule_test.json
deleted file mode 100644
index b67810d75e..0000000000
--- a/infrastructure/kubequery/internal/k8s/rbac/testdata/role_policy_rule_test.json
+++ /dev/null
@@ -1,108 +0,0 @@
-{
- "apiVersion": "rbac.authorization.k8s.io/v1",
- "kind": "Role",
- "metadata": {
- "annotations": {
- "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"rbac.authorization.k8s.io/v1\",\"kind\":\"Role\",\"metadata\":{\"annotations\":{},\"labels\":{\"k8s-app\":\"kubernetes-dashboard\"},\"name\":\"kubernetes-dashboard\",\"namespace\":\"kube-system\"},\"rules\":[{\"apiGroups\":[\"\"],\"resourceNames\":[\"kubernetes-dashboard-key-holder\",\"kubernetes-dashboard-certs\",\"kubernetes-dashboard-csrf\"],\"resources\":[\"secrets\"],\"verbs\":[\"get\",\"update\",\"delete\"]},{\"apiGroups\":[\"\"],\"resourceNames\":[\"kubernetes-dashboard-settings\"],\"resources\":[\"configmaps\"],\"verbs\":[\"get\",\"update\"]},{\"apiGroups\":[\"\"],\"resourceNames\":[\"heapster\",\"dashboard-metrics-scraper\"],\"resources\":[\"services\"],\"verbs\":[\"proxy\"]},{\"apiGroups\":[\"\"],\"resourceNames\":[\"heapster\",\"http:heapster:\",\"https:heapster:\",\"dashboard-metrics-scraper\",\"http:dashboard-metrics-scraper\"],\"resources\":[\"services/proxy\"],\"verbs\":[\"get\"]}]}\n"
- },
- "creationTimestamp": "2021-01-21T01:01:51Z",
- "labels": {
- "k8s-app": "kubernetes-dashboard"
- },
- "managedFields": [
- {
- "apiVersion": "rbac.authorization.k8s.io/v1",
- "fieldsType": "FieldsV1",
- "fieldsV1": {
- "f:metadata": {
- "f:annotations": {
- ".": {},
- "f:kubectl.kubernetes.io/last-applied-configuration": {}
- },
- "f:labels": {
- ".": {},
- "f:k8s-app": {}
- }
- },
- "f:rules": {}
- },
- "manager": "kubectl-client-side-apply",
- "operation": "Update",
- "time": "2021-01-21T01:01:51Z"
- }
- ],
- "name": "kubernetes-dashboard",
- "namespace": "kube-system",
- "resourceVersion": "449795",
- "selfLink": "/apis/rbac.authorization.k8s.io/v1/namespaces/kube-system/roles/kubernetes-dashboard",
- "uid": "74e02baa-2c11-413f-828a-2cbe39011469"
- },
- "rules": [
- {
- "apiGroups": [
- ""
- ],
- "resourceNames": [
- "kubernetes-dashboard-key-holder",
- "kubernetes-dashboard-certs",
- "kubernetes-dashboard-csrf"
- ],
- "resources": [
- "secrets"
- ],
- "verbs": [
- "get",
- "update",
- "delete"
- ]
- },
- {
- "apiGroups": [
- ""
- ],
- "resourceNames": [
- "kubernetes-dashboard-settings"
- ],
- "resources": [
- "configmaps"
- ],
- "verbs": [
- "get",
- "update"
- ]
- },
- {
- "apiGroups": [
- ""
- ],
- "resourceNames": [
- "heapster",
- "dashboard-metrics-scraper"
- ],
- "resources": [
- "services"
- ],
- "verbs": [
- "proxy"
- ]
- },
- {
- "apiGroups": [
- ""
- ],
- "resourceNames": [
- "heapster",
- "http:heapster:",
- "https:heapster:",
- "dashboard-metrics-scraper",
- "http:dashboard-metrics-scraper"
- ],
- "resources": [
- "services/proxy"
- ],
- "verbs": [
- "get"
- ]
- }
- ]
-}
diff --git a/infrastructure/kubequery/internal/k8s/storage/csi_driver.go b/infrastructure/kubequery/internal/k8s/storage/csi_driver.go
deleted file mode 100644
index 063e67febf..0000000000
--- a/infrastructure/kubequery/internal/k8s/storage/csi_driver.go
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package storage
-
-import (
- "context"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/api/storage/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-type csiDriver struct {
- k8s.CommonFields
- v1.CSIDriverSpec
-}
-
-// CSIDriverColumns returns kubernetes CSI driver fields as Osquery table columns.
-func CSIDriverColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&csiDriver{})
-}
-
-// CSIDriversGenerate generates the kubernetes CSI drivers as Osquery table data.
-func CSIDriversGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- drivers, err := k8s.GetClient().StorageV1().CSIDrivers().List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, d := range drivers.Items {
- item := &csiDriver{
- CommonFields: k8s.GetCommonFields(d.ObjectMeta),
- CSIDriverSpec: d.Spec,
- }
- results = append(results, k8s.ToMap(item))
- }
-
- if drivers.Continue == "" {
- break
- }
- options.Continue = drivers.Continue
- }
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/storage/csi_driver_test.go b/infrastructure/kubequery/internal/k8s/storage/csi_driver_test.go
deleted file mode 100644
index 6fc49f2589..0000000000
--- a/infrastructure/kubequery/internal/k8s/storage/csi_driver_test.go
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package storage
-
-import (
- "context"
- "testing"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/stretchr/testify/assert"
-)
-
-func TestCSIDriversGenerate(t *testing.T) {
- cds, err := CSIDriversGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{
- {
- "annotations": "{\"kubectl.kubernetes.io/last-applied-configuration\":\"{\\\"apiVersion\\\":\\\"storage.k8s.io/v1beta1\\\",\\\"kind\\\":\\\"CSIDriver\\\",\\\"metadata\\\":{\\\"annotations\\\":{},\\\"name\\\":\\\"efs.csi.aws.com\\\"},\\\"spec\\\":{\\\"attachRequired\\\":false}}\\n\"}",
- "attach_required": "0",
- "cluster_uid": "e7fd8e77-93de-4742-9037-5db9a01e966a",
- "creation_timestamp": "1609173285",
- "name": "efs.csi.aws.com",
- "pod_info_on_mount": "0",
- "uid": "35613d4e-4f94-416c-bdad-88660302ce99",
- "volume_lifecycle_modes": "[\"Persistent\"]",
- },
- }, cds)
-}
diff --git a/infrastructure/kubequery/internal/k8s/storage/csi_node_driver.go b/infrastructure/kubequery/internal/k8s/storage/csi_node_driver.go
deleted file mode 100644
index 5feb0f8e1c..0000000000
--- a/infrastructure/kubequery/internal/k8s/storage/csi_node_driver.go
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package storage
-
-import (
- "context"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/api/storage/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/types"
-)
-
-type csiNodeDriver struct {
- ClusterName string
- ClusterUID types.UID
- v1.CSINodeDriver
-}
-
-// CSINodeDriverColumns returns kubernetes CSI node driver fields as Osquery table columns.
-func CSINodeDriverColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&csiNodeDriver{})
-}
-
-// CSINodeDriversGenerate generates the kubernetes CSI node drivers as Osquery table data.
-func CSINodeDriversGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- nodes, err := k8s.GetClient().StorageV1().CSINodes().List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, n := range nodes.Items {
- for _, d := range n.Spec.Drivers {
- item := &csiNodeDriver{
- ClusterName: k8s.GetClusterName(),
- ClusterUID: k8s.GetClusterUID(),
- CSINodeDriver: d,
- }
- results = append(results, k8s.ToMap(item))
- }
- }
-
- if nodes.Continue == "" {
- break
- }
- options.Continue = nodes.Continue
- }
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/storage/csi_node_driver_test.go b/infrastructure/kubequery/internal/k8s/storage/csi_node_driver_test.go
deleted file mode 100644
index 903128b376..0000000000
--- a/infrastructure/kubequery/internal/k8s/storage/csi_node_driver_test.go
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package storage
-
-import (
- "context"
- "testing"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/stretchr/testify/assert"
-)
-
-func TestCSINodeDriversGenerate(t *testing.T) {
- cnds, err := CSINodeDriversGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{}, cnds)
-}
diff --git a/infrastructure/kubequery/internal/k8s/storage/csi_storage_capacity.go b/infrastructure/kubequery/internal/k8s/storage/csi_storage_capacity.go
deleted file mode 100644
index f1579a5bab..0000000000
--- a/infrastructure/kubequery/internal/k8s/storage/csi_storage_capacity.go
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package storage
-
-import (
- "context"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- "k8s.io/apimachinery/pkg/api/resource"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-type csiStorageCapacity struct {
- k8s.CommonNamespacedFields
- NodeTopology *metav1.LabelSelector
- StorageClassName string
- Capacity *resource.Quantity
-}
-
-// CSIStorageCapacityColumns returns kubernetes CSI storage capacity fields as Osquery table columns.
-func CSIStorageCapacityColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&csiStorageCapacity{})
-}
-
-// CSIStorageCapacitiesGenerate generates the kubernetes CSI storage capacities as Osquery table data.
-func CSIStorageCapacitiesGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- scs, err := k8s.GetClient().StorageV1alpha1().CSIStorageCapacities(metav1.NamespaceAll).List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, sc := range scs.Items {
- item := &csiStorageCapacity{
- CommonNamespacedFields: k8s.GetCommonNamespacedFields(sc.ObjectMeta),
- NodeTopology: sc.NodeTopology,
- StorageClassName: sc.StorageClassName,
- Capacity: sc.Capacity,
- }
- results = append(results, k8s.ToMap(item))
- }
-
- if scs.Continue == "" {
- break
- }
- options.Continue = scs.Continue
- }
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/storage/init_test.go b/infrastructure/kubequery/internal/k8s/storage/init_test.go
deleted file mode 100644
index c7a1d50461..0000000000
--- a/infrastructure/kubequery/internal/k8s/storage/init_test.go
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package storage
-
-import (
- "encoding/json"
- "io/ioutil"
- "path/filepath"
-
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/api/storage/v1"
- "k8s.io/apimachinery/pkg/types"
- "k8s.io/client-go/kubernetes/fake"
-)
-
-func loadTestResource(name string, v interface{}) {
- path := filepath.Join("testdata", name)
- data, err := ioutil.ReadFile(path)
- if err != nil {
- panic(err)
- }
-
- err = json.Unmarshal(data, v)
- if err != nil {
- panic(err)
- }
-}
-
-func init() {
- cd := &v1.CSIDriver{}
- loadTestResource("csi_driver_test.json", cd)
- cnd := &v1.CSINodeList{}
- loadTestResource("csi_node_driver_test.json", cnd)
- sc := &v1.StorageClass{}
- loadTestResource("storage_class_test.json", sc)
-
- k8s.SetClient(fake.NewSimpleClientset(cd, cnd, sc), types.UID("e7fd8e77-93de-4742-9037-5db9a01e966a"), "")
-}
diff --git a/infrastructure/kubequery/internal/k8s/storage/storage_class.go b/infrastructure/kubequery/internal/k8s/storage/storage_class.go
deleted file mode 100644
index fe1aeeb296..0000000000
--- a/infrastructure/kubequery/internal/k8s/storage/storage_class.go
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package storage
-
-import (
- "context"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- corev1 "k8s.io/api/core/v1"
- v1 "k8s.io/api/storage/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-type storageClass struct {
- k8s.CommonFields
- Provisioner string
- Parameters map[string]string
- ReclaimPolicy *corev1.PersistentVolumeReclaimPolicy
- MountOptions []string
- AllowVolumeExpansion *bool
- VolumeBindingMode *v1.VolumeBindingMode
- AllowedTopologies []corev1.TopologySelectorTerm
-}
-
-// SCClassColumns returns kubernetes storage class fields as Osquery table columns.
-func SCClassColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&storageClass{})
-}
-
-// SCClassesGenerate generates the kubernetes storage classes as Osquery table data.
-func SCClassesGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- classes, err := k8s.GetClient().StorageV1().StorageClasses().List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, c := range classes.Items {
- item := &storageClass{
- CommonFields: k8s.GetCommonFields(c.ObjectMeta),
- Provisioner: c.Provisioner,
- Parameters: c.Parameters,
- ReclaimPolicy: c.ReclaimPolicy,
- MountOptions: c.MountOptions,
- AllowVolumeExpansion: c.AllowVolumeExpansion,
- VolumeBindingMode: c.VolumeBindingMode,
- AllowedTopologies: c.AllowedTopologies,
- }
- results = append(results, k8s.ToMap(item))
- }
-
- if classes.Continue == "" {
- break
- }
- options.Continue = classes.Continue
- }
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/storage/storage_class_test.go b/infrastructure/kubequery/internal/k8s/storage/storage_class_test.go
deleted file mode 100644
index 71f6c1f4ac..0000000000
--- a/infrastructure/kubequery/internal/k8s/storage/storage_class_test.go
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package storage
-
-import (
- "context"
- "testing"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/stretchr/testify/assert"
-)
-
-func TestSGClassesGenerate(t *testing.T) {
- cnds, err := SCClassesGenerate(context.TODO(), table.QueryContext{})
- assert.Nil(t, err)
- assert.Equal(t, []map[string]string{
- {
- "annotations": "{\"kubectl.kubernetes.io/last-applied-configuration\":\"{\\\"apiVersion\\\":\\\"storage.k8s.io/v1\\\",\\\"kind\\\":\\\"StorageClass\\\",\\\"metadata\\\":{\\\"annotations\\\":{\\\"storageclass.kubernetes.io/is-default-class\\\":\\\"true\\\"},\\\"name\\\":\\\"gp2\\\"},\\\"parameters\\\":{\\\"fsType\\\":\\\"ext4\\\",\\\"type\\\":\\\"gp2\\\"},\\\"provisioner\\\":\\\"kubernetes.io/aws-ebs\\\",\\\"volumeBindingMode\\\":\\\"WaitForFirstConsumer\\\"}\\n\",\"storageclass.kubernetes.io/is-default-class\":\"true\"}",
- "cluster_uid": "e7fd8e77-93de-4742-9037-5db9a01e966a",
- "creation_timestamp": "1609173285",
- "name": "gp2",
- "parameters": "{\"fsType\":\"ext4\",\"type\":\"gp2\"}",
- "provisioner": "kubernetes.io/aws-ebs",
- "reclaim_policy": "Delete",
- "uid": "4dae2799-6576-403c-8644-7a2ad12b1fd7",
- "volume_binding_mode": "WaitForFirstConsumer",
- },
- }, cnds)
-}
diff --git a/infrastructure/kubequery/internal/k8s/storage/testdata/csi_driver_test.json b/infrastructure/kubequery/internal/k8s/storage/testdata/csi_driver_test.json
deleted file mode 100644
index 97f455960d..0000000000
--- a/infrastructure/kubequery/internal/k8s/storage/testdata/csi_driver_test.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "apiVersion": "storage.k8s.io/v1beta1",
- "kind": "CSIDriver",
- "metadata": {
- "annotations": {
- "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"storage.k8s.io/v1beta1\",\"kind\":\"CSIDriver\",\"metadata\":{\"annotations\":{},\"name\":\"efs.csi.aws.com\"},\"spec\":{\"attachRequired\":false}}\n"
- },
- "creationTimestamp": "2020-12-28T16:34:45Z",
- "name": "efs.csi.aws.com",
- "resourceVersion": "98",
- "selfLink": "/apis/storage.k8s.io/v1beta1/csidrivers/efs.csi.aws.com",
- "uid": "35613d4e-4f94-416c-bdad-88660302ce99"
- },
- "spec": {
- "attachRequired": false,
- "podInfoOnMount": false,
- "volumeLifecycleModes": [
- "Persistent"
- ]
- }
-}
diff --git a/infrastructure/kubequery/internal/k8s/storage/testdata/csi_node_driver_test.json b/infrastructure/kubequery/internal/k8s/storage/testdata/csi_node_driver_test.json
deleted file mode 100644
index 18d1652b5e..0000000000
--- a/infrastructure/kubequery/internal/k8s/storage/testdata/csi_node_driver_test.json
+++ /dev/null
@@ -1,54 +0,0 @@
-{
- "apiVersion": "v1",
- "items": [
- {
- "apiVersion": "storage.k8s.io/v1",
- "kind": "CSINode",
- "metadata": {
- "creationTimestamp": "2020-12-28T16:40:02Z",
- "name": "ip-10-250-0-92.us-west-2.compute.internal",
- "ownerReferences": [
- {
- "apiVersion": "v1",
- "kind": "Node",
- "name": "ip-10-250-0-92.us-west-2.compute.internal",
- "uid": "a5c67dc3-2ec4-4d8e-9aa3-6da896481feb"
- }
- ],
- "resourceVersion": "1166",
- "selfLink": "/apis/storage.k8s.io/v1/csinodes/ip-10-250-0-92.us-west-2.compute.internal",
- "uid": "63907da1-2e7b-42a0-8cfe-3379153feaa0"
- },
- "spec": {
- "drivers": null
- }
- },
- {
- "apiVersion": "storage.k8s.io/v1",
- "kind": "CSINode",
- "metadata": {
- "creationTimestamp": "2020-12-28T16:39:58Z",
- "name": "ip-10-250-1-234.us-west-2.compute.internal",
- "ownerReferences": [
- {
- "apiVersion": "v1",
- "kind": "Node",
- "name": "ip-10-250-1-234.us-west-2.compute.internal",
- "uid": "b9017865-5d2f-4780-8aa7-b90815d5fb4b"
- }
- ],
- "resourceVersion": "1110",
- "selfLink": "/apis/storage.k8s.io/v1/csinodes/ip-10-250-1-234.us-west-2.compute.internal",
- "uid": "f29ffd82-dc51-4828-aa8d-1b5b28a6859f"
- },
- "spec": {
- "drivers": null
- }
- }
- ],
- "kind": "List",
- "metadata": {
- "resourceVersion": "",
- "selfLink": ""
- }
-}
diff --git a/infrastructure/kubequery/internal/k8s/storage/testdata/storage_class_test.json b/infrastructure/kubequery/internal/k8s/storage/testdata/storage_class_test.json
deleted file mode 100644
index 797547b6eb..0000000000
--- a/infrastructure/kubequery/internal/k8s/storage/testdata/storage_class_test.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "apiVersion": "storage.k8s.io/v1",
- "kind": "StorageClass",
- "metadata": {
- "annotations": {
- "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"storage.k8s.io/v1\",\"kind\":\"StorageClass\",\"metadata\":{\"annotations\":{\"storageclass.kubernetes.io/is-default-class\":\"true\"},\"name\":\"gp2\"},\"parameters\":{\"fsType\":\"ext4\",\"type\":\"gp2\"},\"provisioner\":\"kubernetes.io/aws-ebs\",\"volumeBindingMode\":\"WaitForFirstConsumer\"}\n",
- "storageclass.kubernetes.io/is-default-class": "true"
- },
- "creationTimestamp": "2020-12-28T16:34:45Z",
- "name": "gp2",
- "resourceVersion": "118",
- "selfLink": "/apis/storage.k8s.io/v1/storageclasses/gp2",
- "uid": "4dae2799-6576-403c-8644-7a2ad12b1fd7"
- },
- "parameters": {
- "fsType": "ext4",
- "type": "gp2"
- },
- "provisioner": "kubernetes.io/aws-ebs",
- "reclaimPolicy": "Delete",
- "volumeBindingMode": "WaitForFirstConsumer"
-}
diff --git a/infrastructure/kubequery/internal/k8s/storage/volume_attachment.go b/infrastructure/kubequery/internal/k8s/storage/volume_attachment.go
deleted file mode 100644
index dd9f2c6731..0000000000
--- a/infrastructure/kubequery/internal/k8s/storage/volume_attachment.go
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package storage
-
-import (
- "context"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s"
- v1 "k8s.io/api/storage/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-type volumeAttachment struct {
- k8s.CommonFields
- v1.VolumeAttachmentSpec
- v1.VolumeAttachmentStatus
-}
-
-// VolumeAttachmentColumns returns kubernetes volume attachment fields as Osquery table columns.
-func VolumeAttachmentColumns() []table.ColumnDefinition {
- return k8s.GetSchema(&volumeAttachment{})
-}
-
-// VolumeAttachmentsGenerate generates the kubernetes volume attachments as Osquery table data.
-func VolumeAttachmentsGenerate(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
- options := metav1.ListOptions{}
- results := make([]map[string]string, 0)
-
- for {
- vas, err := k8s.GetClient().StorageV1().VolumeAttachments().List(ctx, options)
- if err != nil {
- return nil, err
- }
-
- for _, va := range vas.Items {
- item := &volumeAttachment{
- CommonFields: k8s.GetCommonFields(va.ObjectMeta),
- VolumeAttachmentSpec: va.Spec,
- VolumeAttachmentStatus: va.Status,
- }
- results = append(results, k8s.ToMap(item))
- }
-
- if vas.Continue == "" {
- break
- }
- options.Continue = vas.Continue
- }
-
- return results, nil
-}
diff --git a/infrastructure/kubequery/internal/k8s/tables/tables.go b/infrastructure/kubequery/internal/k8s/tables/tables.go
deleted file mode 100644
index c94cc9af60..0000000000
--- a/infrastructure/kubequery/internal/k8s/tables/tables.go
+++ /dev/null
@@ -1,111 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package tables
-
-import (
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/Uptycs/kubequery/internal/k8s/admissionregistration"
- "github.com/Uptycs/kubequery/internal/k8s/apps"
- "github.com/Uptycs/kubequery/internal/k8s/autoscaling"
- "github.com/Uptycs/kubequery/internal/k8s/batch"
- "github.com/Uptycs/kubequery/internal/k8s/core"
- "github.com/Uptycs/kubequery/internal/k8s/discovery"
- "github.com/Uptycs/kubequery/internal/k8s/event"
- "github.com/Uptycs/kubequery/internal/k8s/networking"
- "github.com/Uptycs/kubequery/internal/k8s/policy"
- "github.com/Uptycs/kubequery/internal/k8s/rbac"
- "github.com/Uptycs/kubequery/internal/k8s/storage"
-)
-
-// Table structure holds Osquery extension table definition.
-type Table struct {
- Name string
- Columns []table.ColumnDefinition
- GenFunc table.GenerateFunc
-}
-
-// GetTables returns the definition of all the tables supported by this extension.
-func GetTables() []Table {
- return []Table{
- // Admission Registration
- {"kubernetes_mutating_webhooks", admissionregistration.MutatingWebhookColumns(), admissionregistration.MutatingWebhooksGenerate},
- {"kubernetes_validating_webhooks", admissionregistration.ValidatingWebhookColumns(), admissionregistration.ValidatingWebhooksGenerate},
-
- // Apps
- {"kubernetes_daemon_sets", apps.DaemonSetColumns(), apps.DaemonSetsGenerate},
- {"kubernetes_daemon_set_containers", apps.DaemonSetContainerColumns(), apps.DaemonSetContainersGenerate},
- {"kubernetes_daemon_set_volumes", apps.DaemonSetVolumeColumns(), apps.DaemonSetVolumesGenerate},
- {"kubernetes_deployments", apps.DeploymentColumns(), apps.DeploymentsGenerate},
- {"kubernetes_deployments_containers", apps.DeploymentContainerColumns(), apps.DeploymentContainersGenerate},
- {"kubernetes_deployments_volumes", apps.DeploymentVolumeColumns(), apps.DeploymentVolumesGenerate},
- {"kubernetes_replica_sets", apps.ReplicaSetColumns(), apps.ReplicaSetsGenerate},
- {"kubernetes_replica_set_containers", apps.ReplicaSetContainerColumns(), apps.ReplicaSetContainersGenerate},
- {"kubernetes_replica_set_volumes", apps.ReplicaSetVolumeColumns(), apps.ReplicaSetVolumesGenerate},
- {"kubernetes_stateful_sets", apps.StatefulSetColumns(), apps.StatefulSetsGenerate},
- {"kubernetes_stateful_set_containers", apps.StatefulSetContainerColumns(), apps.StatefulSetContainersGenerate},
- {"kubernetes_stateful_set_volumes", apps.StatefulSetVolumeColumns(), apps.StatefulSetVolumesGenerate},
-
- // Autoscaling
- {"kubernetes_horizontal_pod_autoscalers", autoscaling.HorizontalPodAutoscalersColumns(), autoscaling.HorizontalPodAutoscalerGenerate},
-
- // Batch
- {"kubernetes_cron_jobs", batch.CronJobColumns(), batch.CronJobsGenerate},
- {"kubernetes_jobs", batch.JobColumns(), batch.JobsGenerate},
-
- // Core
- {"kubernetes_component_statuses", core.ComponentStatusColumns(), core.ComponentStatusesGenerate},
- {"kubernetes_config_maps", core.ConfigMapColumns(), core.ConfigMapsGenerate},
- {"kubernetes_endpoint_subsets", core.EndpointSubsetColumns(), core.EndpointSubsetsGenerate},
- {"kubernetes_limit_ranges", core.LimitRangeColumns(), core.LimitRangesGenerate},
- {"kubernetes_namespaces", core.NamespaceColumns(), core.NamespacesGenerate},
- {"kubernetes_nodes", core.NodeColumns(), core.NodesGenerate},
- {"kubernetes_persistent_volume_claims", core.PersistentVolumeClaimColumns(), core.PersistentVolumeClaimsGenerate},
- {"kubernetes_persistent_volumes", core.PersistentVolumeColumns(), core.PersistentVolumesGenerate},
- {"kubernetes_pod_templates", core.PodTemplateColumns(), core.PodTemplatesGenerate},
- {"kubernetes_pod_template_containers", core.PodTemplateContainerColumns(), core.PodTemplateContainersGenerate},
- {"kubernetes_pod_templates_volumes", core.PodTemplateVolumeColumns(), core.PodTemplateVolumesGenerate},
- {"kubernetes_pods", core.PodColumns(), core.PodsGenerate},
- {"kubernetes_pod_containers", core.PodContainerColumns(), core.PodContainersGenerate},
- {"kubernetes_pod_volumes", core.PodVolumeColumns(), core.PodVolumesGenerate},
- {"kubernetes_resource_quotas", core.ResourceQuotaColumns(), core.ResourceQuotasGenerate},
- {"kubernetes_secrets", core.SecretColumns(), core.SecretsGenerate},
- {"kubernetes_service_accounts", core.ServiceAccountColumns(), core.ServiceAccountsGenerate},
- {"kubernetes_services", core.ServiceColumns(), core.ServicesGenerate},
-
- // Discovery
- {"kubernetes_api_resources", discovery.APIResourceColumns(), discovery.APIResourcesGenerate},
- {"kubernetes_info", discovery.InfoColumns(), discovery.InfoGenerate},
-
- // Event
- {"kubernetes_events", event.Columns(), event.Generate},
-
- // Networking
- {"kubernetes_ingress_classes", networking.IngressClassColumns(), networking.IngressClassesGenerate},
- {"kubernetes_ingresses", networking.IngressColumns(), networking.IngressesGenerate},
- {"kubernetes_network_policies", networking.NetworkPolicyColumns(), networking.NetworkPoliciesGenerate},
-
- // Policy
- {"kubernetes_pod_disruption_budgets", policy.PodDisruptionBudgetColumns(), policy.PodDisruptionBudgetsGenerate},
- {"kubernetes_pod_security_policies", policy.PodSecurityPolicyColumns(), policy.PodSecurityPoliciesGenerate},
-
- // RBAC
- {"kubernetes_cluster_role_binding_subjects", rbac.ClusterRoleBindingSubjectColumns(), rbac.ClusterRoleBindingSubjectsGenerate},
- {"kubernetes_cluster_role_policy_rules", rbac.ClusterRolePolicyRuleColumns(), rbac.ClusterRolePolicyRulesGenerate},
- {"kubernetes_role_binding_subjects", rbac.RoleBindingSubjectColumns(), rbac.RoleBindingSubjectsGenerate},
- {"kubernetes_role_policy_rules", rbac.RolePolicyRuleColumns(), rbac.RolePolicyRulesGenerate},
-
- // Storage
- {"kubernetes_csi_drivers", storage.CSIDriverColumns(), storage.CSIDriversGenerate},
- {"kubernetes_csi_node_drivers", storage.CSINodeDriverColumns(), storage.CSINodeDriversGenerate},
- // {"kubernetes_storage_capacities", storage.CSIStorageCapacityColumns(), storage.CSIStorageCapacitiesGenerate},
- {"kubernetes_storage_classes", storage.SCClassColumns(), storage.SCClassesGenerate},
- {"kubernetes_volume_attachments", storage.VolumeAttachmentColumns(), storage.VolumeAttachmentsGenerate},
- }
-}
diff --git a/infrastructure/kubequery/internal/k8s/tables/tables_test.go b/infrastructure/kubequery/internal/k8s/tables/tables_test.go
deleted file mode 100644
index b52855a3f1..0000000000
--- a/infrastructure/kubequery/internal/k8s/tables/tables_test.go
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package tables
-
-import (
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-func TestGetTables(t *testing.T) {
- ts := GetTables()
- assert.NotNil(t, ts, "Invalid tables")
- assert.True(t, len(ts) > 40, "Invalid tables count")
-}
diff --git a/infrastructure/kubequery/internal/k8s/utils.go b/infrastructure/kubequery/internal/k8s/utils.go
deleted file mode 100644
index 56c47c5d1b..0000000000
--- a/infrastructure/kubequery/internal/k8s/utils.go
+++ /dev/null
@@ -1,181 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package k8s
-
-import (
- "encoding/json"
- "fmt"
- "reflect"
- "strconv"
- "strings"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/iancoleman/strcase"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-var replacements = map[string]string{
- "IPs": "Ips",
- "URLs": "Urls",
- "CIDRs": "Cidrs",
- "WWIDs": "WwIds",
- "WWNs": "WwNs",
-}
-
-func makeKey(name string) string {
- for k, v := range replacements {
- name = strings.Replace(name, k, v, 1)
- }
- return strcase.ToSnake(name)
-}
-
-func getFieldValue(field reflect.Value) string {
- tp := field.Type()
- kind := tp.Kind()
-
- if kind == reflect.Ptr {
- if field.IsNil() {
- return ""
- }
-
- tp = field.Type().Elem()
- kind = tp.Kind()
- field = field.Elem()
- }
-
- if tp.PkgPath() == "k8s.io/apimachinery/pkg/apis/meta/v1" && tp.Name() == "Time" {
- i := field.Interface()
- if i.(metav1.Time).UTC().IsZero() {
- return "0"
- }
- return strconv.FormatInt(i.(metav1.Time).Unix(), 10)
- }
-
- switch kind {
- case reflect.Map, reflect.Slice:
- if !field.IsNil() {
- bytes, _ := json.Marshal(field.Interface())
- if bytes != nil {
- return string(bytes)
- }
- }
- case reflect.Struct:
- bytes, _ := json.Marshal(field.Interface())
- if bytes != nil {
- return string(bytes)
- }
- case reflect.String:
- return string(field.String())
- case reflect.Bool:
- if field.Bool() {
- return "1"
- }
- return "0"
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
- return strconv.FormatInt(field.Int(), 10)
- case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
- return strconv.FormatUint(field.Uint(), 10)
- case reflect.Float32, reflect.Float64:
- return fmt.Sprintf("%f", field.Float())
- default:
- panic(fmt.Sprintf("Type not supported: %s", kind))
- }
-
- return ""
-}
-
-// ToMap returns object fields as key/value map. Field names are converted to snake case.
-// Values are converted to string. Complex value types like structures are serialized as JSON.
-func ToMap(obj interface{}) map[string]string {
- item := make(map[string]string)
- val := reflect.ValueOf(obj)
- if kind := val.Kind(); kind == reflect.Interface || kind == reflect.Ptr {
- val = val.Elem()
- }
-
- for i := 0; i < val.NumField(); i++ {
- field := val.Field(i)
- name := val.Type().Field(i).Name
-
- if val.Type().Field(i).Anonymous {
- if field.Type().Kind() == reflect.Ptr {
- panic(fmt.Sprintf("Embedded pointer to a struct not supported: %s", name))
- }
-
- for k, v := range ToMap(field.Interface()) {
- item[k] = v
- }
- } else {
- key := makeKey(name)
- str := getFieldValue(val.Field(i))
- if str != "" {
- item[key] = str
- }
- }
- }
-
- return item
-}
-
-func getFieldSchema(name string, field reflect.Value) table.ColumnDefinition {
- tp := field.Type()
- kind := tp.Kind()
- key := makeKey(name)
-
- if kind == reflect.Ptr {
- tp = field.Type().Elem()
- kind = tp.Kind()
- }
- if tp.PkgPath() == "k8s.io/apimachinery/pkg/apis/meta/v1" && tp.Name() == "Time" {
- return table.BigIntColumn(key)
- }
-
- switch kind {
- case reflect.Map, reflect.Slice, reflect.Struct, reflect.String:
- return table.TextColumn(key)
- case reflect.Float32, reflect.Float64:
- return table.DoubleColumn(key)
- case reflect.Int64, reflect.Uint64:
- return table.BigIntColumn(key)
- case reflect.Bool, reflect.Int, reflect.Int16, reflect.Int32, reflect.Uint, reflect.Uint16, reflect.Uint32:
- return table.IntegerColumn(key)
- default:
- panic(fmt.Sprintf("Type not supported: %s", kind))
- }
-}
-
-// GetSchema takes a object and returns Osquery table column definitions.
-// Object field names are converted to snake case.
-// The object fields including anonymous ones are identified appropriate column definitions are identified.
-func GetSchema(obj interface{}) []table.ColumnDefinition {
- schema := make([]table.ColumnDefinition, 0)
- val := reflect.ValueOf(obj)
- if kind := val.Kind(); kind == reflect.Interface || kind == reflect.Ptr {
- val = val.Elem()
- }
-
- for i := 0; i < val.NumField(); i++ {
- field := val.Field(i)
- name := val.Type().Field(i).Name
-
- if val.Type().Field(i).Anonymous {
- if field.Type().Kind() == reflect.Ptr {
- panic(fmt.Sprintf("Embedded pointer to a struct not supported: %s", name))
- }
-
- s := GetSchema(field.Interface())
- schema = append(schema, s...)
- } else {
- schema = append(schema, getFieldSchema(name, field))
- }
- }
-
- return schema
-}
diff --git a/infrastructure/kubequery/internal/k8s/utils_test.go b/infrastructure/kubequery/internal/k8s/utils_test.go
deleted file mode 100644
index 44b7e310bf..0000000000
--- a/infrastructure/kubequery/internal/k8s/utils_test.go
+++ /dev/null
@@ -1,190 +0,0 @@
-/**
- * Copyright (c) 2020-present, The kubequery authors
- *
- * This source code is licensed as defined by the LICENSE file found in the
- * root directory of this source tree.
- *
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
-package k8s
-
-import (
- "testing"
-
- "github.com/Uptycs/basequery-go/plugin/table"
- "github.com/stretchr/testify/assert"
- v1 "k8s.io/api/core/v1"
-)
-
-func TestMakeKey(t *testing.T) {
- assert.Equal(t, "host_ip", makeKey("HostIP"))
- assert.Equal(t, "host_ips", makeKey("HostIPs"))
- assert.Equal(t, "iscsi_interface", makeKey("ISCSIInterface"))
-}
-
-func TestGetSchema(t *testing.T) {
- assert.Equal(t, []table.ColumnDefinition{
- table.TextColumn("se_linux_options_user"),
- table.TextColumn("se_linux_options_role"),
- table.TextColumn("se_linux_options_type"),
- table.TextColumn("se_linux_options_level"),
- table.TextColumn("windows_options_gmsa_credential_spec_name"),
- table.TextColumn("windows_options_gmsa_credential_spec"),
- table.TextColumn("windows_options_run_as_user_name"),
- table.TextColumn("seccomp_profile_type"),
- table.TextColumn("seccomp_profile_localhost_profile"),
- table.BigIntColumn("run_as_user"),
- table.BigIntColumn("run_as_group"),
- table.IntegerColumn("run_as_non_root"),
- table.TextColumn("supplemental_groups"),
- table.BigIntColumn("fs_group"),
- table.TextColumn("sysctls"),
- table.TextColumn("fs_group_change_policy"),
- table.TextColumn("node_affinity"),
- table.TextColumn("pod_affinity"),
- table.TextColumn("pod_anti_affinity"),
- table.TextColumn("dns_config_nameservers"),
- table.TextColumn("dns_config_searches"),
- table.TextColumn("dns_config_options"),
- table.TextColumn("node_selector"),
- table.TextColumn("restart_policy"),
- table.BigIntColumn("termination_grace_period_seconds"),
- table.BigIntColumn("active_deadline_seconds"),
- table.TextColumn("dns_policy"),
- table.TextColumn("service_account_name"),
- table.IntegerColumn("automount_service_account_token"),
- table.TextColumn("node_name"),
- table.IntegerColumn("host_network"),
- table.IntegerColumn("host_pid"),
- table.IntegerColumn("host_ipc"),
- table.IntegerColumn("share_process_namespace"),
- table.TextColumn("image_pull_secrets"),
- table.TextColumn("hostname"),
- table.TextColumn("subdomain"),
- table.TextColumn("scheduler_name"),
- table.TextColumn("tolerations"),
- table.TextColumn("host_aliases"),
- table.TextColumn("priority_class_name"),
- table.IntegerColumn("priority"),
- table.TextColumn("readiness_gates"),
- table.TextColumn("runtime_class_name"),
- table.IntegerColumn("enable_service_links"),
- table.TextColumn("preemption_policy"),
- table.TextColumn("overhead"),
- table.TextColumn("topology_spread_constraints"),
- table.IntegerColumn("set_hostname_as_fqdn"),
- }, GetSchema(CommonPodFields{}))
-}
-
-func TestToMap(t *testing.T) {
- i32 := int32(456)
- i64 := int64(123)
- b := bool(true)
- s := string("s123")
- assert.Equal(t,
- map[string]string{
- "active_deadline_seconds": "123",
- "automount_service_account_token": "1",
- "dns_config_nameservers": "[\"\"]",
- "dns_config_options": "[{},{},{}]",
- "dns_config_searches": "[\"\",\"\"]",
- "dns_policy": "ClusterFirst",
- "enable_service_links": "1",
- "fs_group": "123",
- "fs_group_change_policy": "s123",
- "host_aliases": "[{}]",
- "host_ipc": "1",
- "host_network": "1",
- "host_pid": "1",
- "hostname": "h123",
- "image_pull_secrets": "[{},{},{}]",
- "node_affinity": "{\"requiredDuringSchedulingIgnoredDuringExecution\":{\"nodeSelectorTerms\":null}}",
- "node_name": "n123",
- "node_selector": "{}",
- "overhead": "{}",
- "priority": "456",
- "priority_class_name": "p123",
- "readiness_gates": "[]",
- "restart_policy": "Always",
- "run_as_group": "123",
- "run_as_non_root": "1",
- "run_as_user": "123",
- "runtime_class_name": "s123",
- "scheduler_name": "sn123",
- "se_linux_options_role": "r123",
- "se_linux_options_type": "t123",
- "se_linux_options_user": "u123",
- "seccomp_profile_type": "Unconfined",
- "service_account_name": "s123",
- "set_hostname_as_fqdn": "1",
- "share_process_namespace": "1",
- "subdomain": "sub123",
- "supplemental_groups": "[0]",
- "sysctls": "[{\"name\":\"n1\",\"value\":\"v1\"}]",
- "termination_grace_period_seconds": "123",
- "tolerations": "[{},{}]",
- "topology_spread_constraints": "[{\"maxSkew\":0,\"topologyKey\":\"\",\"whenUnsatisfiable\":\"\"},{\"maxSkew\":0,\"topologyKey\":\"\",\"whenUnsatisfiable\":\"\"},{\"maxSkew\":0,\"topologyKey\":\"\",\"whenUnsatisfiable\":\"\"},{\"maxSkew\":0,\"topologyKey\":\"\",\"whenUnsatisfiable\":\"\"}]",
- },
- ToMap(CommonPodFields{
- RestartPolicy: v1.RestartPolicyAlways,
- TerminationGracePeriodSeconds: &i64,
- ActiveDeadlineSeconds: &i64,
- DNSPolicy: v1.DNSClusterFirst,
- ServiceAccountName: "s123",
- AutomountServiceAccountToken: &b,
- NodeSelector: make(map[string]string),
- NodeName: "n123",
- HostNetwork: true,
- HostPID: true,
- HostIPC: true,
- ShareProcessNamespace: &b,
- ImagePullSecrets: make([]v1.LocalObjectReference, 3),
- Hostname: "h123",
- Subdomain: "sub123",
- SchedulerName: "sn123",
- Tolerations: make([]v1.Toleration, 2),
- HostAliases: make([]v1.HostAlias, 1),
- PriorityClassName: "p123",
- Priority: &i32,
- ReadinessGates: []v1.PodReadinessGate{},
- RuntimeClassName: &s,
- EnableServiceLinks: &b,
- PreemptionPolicy: nil,
- Overhead: make(v1.ResourceList),
- TopologySpreadConstraints: make([]v1.TopologySpreadConstraint, 4),
- SetHostnameAsFQDN: &b,
- AffinityFields: AffinityFields{
- NodeAffinity: &v1.NodeAffinity{RequiredDuringSchedulingIgnoredDuringExecution: &v1.NodeSelector{}},
- PodAffinity: nil,
- PodAntiAffinity: nil,
- },
- DNSConfigFields: DNSConfigFields{
- DNSConfigNameservers: make([]string, 1),
- DNSConfigSearches: make([]string, 2),
- DNSConfigOptions: make([]v1.PodDNSConfigOption, 3),
- },
- PodSecurityContextFields: PodSecurityContextFields{
- CommonSecurityContextFields: CommonSecurityContextFields{
- SELinuxOptionsFields: SELinuxOptionsFields{
- SELinuxOptionsUser: "u123",
- SELinuxOptionsRole: "r123",
- SELinuxOptionsType: "t123",
- SELinuxOptionsLevel: "",
- },
- WindowsOptionsFields: WindowsOptionsFields{},
- SeccompProfileFields: SeccompProfileFields{
- SeccompProfileType: v1.SeccompProfileTypeUnconfined,
- SeccompProfileLocalhostProfile: nil,
- },
- RunAsUser: &i64,
- RunAsGroup: &i64,
- RunAsNonRoot: &b,
- },
- FSGroup: &i64,
- FSGroupChangePolicy: (*v1.PodFSGroupChangePolicy)(&s),
- Sysctls: []v1.Sysctl{{Name: "n1", Value: "v1"}},
- SupplementalGroups: make([]int64, 1),
- },
- }))
-}
diff --git a/infrastructure/kubequery/internal/tools.go b/infrastructure/kubequery/internal/tools.go
deleted file mode 100644
index 60502989c1..0000000000
--- a/infrastructure/kubequery/internal/tools.go
+++ /dev/null
@@ -1,7 +0,0 @@
-// +build tools
-
-package internal
-
-import (
- _ "golang.org/x/lint"
-)
diff --git a/infrastructure/kubequery/kubequery-template.yaml b/infrastructure/kubequery/kubequery-template.yaml
deleted file mode 100644
index 9f890a6f95..0000000000
--- a/infrastructure/kubequery/kubequery-template.yaml
+++ /dev/null
@@ -1,123 +0,0 @@
-# Copyright (c) 2020-present, The kubequery authors
-#
-# This source code is licensed as defined by the LICENSE file found in the
-# root directory of this source tree.
-#
-# SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
-
----
-apiVersion: v1
-kind: Namespace
-metadata:
- name: kubequery
- labels:
- app.kubernetes.io/name: kubequery
- app.kubernetes.io/part-of: kubequery
- app.kubernetes.io/version: latest
-
----
-apiVersion: v1
-kind: ServiceAccount
-metadata:
- name: kubequery-sa
- namespace: kubequery
- labels:
- app.kubernetes.io/name: kubequery-sa
- app.kubernetes.io/part-of: kubequery
- app.kubernetes.io/version: latest
-
----
-apiVersion: rbac.authorization.k8s.io/v1
-kind: ClusterRole
-metadata:
- name: kubequery-clusterrole
- labels:
- app.kubernetes.io/name: kubequery-clusterrole
- app.kubernetes.io/part-of: kubequery
- app.kubernetes.io/version: latest
-rules:
-- apiGroups: ["", "admissionregistration.k8s.io", "apps", "autoscaling", "batch", "events.k8s.io", "networking.k8s.io", "policy", "rbac.authorization.k8s.io", "storage.k8s.io"]
- resources: ["*"]
- verbs: ["get", "list", "watch"]
-
----
-apiVersion: rbac.authorization.k8s.io/v1
-kind: ClusterRoleBinding
-metadata:
- name: kubequery-clusterrolebinding
- labels:
- app.kubernetes.io/name: kubequery-clusterrolebinding
- app.kubernetes.io/part-of: kubequery
- app.kubernetes.io/version: latest
-roleRef:
- kind: ClusterRole
- name: kubequery-clusterrole
- apiGroup: rbac.authorization.k8s.io
-subjects:
-- kind: ServiceAccount
- name: kubequery-sa
- namespace: kubequery
-
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: kubequery-config
- namespace: kubequery
- labels:
- app.kubernetes.io/name: kubequery-config
- app.kubernetes.io/part-of: kubequery
- app.kubernetes.io/version: latest
-data:
- enroll.secret: TODO
- kubequery.flags: |
- kubequery.conf: |
-
----
-apiVersion: apps/v1
-kind: Deployment
-metadata:
- name: kubequery
- namespace: kubequery
- labels:
- app.kubernetes.io/name: kubequery
- app.kubernetes.io/part-of: kubequery
- app.kubernetes.io/version: latest
-spec:
- replicas: 1
- selector:
- matchLabels:
- app.kubernetes.io/name: kubequery
- template:
- metadata:
- labels:
- app.kubernetes.io/name: kubequery
- app.kubernetes.io/part-of: kubequery
- app.kubernetes.io/version: latest
- spec:
- hostname: my-cluster # TODO: Give a friendly cluster name
- securityContext:
- runAsNonRoot: true
- runAsUser: 1000
- runAsGroup: 1000
- fsGroup: 1000
- terminationGracePeriodSeconds: 10
- serviceAccountName: kubequery-sa
- containers:
- - name: kubequery
- image: uptycs/kubequery:latest
- imagePullPolicy: Always
- resources:
- requests:
- cpu: 200m
- memory: 128Mi
- limits:
- cpu: 1000m
- memory: 512Mi
- volumeMounts:
- - name: config
- mountPath: /opt/uptycs/config
- volumes:
- - name: config
- configMap:
- name: kubequery-config
diff --git a/it-and-security/lib/automatic-enrollment.dep.json b/it-and-security/lib/automatic-enrollment.dep.json
index b7a6289ee5..2836d719d3 100644
--- a/it-and-security/lib/automatic-enrollment.dep.json
+++ b/it-and-security/lib/automatic-enrollment.dep.json
@@ -6,11 +6,8 @@
"language": "en",
"region": "US",
"skip_setup_items": [
- "Accessibility",
- "Appearance",
"AppleID",
"AppStore",
- "Biometric",
"Diagnostics",
"FileVault",
"iCloudDiagnostics",
diff --git a/it-and-security/lib/software/mac-google-chrome.yml b/it-and-security/lib/software/mac-google-chrome.yml
new file mode 100644
index 0000000000..fb3d1f7be9
--- /dev/null
+++ b/it-and-security/lib/software/mac-google-chrome.yml
@@ -0,0 +1,2 @@
+url: https://dl.google.com/chrome/mac/stable/accept_tos%3Dhttps%253A%252F%252Fwww.google.com%252Fintl%252Fen_ph%252Fchrome%252Fterms%252F%26_and_accept_tos%3Dhttps%253A%252F%252Fpolicies.google.com%252Fterms/googlechrome.pkg
+self_service: true
\ No newline at end of file
diff --git a/it-and-security/lib/software/mac-mozilla-firefox.yml b/it-and-security/lib/software/mac-mozilla-firefox.yml
new file mode 100644
index 0000000000..9bd43612c0
--- /dev/null
+++ b/it-and-security/lib/software/mac-mozilla-firefox.yml
@@ -0,0 +1,2 @@
+url: https://download-installer.cdn.mozilla.net/pub/firefox/releases/132.0.2/mac/en-US/Firefox%20132.0.2.pkg
+self_service: true
diff --git a/it-and-security/lib/software/mac-zoom.yml b/it-and-security/lib/software/mac-zoom.yml
new file mode 100644
index 0000000000..16f557ca45
--- /dev/null
+++ b/it-and-security/lib/software/mac-zoom.yml
@@ -0,0 +1,2 @@
+url: https://zoom.us/client/6.2.10.43047/ZoomInstallerIT.pkg
+self_service: true
\ No newline at end of file
diff --git a/it-and-security/teams/workstations-canary.yml b/it-and-security/teams/workstations-canary.yml
index a8f4d7390a..43fdb0a143 100644
--- a/it-and-security/teams/workstations-canary.yml
+++ b/it-and-security/teams/workstations-canary.yml
@@ -92,7 +92,7 @@ controls:
enable_end_user_authentication: true
macos_setup_assistant: null
macos_updates:
- deadline: "2024-12-02"
+ deadline: "2024-12-04"
minimum_version: "15.1.1"
windows_settings:
custom_settings:
@@ -139,12 +139,13 @@ policies:
platform: darwin
calendar_events_enabled: true
- name: macOS - Upgrade Firefox
- query: SELECT 1 FROM apps WHERE name = 'Firefox.app' AND version_compare(bundle_short_version, '130.0.1') >= 0;
+ query: SELECT 1 FROM apps WHERE name = 'Firefox.app' AND version_compare(bundle_short_version, '132.0.0') >= 0;
critical: false
description: The host may have an outdated or non-existent version of Firefox, potentially risking security vulnerabilities or compatibility issues.
resolution: During maintenance, the Firefox app could be updated to the correct version or installed if it's missing.
platform: darwin
- calendar_events_enabled: false
+ install_software:
+ package_path: "../lib/software/mac-mozilla-firefox.yml"
- name: macOS - Upgrade Slack
query: SELECT 1 FROM apps WHERE name = 'Slack.app' AND version_compare(bundle_short_version, '4.40.126') >= 0;
critical: false
@@ -166,3 +167,5 @@ software:
- app_store_id: '1333542190' # 1Password 7 Desktop
- app_store_id: '1477376905' # GitHub
- app_store_id: '1152747299' # Figma
+ packages:
+ - path: ../lib/software/mac-mozilla-firefox.yml # Mozilla Firefox for MacOS (universal)
diff --git a/it-and-security/teams/workstations.yml b/it-and-security/teams/workstations.yml
index 4c30ac4b00..6f6c4bfc8a 100644
--- a/it-and-security/teams/workstations.yml
+++ b/it-and-security/teams/workstations.yml
@@ -59,9 +59,14 @@ controls:
macos_setup:
bootstrap_package: ""
enable_end_user_authentication: true
- macos_setup_assistant: null
+ macos_setup_assistant: ../lib/automatic-enrollment.dep.json
+ software:
+ - package_path: ../lib/software/mac-google-chrome.yml # Google Chrome for macOS
+ - package_path: ../lib/software/mac-zoom.yml # Zoom for macOS
+ - app_store_id: '803453959' # Slack Desktop
+ - app_store_id: '1333542190' # 1Password 7 Desktop
macos_updates:
- deadline: "2024-12-02"
+ deadline: "2024-12-04"
minimum_version: "15.1.1"
windows_settings:
custom_settings: null
@@ -101,12 +106,8 @@ queries:
observer_can_run: true
software:
packages:
- - url: https://zoom.us/client/latest/Zoom.pkg?archType=arm64
- pre_install_query:
- path: ../lib/macos-check-if-apple-silicon.queries.yml
- self_service: true
- - url: https://dl.google.com/chrome/mac/stable/accept_tos%3Dhttps%253A%252F%252Fwww.google.com%252Fintl%252Fen_ph%252Fchrome%252Fterms%252F%26_and_accept_tos%3Dhttps%253A%252F%252Fpolicies.google.com%252Fterms/googlechrome.pkg
- self_service: true
+ - path: ../lib/software/mac-zoom.yml # Zoom for macOS
+ - path: ../lib/software/mac-google-chrome.yml # Google Chrome for macOS
app_store_apps:
- app_store_id: '803453959' # Slack Desktop
- app_store_id: '1333542190' # 1Password 7 Desktop
diff --git a/orbit/CHANGELOG.md b/orbit/CHANGELOG.md
index 780120ca45..e2156c24dc 100644
--- a/orbit/CHANGELOG.md
+++ b/orbit/CHANGELOG.md
@@ -1,3 +1,21 @@
+## Orbit 1.36.0 (Nov 25, 2024)
+
+* Upgraded macadmins osquery-extension to v1.2.3.
+
+* Added `computer_name` and `hardware_model` for fleetd enrollment.
+
+* Added serial number for fleetd enrollment for Windows hosts (already present for macOS and Linux).
+
+* Added `codesign` table to provide the "Team identifier" of macOS applications.
+
+* Fixed stale Fleet Desktop token UUID after a macOS host completes Migration Assistant.
+
+* Added functionality to support linux disk encryption key escrow including end user prompts and LUKS key management
+
+* Fixed issue with fleetd not able to connect to Fleet server after Fleet MDM profiles have been removed.
+
+* Fixed cases where self-service menu item temporarily disappeared from Fleet Desktop menu when it should have stayed visible.
+
## Orbit 1.35.0 (Nov 01, 2024)
* Fixed orbit startup to not exit when "root.json", "snapshot.json", or "targets.json" TUF signatures have expired.
diff --git a/orbit/TUF.md b/orbit/TUF.md
index 081ff7518e..08a22d79b8 100644
--- a/orbit/TUF.md
+++ b/orbit/TUF.md
@@ -7,8 +7,8 @@ Following are the currently deployed versions of fleetd components on the `stabl
| Component\OS | macOS | Linux | Windows | Linux (arm64) |
|--------------|--------------|--------|---------|---------------|
-| orbit | 1.35.0 | 1.35.0 | 1.35.0 | 1.35.0 |
-| desktop | 1.35.0 | 1.35.0 | 1.35.0 | 1.35.0 |
+| orbit | 1.36.0 | 1.36.0 | 1.36.0 | 1.36.0 |
+| desktop | 1.36.0 | 1.36.0 | 1.36.0 | 1.36.0 |
| osqueryd | 5.14.1 | 5.14.1 | 5.14.1 | 5.14.1 |
| nudge | 1.1.10.81462 | - | - | - |
| swiftDialog | 2.1.0 | - | - | - |
@@ -18,8 +18,8 @@ Following are the currently deployed versions of fleetd components on the `stabl
| Component\OS | macOS | Linux | Windows | Linux (arm64) |
|--------------|--------|--------|---------|---------------|
-| orbit | 1.35.0 | 1.35.0 | 1.35.0 | 1.35.0 |
-| desktop | 1.35.0 | 1.35.0 | 1.35.0 | 1.35.0 |
+| orbit | 1.36.0 | 1.36.0 | 1.36.0 | 1.36.0 |
+| desktop | 1.36.0 | 1.36.0 | 1.36.0 | 1.36.0 |
| osqueryd | 5.14.1 | 5.14.1 | 5.14.1 | 5.14.1 |
| nudge | - | - | - | - |
| swiftDialog | - | - | - | - |
diff --git a/orbit/changes/21948-self-service-checked b/orbit/changes/21948-self-service-checked
deleted file mode 100644
index c8a10876f9..0000000000
--- a/orbit/changes/21948-self-service-checked
+++ /dev/null
@@ -1 +0,0 @@
-* Fixed cases where self-service menu item temporarily disappeared from Fleet Desktop menu when it should have stayed visible.
diff --git a/orbit/changes/22047-linux-key-escrow b/orbit/changes/22047-linux-key-escrow
deleted file mode 100644
index d8a3daa001..0000000000
--- a/orbit/changes/22047-linux-key-escrow
+++ /dev/null
@@ -1 +0,0 @@
-* added functionality to support linux disk encryption key escrow including end user prompts and LUKS key management
\ No newline at end of file
diff --git a/orbit/changes/22810-fleetd-enroll-activity b/orbit/changes/22810-fleetd-enroll-activity
deleted file mode 100644
index 2b99a1a860..0000000000
--- a/orbit/changes/22810-fleetd-enroll-activity
+++ /dev/null
@@ -1,2 +0,0 @@
-Added computer_name and hardware_model for fleetd enrollment.
-Added serial number for fleetd enrollment for Windows hosts (already present for macOS and Linux).
diff --git a/orbit/changes/22898-support-windows-mdm-migration b/orbit/changes/22898-support-windows-mdm-migration
new file mode 100644
index 0000000000..e4e0401d2b
--- /dev/null
+++ b/orbit/changes/22898-support-windows-mdm-migration
@@ -0,0 +1 @@
+* Added support to migrate the MDM provider of Windows devices to Fleet.
diff --git a/orbit/changes/23164-delete-migrated-identifier b/orbit/changes/23164-delete-migrated-identifier
deleted file mode 100644
index 367f7eebc2..0000000000
--- a/orbit/changes/23164-delete-migrated-identifier
+++ /dev/null
@@ -1 +0,0 @@
-* Fixed stale Fleet Desktop token UUID after a macOS host completes Migration Assistant.
diff --git a/orbit/changes/23438-fleetd-with-mdm-removed b/orbit/changes/23438-fleetd-with-mdm-removed
deleted file mode 100644
index 7112459566..0000000000
--- a/orbit/changes/23438-fleetd-with-mdm-removed
+++ /dev/null
@@ -1 +0,0 @@
-Fixed issue with fleetd not able to connect to Fleet server after Fleet MDM profiles have been removed.
diff --git a/orbit/changes/add-codesign-table b/orbit/changes/add-codesign-table
deleted file mode 100644
index 49b38025d6..0000000000
--- a/orbit/changes/add-codesign-table
+++ /dev/null
@@ -1 +0,0 @@
-* Added `codesign` table to provide the "Team identifier" of macOS applications.
diff --git a/orbit/changes/upgrade-macadmins-osquery-extension-to-1.2.3 b/orbit/changes/upgrade-macadmins-osquery-extension-to-1.2.3
deleted file mode 100644
index 81025b3fbc..0000000000
--- a/orbit/changes/upgrade-macadmins-osquery-extension-to-1.2.3
+++ /dev/null
@@ -1 +0,0 @@
-* Upgraded macadmins osquery-extension to v1.2.3.
diff --git a/orbit/pkg/lvm/lvm.go b/orbit/pkg/lvm/lvm.go
index c662d80d78..ea55db731c 100644
--- a/orbit/pkg/lvm/lvm.go
+++ b/orbit/pkg/lvm/lvm.go
@@ -12,6 +12,7 @@ type BlockDevice struct {
Name string `json:"name"`
Type string `json:"type"`
Mountpoints []string `json:"mountpoints"`
+ Mountpoint string `json:"mountpoint"` // on older ubuntu versions
Children []BlockDevice `json:"children,omitempty"`
}
@@ -68,6 +69,10 @@ func findRootPartition(devices []BlockDevice) *BlockDevice {
// searchForRoot recursively checks each device and its children
// to find the one mounted at "/".
func searchForRoot(device BlockDevice) *BlockDevice {
+ if device.Mountpoint == "/" {
+ return &device
+ }
+
for _, mountpoint := range device.Mountpoints {
if mountpoint == "/" {
return &device
diff --git a/orbit/pkg/lvm/lvm_test.go b/orbit/pkg/lvm/lvm_test.go
index 73058caf09..dde1a707dd 100644
--- a/orbit/pkg/lvm/lvm_test.go
+++ b/orbit/pkg/lvm/lvm_test.go
@@ -295,6 +295,134 @@ var testJsonFedora = `{
]
}`
+var testJsonOther = `{
+ "blockdevices": [
+ {
+ "name": "loop0",
+ "maj:min": "7:0",
+ "rm": false,
+ "size": "4K",
+ "ro": true,
+ "type": "loop",
+ "mountpoint": "/snap/bare/5"
+ },
+ {
+ "name": "loop1",
+ "maj:min": "7:1",
+ "rm": false,
+ "size": "346.3M",
+ "ro": true,
+ "type": "loop",
+ "mountpoint": "/snap/gnome-3-38-2004/119"
+ },
+ {
+ "name": "loop2",
+ "maj:min": "7:2",
+ "rm": false,
+ "size": "49.9M",
+ "ro": true,
+ "type": "loop",
+ "mountpoint": "/snap/snapd/18357"
+ },
+ {
+ "name": "loop3",
+ "maj:min": "7:3",
+ "rm": false,
+ "size": "46M",
+ "ro": true,
+ "type": "loop",
+ "mountpoint": "/snap/snap-store/638"
+ },
+ {
+ "name": "loop4",
+ "maj:min": "7:4",
+ "rm": false,
+ "size": "63.3M",
+ "ro": true,
+ "type": "loop",
+ "mountpoint": "/snap/core20/1828"
+ },
+ {
+ "name": "loop5",
+ "maj:min": "7:5",
+ "rm": false,
+ "size": "91.7M",
+ "ro": true,
+ "type": "loop",
+ "mountpoint": "/snap/gtk-common-themes/1535"
+ },
+ {
+ "name": "nvme0n1",
+ "maj:min": "259:0",
+ "rm": false,
+ "size": "953.9G",
+ "ro": false,
+ "type": "disk",
+ "mountpoint": null,
+ "children": [
+ {
+ "name": "nvme0n1p1",
+ "maj:min": "259:1",
+ "rm": false,
+ "size": "512M",
+ "ro": false,
+ "type": "part",
+ "mountpoint": "/boot/efi"
+ },
+ {
+ "name": "nvme0n1p2",
+ "maj:min": "259:2",
+ "rm": false,
+ "size": "1.4G",
+ "ro": false,
+ "type": "part",
+ "mountpoint": "/boot"
+ },
+ {
+ "name": "nvme0n1p3",
+ "maj:min": "259:3",
+ "rm": false,
+ "size": "952G",
+ "ro": false,
+ "type": "part",
+ "mountpoint": null,
+ "children": [
+ {
+ "name": "nvme0n1p3_crypt",
+ "maj:min": "253:0",
+ "rm": false,
+ "size": "951.9G",
+ "ro": false,
+ "type": "crypt",
+ "mountpoint": null,
+ "children": [
+ {
+ "name": "vgubuntu-root",
+ "maj:min": "253:1",
+ "rm": false,
+ "size": "930.4G",
+ "ro": false,
+ "type": "lvm",
+ "mountpoint": "/"
+ },
+ {
+ "name": "vgubuntu-swap_1",
+ "maj:min": "253:2",
+ "rm": false,
+ "size": "976M",
+ "ro": false,
+ "type": "lvm",
+ "mountpoint": "[SWAP]"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}`
+
func TestFindRootDisk(t *testing.T) {
var input bytes.Buffer
_, err := input.WriteString(testJsonUbuntu)
@@ -311,6 +439,14 @@ func TestFindRootDisk(t *testing.T) {
output, err = rootDiskFromJson(input)
assert.NoError(t, err)
assert.Equal(t, "/dev/nvme0n1p3", output)
+
+ input = bytes.Buffer{}
+ _, err = input.WriteString(testJsonOther)
+ assert.NoError(t, err)
+
+ output, err = rootDiskFromJson(input)
+ assert.NoError(t, err)
+ assert.Equal(t, "/dev/nvme0n1p3", output)
}
func TestErrorNoMountPoint(t *testing.T) {
diff --git a/orbit/pkg/update/execwinapi_windows.go b/orbit/pkg/update/execwinapi_windows.go
index 3c0988a0fc..d07e50192f 100644
--- a/orbit/pkg/update/execwinapi_windows.go
+++ b/orbit/pkg/update/execwinapi_windows.go
@@ -175,7 +175,8 @@ func generateWindowsMDMAccessTokenPayload(args WindowsMDMEnrollmentArgs) ([]byte
return json.Marshal(pld)
}
-// IsRunningOnWindowsServer determines if the process is running on a Windows server. Exported so it can be used across packages.
+// IsRunningOnWindowsServer determines if the process is running on a Windows
+// server. Exported so it can be used across packages.
func IsRunningOnWindowsServer() (bool, error) {
installType, err := readInstallationType()
if err != nil {
diff --git a/orbit/pkg/update/notifications.go b/orbit/pkg/update/notifications.go
index cd5f256458..8e1b1003a6 100644
--- a/orbit/pkg/update/notifications.go
+++ b/orbit/pkg/update/notifications.go
@@ -165,14 +165,22 @@ func ApplyWindowsMDMEnrollmentFetcherMiddleware(
var errIsWindowsServer = errors.New("device is a Windows Server")
-// GetConfig calls the wrapped Fetcher's GetConfig method, and if the fleet
-// server set the "needs windows enrollment" flag to true, executes the command
-// to enroll into Windows MDM (or not, if the device is a Windows Server).
+// Run checks if the fleet server set the "needs windows {un}enrollment" flag
+// to true, and executes the command to {un}enroll into Windows MDM (or not, if
+// the device is a Windows Server). It also unenrolls the device if the flag
+// "needs MDM migration" is set to true, so that the device can then be
+// enrolled in Fleet MDM.
func (w *windowsMDMEnrollmentConfigReceiver) Run(cfg *fleet.OrbitConfig) error {
- if cfg.Notifications.NeedsProgrammaticWindowsMDMEnrollment {
+ switch {
+ case cfg.Notifications.NeedsProgrammaticWindowsMDMEnrollment:
w.attemptEnrollment(cfg.Notifications)
- } else if cfg.Notifications.NeedsProgrammaticWindowsMDMUnenrollment {
- w.attemptUnenrollment()
+ case cfg.Notifications.NeedsProgrammaticWindowsMDMUnenrollment,
+ cfg.Notifications.NeedsMDMMigration:
+ label := "unenroll"
+ if cfg.Notifications.NeedsMDMMigration {
+ label = "migrate"
+ }
+ w.attemptUnenrollment(label)
}
return nil
}
@@ -227,18 +235,18 @@ func (w *windowsMDMEnrollmentConfigReceiver) attemptEnrollment(notifs fleet.Orbi
}
}
-func (w *windowsMDMEnrollmentConfigReceiver) attemptUnenrollment() {
+func (w *windowsMDMEnrollmentConfigReceiver) attemptUnenrollment(actionLabel string) {
if w.mu.TryLock() {
defer w.mu.Unlock()
// do not unenroll Windows Servers, and do not attempt unenrollment if the
// last run is not at least Frequency ago.
if w.isWindowsServer {
- log.Debug().Msg("skipped calling UnregisterDeviceWithManagement to unenroll Windows device, device is a server")
+ log.Debug().Msgf("skipped calling UnregisterDeviceWithManagement to %s Windows device, device is a server", actionLabel)
return
}
if time.Since(w.lastUnenrollRun) <= w.Frequency {
- log.Debug().Msg("skipped calling UnregisterDeviceWithManagement to unenroll Windows device, last run was too recent")
+ log.Debug().Msgf("skipped calling UnregisterDeviceWithManagement to %s Windows device, last run was too recent", actionLabel)
return
}
@@ -252,15 +260,15 @@ func (w *windowsMDMEnrollmentConfigReceiver) attemptUnenrollment() {
if err := fn(args); err != nil {
if errors.Is(err, errIsWindowsServer) {
w.isWindowsServer = true
- log.Info().Msg("device is a Windows Server, skipping unenrollment")
+ log.Info().Msgf("device is a Windows Server, skipping %s", actionLabel)
} else {
- log.Info().Err(err).Msg("calling UnregisterDeviceWithManagement to unenroll Windows device failed")
+ log.Info().Err(err).Msgf("calling UnregisterDeviceWithManagement to %s Windows device failed", actionLabel)
}
return
}
w.lastUnenrollRun = time.Now()
- log.Info().Msg("successfully called UnregisterDeviceWithManagement to unenroll Windows device")
+ log.Info().Msgf("successfully called UnregisterDeviceWithManagement to %s Windows device", actionLabel)
}
}
diff --git a/orbit/pkg/update/notifications_test.go b/orbit/pkg/update/notifications_test.go
index 1455d8fc7e..a16b9dfbf1 100644
--- a/orbit/pkg/update/notifications_test.go
+++ b/orbit/pkg/update/notifications_test.go
@@ -191,21 +191,27 @@ func TestWindowsMDMEnrollment(t *testing.T) {
desc string
enrollFlag *bool
unenrollFlag *bool
+ migrateFlag *bool
discoveryURL string
apiErr error
wantAPICalled bool
wantLog string
}{
- {"enroll=false", ptr.Bool(false), nil, "", nil, false, ""},
- {"enroll=true,discovery=''", ptr.Bool(true), nil, "", nil, false, "discovery endpoint is empty"},
- {"enroll=true,discovery!='',success", ptr.Bool(true), nil, "http://example.com", nil, true, "successfully called RegisterDeviceWithManagement"},
- {"enroll=true,discovery!='',fail", ptr.Bool(true), nil, "http://example.com", io.ErrUnexpectedEOF, true, "enroll Windows device failed"},
- {"enroll=true,discovery!='',server", ptr.Bool(true), nil, "http://example.com", errIsWindowsServer, true, "device is a Windows Server, skipping enrollment"},
+ {"enroll=false", ptr.Bool(false), nil, nil, "", nil, false, ""},
+ {"enroll=true,discovery=''", ptr.Bool(true), nil, nil, "", nil, false, "discovery endpoint is empty"},
+ {"enroll=true,discovery!='',success", ptr.Bool(true), nil, nil, "http://example.com", nil, true, "successfully called RegisterDeviceWithManagement"},
+ {"enroll=true,discovery!='',fail", ptr.Bool(true), nil, nil, "http://example.com", io.ErrUnexpectedEOF, true, "enroll Windows device failed"},
+ {"enroll=true,discovery!='',server", ptr.Bool(true), nil, nil, "http://example.com", errIsWindowsServer, true, "device is a Windows Server, skipping enrollment"},
- {"unenroll=false", nil, ptr.Bool(false), "", nil, false, ""},
- {"unenroll=true,success", nil, ptr.Bool(true), "", nil, true, "successfully called UnregisterDeviceWithManagement"},
- {"unenroll=true,fail", nil, ptr.Bool(true), "", io.ErrUnexpectedEOF, true, "unenroll Windows device failed"},
- {"unenroll=true,server", nil, ptr.Bool(true), "", errIsWindowsServer, true, "device is a Windows Server, skipping unenrollment"},
+ {"unenroll=false", nil, ptr.Bool(false), nil, "", nil, false, ""},
+ {"unenroll=true,success", nil, ptr.Bool(true), nil, "", nil, true, "successfully called UnregisterDeviceWithManagement to unenroll"},
+ {"unenroll=true,fail", nil, ptr.Bool(true), nil, "", io.ErrUnexpectedEOF, true, "unenroll Windows device failed"},
+ {"unenroll=true,server", nil, ptr.Bool(true), nil, "", errIsWindowsServer, true, "device is a Windows Server, skipping unenroll"},
+
+ {"migrate=false", nil, nil, ptr.Bool(false), "", nil, false, ""},
+ {"migrate=true,success", nil, nil, ptr.Bool(true), "", nil, true, "successfully called UnregisterDeviceWithManagement to migrate"},
+ {"migrate=true,fail", nil, nil, ptr.Bool(true), "", io.ErrUnexpectedEOF, true, "migrate Windows device failed"},
+ {"migrate=true,server", nil, nil, ptr.Bool(true), "", errIsWindowsServer, true, "device is a Windows Server, skipping migrate"},
}
for _, c := range cases {
@@ -215,12 +221,14 @@ func TestWindowsMDMEnrollment(t *testing.T) {
var (
enroll = c.enrollFlag != nil && *c.enrollFlag
unenroll = c.unenrollFlag != nil && *c.unenrollFlag
+ migrate = c.migrateFlag != nil && *c.migrateFlag
isUnenroll = c.unenrollFlag != nil
)
testConfig := &fleet.OrbitConfig{Notifications: fleet.OrbitConfigNotifications{
NeedsProgrammaticWindowsMDMEnrollment: enroll,
NeedsProgrammaticWindowsMDMUnenrollment: unenroll,
+ NeedsMDMMigration: migrate,
WindowsMDMDiscoveryEndpoint: c.discoveryURL,
}}
@@ -241,7 +249,7 @@ func TestWindowsMDMEnrollment(t *testing.T) {
err := enrollReceiver.Run(testConfig)
require.NoError(t, err) // the dummy receiver never returns an error
- if isUnenroll {
+ if isUnenroll || migrate {
require.Equal(t, c.wantAPICalled, unenrollGotCalled)
require.False(t, enrollGotCalled)
} else {
diff --git a/pkg/spec/gitops.go b/pkg/spec/gitops.go
index c26c9b500f..bdfdf1ceec 100644
--- a/pkg/spec/gitops.go
+++ b/pkg/spec/gitops.go
@@ -33,6 +33,7 @@ type Controls struct {
WindowsUpdates interface{} `json:"windows_updates"`
WindowsSettings interface{} `json:"windows_settings"`
WindowsEnabledAndConfigured interface{} `json:"windows_enabled_and_configured"`
+ WindowsMigrationEnabled interface{} `json:"windows_migration_enabled"`
EnableDiskEncryption interface{} `json:"enable_disk_encryption"`
@@ -46,7 +47,7 @@ func (c Controls) Set() bool {
c.IPadOSUpdates != nil || c.MacOSSettings != nil ||
c.MacOSSetup != nil || c.MacOSMigration != nil ||
c.WindowsUpdates != nil || c.WindowsSettings != nil || c.WindowsEnabledAndConfigured != nil ||
- c.EnableDiskEncryption != nil || len(c.Scripts) > 0
+ c.WindowsMigrationEnabled != nil || c.EnableDiskEncryption != nil || len(c.Scripts) > 0
}
type Policy struct {
diff --git a/pkg/spec/gitops_test.go b/pkg/spec/gitops_test.go
index 8ca334ce36..bdc5423f0a 100644
--- a/pkg/spec/gitops_test.go
+++ b/pkg/spec/gitops_test.go
@@ -216,6 +216,8 @@ func TestValidGitOpsYaml(t *testing.T) {
assert.True(t, ok, "ipados_updates not found")
_, ok = gitops.Controls.WindowsEnabledAndConfigured.(bool)
assert.True(t, ok, "windows_enabled_and_configured not found")
+ _, ok = gitops.Controls.WindowsMigrationEnabled.(bool)
+ assert.True(t, ok, "windows_migration_enabled not found")
_, ok = gitops.Controls.WindowsUpdates.(map[string]interface{})
assert.True(t, ok, "windows_updates not found")
diff --git a/pkg/spec/testdata/controls.yml b/pkg/spec/testdata/controls.yml
index 5da3567921..27fe44dc03 100644
--- a/pkg/spec/testdata/controls.yml
+++ b/pkg/spec/testdata/controls.yml
@@ -25,6 +25,7 @@ ipados_updates:
deadline: null
minimum_version: null
windows_enabled_and_configured: true
+windows_migration_enabled: false
windows_updates:
deadline_days: null
grace_period_days: null
diff --git a/pkg/spec/testdata/global_config_no_paths.yml b/pkg/spec/testdata/global_config_no_paths.yml
index c8d68f9462..36ce19ca3e 100644
--- a/pkg/spec/testdata/global_config_no_paths.yml
+++ b/pkg/spec/testdata/global_config_no_paths.yml
@@ -27,6 +27,7 @@ controls: # Controls added to "No team"
deadline: null
minimum_version: null
windows_enabled_and_configured: true
+ windows_migration_enabled: false
windows_updates:
deadline_days: null
grace_period_days: null
diff --git a/pkg/spec/testdata/team_config_no_paths.yml b/pkg/spec/testdata/team_config_no_paths.yml
index e660d5eccc..2ff83e4730 100644
--- a/pkg/spec/testdata/team_config_no_paths.yml
+++ b/pkg/spec/testdata/team_config_no_paths.yml
@@ -60,6 +60,7 @@ controls:
mode: ""
webhook_url: ""
windows_enabled_and_configured: true
+ windows_migration_enabled: false
queries:
- name: Scheduled query stats
description: Collect osquery performance stats directly from osquery
diff --git a/server/config/config.go b/server/config/config.go
index 821c8547fc..bdfe0898dc 100644
--- a/server/config/config.go
+++ b/server/config/config.go
@@ -1316,19 +1316,6 @@ func (man Manager) addConfigs() {
"calendar.periodicity", 0,
"How much time to wait between processing calendar integration.",
)
-
- // Hide Microsoft/Windows MDM flags as we don't want it to be discoverable for users for now
- betaMDMFlags := []string{
- "mdm.windows_wstep_identity_cert",
- "mdm.windows_wstep_identity_key",
- "mdm.windows_wstep_identity_cert_bytes",
- "mdm.windows_wstep_identity_key_bytes",
- }
- for _, mdmFlag := range betaMDMFlags {
- if flag := man.command.PersistentFlags().Lookup(flagNameFromConfigKey(mdmFlag)); flag != nil {
- flag.Hidden = true
- }
- }
}
func (man Manager) hideConfig(name string) {
diff --git a/server/datastore/mysql/apple_mdm_test.go b/server/datastore/mysql/apple_mdm_test.go
index ea7f92ec89..ef458048c8 100644
--- a/server/datastore/mysql/apple_mdm_test.go
+++ b/server/datastore/mysql/apple_mdm_test.go
@@ -6536,6 +6536,14 @@ func testMDMAppleGetAndUpdateABMToken(t *testing.T, ds *Datastore) {
tm3, err := ds.NewTeam(ctx, &fleet.Team{Name: "team3"})
require.NoError(t, err)
+ toks, err := ds.ListABMTokens(ctx)
+ require.NoError(t, err)
+ require.Empty(t, toks)
+
+ tokCount, err := ds.GetABMTokenCount(ctx)
+ require.NoError(t, err)
+ assert.EqualValues(t, 0, tokCount)
+
// create a token with an empty name and no team set, and another that will be unused
encTok := uuid.NewString()
@@ -6546,10 +6554,14 @@ func testMDMAppleGetAndUpdateABMToken(t *testing.T, ds *Datastore) {
require.NoError(t, err)
require.NotEmpty(t, t2.ID)
- toks, err := ds.ListABMTokens(ctx)
+ toks, err = ds.ListABMTokens(ctx)
require.NoError(t, err)
require.Len(t, toks, 2)
+ tokCount, err = ds.GetABMTokenCount(ctx)
+ require.NoError(t, err)
+ assert.EqualValues(t, 2, tokCount)
+
// get that token
tok, err = ds.GetABMTokenByOrgName(ctx, "")
require.NoError(t, err)
@@ -6645,6 +6657,10 @@ func testMDMAppleGetAndUpdateABMToken(t *testing.T, ds *Datastore) {
require.Equal(t, uint(0), expTok.MacOSTeam.ID)
require.Equal(t, tm2.Name, expTok.IOSTeamName)
require.Equal(t, tm3.Name, expTok.IPadOSTeamName)
+
+ tokCount, err = ds.GetABMTokenCount(ctx)
+ require.NoError(t, err)
+ assert.EqualValues(t, 1, tokCount)
}
func testMDMAppleABMTokensTermsExpired(t *testing.T, ds *Datastore) {
diff --git a/server/datastore/mysql/hosts.go b/server/datastore/mysql/hosts.go
index 0de58ba918..659aa12091 100644
--- a/server/datastore/mysql/hosts.go
+++ b/server/datastore/mysql/hosts.go
@@ -1404,21 +1404,39 @@ func (ds *Datastore) filterHostsByOSSettingsStatus(sql string, opt fleet.HostLis
// or are servers. Similar logic could be applied to macOS hosts but is not included in this
// current implementation.
- sqlFmt := ` AND h.platform IN('windows', 'darwin', 'ios', 'ipados') AND (ne.id IS NOT NULL OR mwe.host_uuid IS NOT NULL) AND hmdm.enrolled = 1`
+ // TODO once testLabelsListHostsInLabelOSSettings enrolls hosts into the correct MDM, switch to this:
+ /*sqlFmt := ` AND (
+ (h.platform = 'windows' AND mwe.host_uuid IS NOT NULL AND hmdm.enrolled = 1) -- windows
+ OR (h.platform IN ('darwin', 'ios', 'ipados') AND ne.id IS NOT NULL AND hmdm.enrolled = 1) -- apple
+ OR (h.platform = 'ubuntu' OR h.os_version LIKE 'Fedora%%') -- linux
+ )`*/
+
+ sqlFmt := ` AND (
+ (h.platform IN('windows', 'darwin', 'ios', 'ipados') AND (ne.id IS NOT NULL OR mwe.host_uuid IS NOT NULL) AND hmdm.enrolled = 1)
+ OR (h.platform = 'ubuntu' OR h.os_version LIKE 'Fedora%%')
+ )`
+
if opt.TeamFilter == nil {
// OS settings filter is not compatible with the "all teams" option so append the "no team"
// filter here (note that filterHostsByTeam applies the "no team" filter if TeamFilter == 0)
sqlFmt += ` AND h.team_id IS NULL`
}
- var whereMacOS, whereWindows string
+ var whereMacOS, whereWindows, whereLinux string
sqlFmt += `
-AND ((h.platform = 'windows' AND (%s))
-OR ((h.platform = 'darwin' OR h.platform = 'ios' OR h.platform = 'ipados') AND (%s)))`
+AND (
+ (h.platform = 'windows' AND (%s))
+ OR ((h.platform = 'darwin' OR h.platform = 'ios' OR h.platform = 'ipados') AND (%s))
+ OR ((h.os_version LIKE 'Fedora%%' OR h.platform = 'ubuntu') AND (%s))
+)`
// construct the WHERE for macOS
whereMacOS = fmt.Sprintf(`(%s) = ?`, sqlCaseMDMAppleStatus())
paramsMacOS := []any{opt.OSSettingsFilter}
+ // construct the WHERE for linux
+ whereLinux = fmt.Sprintf(`(%s) = ?`, sqlCaseLinuxOSSettingsStatus())
+ paramsLinux := []any{opt.OSSettingsFilter}
+
// construct the WHERE for windows
whereWindows = `hmdm.is_server = 0`
paramsWindows := []any{}
@@ -1520,8 +1538,9 @@ OR ((h.platform = 'darwin' OR h.platform = 'ios' OR h.platform = 'ipados') AND (
paramsWindows = append(paramsWindows, opt.OSSettingsFilter)
params = append(params, paramsWindows...)
params = append(params, paramsMacOS...)
+ params = append(params, paramsLinux...)
- return sql + fmt.Sprintf(sqlFmt, whereWindows, whereMacOS), params, nil
+ return sql + fmt.Sprintf(sqlFmt, whereWindows, whereMacOS, whereLinux), params, nil
}
func (ds *Datastore) filterHostsByOSSettingsDiskEncryptionStatus(sql string, opt fleet.HostListOptions, params []interface{}, enableDiskEncryption bool) (string, []interface{}) {
@@ -1529,13 +1548,13 @@ func (ds *Datastore) filterHostsByOSSettingsDiskEncryptionStatus(sql string, opt
return sql, params
}
- sqlFmt := " AND h.platform IN('windows', 'darwin')"
+ sqlFmt := " AND h.platform IN('windows', 'darwin', 'ubuntu', 'rhel')"
if opt.TeamFilter == nil {
// OS settings filter is not compatible with the "all teams" option so append the "no
// team" filter here (note that filterHostsByTeam applies the "no team" filter if TeamFilter == 0)
sqlFmt += ` AND h.team_id IS NULL`
}
- sqlFmt += ` AND ((h.platform = 'windows' AND %s) OR (h.platform = 'darwin' AND %s))`
+ sqlFmt += ` AND ((h.platform = 'windows' AND %s) OR (h.platform = 'darwin' AND %s) OR ((h.platform = 'ubuntu' OR h.os_version LIKE 'Fedora%%') AND %s))`
var subqueryMacOS string
var subqueryParams []interface{}
@@ -1580,7 +1599,10 @@ func (ds *Datastore) filterHostsByOSSettingsDiskEncryptionStatus(sql string, opt
whereMacOS = "EXISTS (" + subqueryMacOS + ")"
}
- return sql + fmt.Sprintf(sqlFmt, whereWindows, whereMacOS), append(params, subqueryParams...)
+ whereLinux := fmt.Sprintf(`(%s) = ?`, sqlCaseLinuxDiskEncryptionStatus())
+ subqueryParams = append(subqueryParams, opt.OSSettingsDiskEncryptionFilter)
+
+ return sql + fmt.Sprintf(sqlFmt, whereWindows, whereMacOS, whereLinux), append(params, subqueryParams...)
}
func filterHostsByMDMBootstrapPackageStatus(sql string, opt fleet.HostListOptions, params []interface{}) (string, []interface{}) {
@@ -3839,16 +3861,19 @@ ON DUPLICATE KEY UPDATE
`, hostID, encryptedBase64Passphrase, encryptedBase64Salt, keySlot)
return err
}
+
func (ds *Datastore) IsHostPendingEscrow(ctx context.Context, hostID uint) bool {
var pendingEscrowCount uint
_ = sqlx.GetContext(ctx, ds.reader(ctx), &pendingEscrowCount, `
SELECT COUNT(*) FROM host_disk_encryption_keys WHERE host_id = ? AND reset_requested = TRUE`, hostID)
return pendingEscrowCount > 0
}
+
func (ds *Datastore) ClearPendingEscrow(ctx context.Context, hostID uint) error {
_, err := ds.writer(ctx).ExecContext(ctx, `UPDATE host_disk_encryption_keys SET reset_requested = FALSE WHERE host_id = ?`, hostID)
return err
}
+
func (ds *Datastore) ReportEscrowError(ctx context.Context, hostID uint, errorMessage string) error {
_, err := ds.writer(ctx).ExecContext(ctx, `
INSERT INTO host_disk_encryption_keys
@@ -3856,6 +3881,7 @@ INSERT INTO host_disk_encryption_keys
`, hostID, errorMessage)
return err
}
+
func (ds *Datastore) QueueEscrow(ctx context.Context, hostID uint) error {
_, err := ds.writer(ctx).ExecContext(ctx, `
INSERT INTO host_disk_encryption_keys
@@ -3863,6 +3889,7 @@ INSERT INTO host_disk_encryption_keys
`, hostID)
return err
}
+
func (ds *Datastore) AssertHasNoEncryptionKeyStored(ctx context.Context, hostID uint) error {
var hasKeyCount uint
err := sqlx.GetContext(ctx, ds.reader(ctx), &hasKeyCount, `
diff --git a/server/datastore/mysql/hosts_test.go b/server/datastore/mysql/hosts_test.go
index de3fe566e7..51e12566a6 100644
--- a/server/datastore/mysql/hosts_test.go
+++ b/server/datastore/mysql/hosts_test.go
@@ -790,6 +790,7 @@ func testHostsDelete(t *testing.T, ds *Datastore) {
}
func listHostsCheckCount(t *testing.T, ds *Datastore, filter fleet.TeamFilter, opt fleet.HostListOptions, expectedCount int) []*fleet.Host {
+ t.Helper()
hosts, err := ds.ListHosts(context.Background(), filter, opt)
require.NoError(t, err)
count, err := ds.CountHosts(context.Background(), filter, opt)
@@ -809,28 +810,35 @@ func testHostListOptionsTeamFilter(t *testing.T, ds *Datastore) {
require.NoError(t, err)
var hosts []*fleet.Host
- for i := 0; i < 10; i++ {
+ for i := 0; i < 20; i++ {
var opts []test.NewHostOption
switch i {
- case 5, 6:
+ case 0:
opts = append(opts, test.WithPlatform("windows"))
+ case 1, 2:
+ opts = append(opts, test.WithPlatform("ubuntu")) // supported for linux encryption
+ case 3, 4, 5:
+ opts = append(opts, test.WithOSVersion("Fedora 33")) // supported for linux encryption
+ case 6, 7, 8, 9:
+ opts = append(opts, test.WithPlatform("foo")) // not supported for linux encryption
}
h := test.NewHost(t, ds, fmt.Sprintf("foo.local.%d", i), "1.1.1.1",
- fmt.Sprintf("%d", i), fmt.Sprintf("%d", i), time.Now(), opts...)
+ fmt.Sprintf("%d", i), fmt.Sprintf("%d", i), time.Now(), opts...) // default macos platform
hosts = append(hosts, h)
nanoEnrollAndSetHostMDMData(t, ds, h, false)
}
+
userFilter := fleet.TeamFilter{User: test.UserAdmin}
- // confirm intial state
+ // confirm initial state
listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{}, len(hosts))
listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: teamIDFilterNil}, len(hosts))
listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: teamIDFilterZero}, len(hosts))
listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: &team1.ID}, 0)
listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: &team2.ID}, 0)
- // assign three hosts to team 1
- require.NoError(t, ds.AddHostsToTeam(context.Background(), &team1.ID, []uint{hosts[0].ID, hosts[1].ID, hosts[2].ID}))
+ // assign three macos hosts to team 1
+ require.NoError(t, ds.AddHostsToTeam(context.Background(), &team1.ID, []uint{hosts[10].ID, hosts[11].ID, hosts[12].ID}))
listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{}, len(hosts))
listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: teamIDFilterNil}, len(hosts))
listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: teamIDFilterZero}, len(hosts)-3)
@@ -838,7 +846,7 @@ func testHostListOptionsTeamFilter(t *testing.T, ds *Datastore) {
listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: &team2.ID}, 0)
// assign four hosts to team 2
- require.NoError(t, ds.AddHostsToTeam(context.Background(), &team2.ID, []uint{hosts[3].ID, hosts[4].ID, hosts[5].ID, hosts[6].ID}))
+ require.NoError(t, ds.AddHostsToTeam(context.Background(), &team2.ID, []uint{hosts[13].ID, hosts[14].ID, hosts[15].ID, hosts[16].ID}))
listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{}, len(hosts))
listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: teamIDFilterNil}, len(hosts))
listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: teamIDFilterZero}, len(hosts)-7)
@@ -851,7 +859,7 @@ func testHostListOptionsTeamFilter(t *testing.T, ds *Datastore) {
{
ProfileUUID: profUUID,
ProfileIdentifier: "identifier",
- HostUUID: hosts[0].UUID, // hosts[0] is assgined to team 1
+ HostUUID: hosts[10].UUID, // hosts[10] is assgined to team 1
CommandUUID: "command-uuid-1",
OperationType: fleet.MDMOperationTypeInstall,
Status: &fleet.MDMDeliveryVerifying,
@@ -869,46 +877,78 @@ func testHostListOptionsTeamFilter(t *testing.T, ds *Datastore) {
{
ProfileUUID: profUUID,
ProfileIdentifier: "identifier",
- HostUUID: hosts[9].UUID, // hosts[9] is assgined to no team
+ HostUUID: hosts[19].UUID, // hosts[19] is assgined to no team
CommandUUID: "command-uuid-2",
OperationType: fleet.MDMOperationTypeInstall,
Status: &fleet.MDMDeliveryVerifying,
Checksum: []byte("csum"),
},
}))
- listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: &team1.ID, MacOSSettingsFilter: fleet.OSSettingsVerifying}, 1) // hosts[0]
+ listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: &team1.ID, MacOSSettingsFilter: fleet.OSSettingsVerifying}, 1) // hosts[10]
listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: &team2.ID, MacOSSettingsFilter: fleet.OSSettingsVerifying}, 0) // wrong team
// macos settings filter does not support "all teams" so both teamIDFilterNil acts the same as teamIDFilterZero
- listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: teamIDFilterZero, MacOSSettingsFilter: fleet.OSSettingsVerifying}, 1) // hosts[9]
- listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: teamIDFilterNil, MacOSSettingsFilter: fleet.OSSettingsVerifying}, 1) // hosts[9]
- listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{MacOSSettingsFilter: fleet.OSSettingsVerifying}, 1) // hosts[9]
+ listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: teamIDFilterZero, MacOSSettingsFilter: fleet.OSSettingsVerifying}, 1) // hosts[19]
+ listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: teamIDFilterNil, MacOSSettingsFilter: fleet.OSSettingsVerifying}, 1) // hosts[19]
+ listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{MacOSSettingsFilter: fleet.OSSettingsVerifying}, 1) // hosts[19]
- // test team filter in combination with os settings filter
- listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: &team1.ID, OSSettingsFilter: fleet.OSSettingsVerifying}, 1) // hosts[0]
+ // OS Settings Filters
+
+ // team 1
+ listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: &team1.ID, OSSettingsFilter: fleet.OSSettingsVerifying}, 1) // hosts[10]
+
+ // team 2
listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: &team2.ID, OSSettingsFilter: fleet.OSSettingsVerifying}, 0) // wrong team
+
// os settings filter does not support "all teams" so teamIDFilterNil acts the same as teamIDFilterZero
- listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: teamIDFilterZero, OSSettingsFilter: fleet.OSSettingsVerifying}, 1) // hosts[9]
- listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: teamIDFilterNil, OSSettingsFilter: fleet.OSSettingsVerifying}, 1) // hosts[9]
+ listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: teamIDFilterZero, OSSettingsFilter: fleet.OSSettingsVerifying}, 1) // hosts[19]
+ listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: teamIDFilterNil, OSSettingsFilter: fleet.OSSettingsVerifying}, 1) // hosts[19]
listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{OSSettingsFilter: fleet.OSSettingsVerifying}, 1)
+ listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: teamIDFilterZero, OSSettingsFilter: fleet.OSSettingsPending}, 5) // pending supported linux hosts
+
+ require.NoError(t, ds.SaveLUKSData(context.Background(), hosts[1].ID, "key1", "morton", 1)) // set host 1 to verified
+ require.NoError(t, ds.ReportEscrowError(context.Background(), hosts[2].ID, "error")) // set host 2 to failed
+
+ listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: teamIDFilterZero, OSSettingsFilter: fleet.OSSettingsVerified}, 1) // hosts[1]
+ listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: teamIDFilterZero, OSSettingsFilter: fleet.OSSettingsFailed}, 1) // hosts[2]
+ listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: teamIDFilterZero, OSSettingsFilter: fleet.OSSettingsPending}, 3) // still-pending supported linux hosts
+
+ listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: teamIDFilterZero, OSSettingsDiskEncryptionFilter: fleet.DiskEncryptionVerified}, 1)
+ listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: teamIDFilterZero, OSSettingsDiskEncryptionFilter: fleet.DiskEncryptionFailed}, 1)
+ listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: teamIDFilterZero, OSSettingsDiskEncryptionFilter: fleet.DiskEncryptionActionRequired}, 3)
// test team filter in combination with os settings disk encryptionfilter
require.NoError(t, ds.BulkUpsertMDMAppleHostProfiles(context.Background(), []*fleet.MDMAppleBulkUpsertHostProfilePayload{
{
ProfileUUID: profUUID,
ProfileIdentifier: mobileconfig.FleetFileVaultPayloadIdentifier,
- HostUUID: hosts[8].UUID, // hosts[8] is assgined to no team
+ HostUUID: hosts[18].UUID, // hosts[18] is assgined to no team
CommandUUID: "command-uuid-3",
OperationType: fleet.MDMOperationTypeInstall,
Status: &fleet.MDMDeliveryPending,
Checksum: []byte("disk-encryption-csum"),
},
}))
- listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: &team1.ID, OSSettingsDiskEncryptionFilter: fleet.DiskEncryptionEnforcing}, 0) // hosts[0]
+ listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: &team1.ID, OSSettingsDiskEncryptionFilter: fleet.DiskEncryptionEnforcing}, 0) // hosts[10]
listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: &team2.ID, OSSettingsDiskEncryptionFilter: fleet.DiskEncryptionEnforcing}, 0) // wrong team
// os settings filter does not support "all teams" so teamIDFilterNil acts the same as teamIDFilterZero
- listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: teamIDFilterZero, OSSettingsDiskEncryptionFilter: fleet.DiskEncryptionEnforcing}, 1) // hosts[8]
- listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: teamIDFilterNil, OSSettingsDiskEncryptionFilter: fleet.DiskEncryptionEnforcing}, 1) // hosts[8]
- listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{OSSettingsDiskEncryptionFilter: fleet.DiskEncryptionEnforcing}, 1) // hosts[8]
+ listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: teamIDFilterZero, OSSettingsDiskEncryptionFilter: fleet.DiskEncryptionEnforcing}, 1) // hosts[18]
+ listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: teamIDFilterNil, OSSettingsDiskEncryptionFilter: fleet.DiskEncryptionEnforcing}, 1) // hosts[18]
+ listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{OSSettingsDiskEncryptionFilter: fleet.DiskEncryptionEnforcing}, 1) // hosts[18]
+
+ // move linux hosts to team 1 (un-escrows keys)
+ require.NoError(t, ds.AddHostsToTeam(context.Background(), &team1.ID, []uint{hosts[1].ID, hosts[2].ID, hosts[3].ID, hosts[4].ID, hosts[5].ID}))
+ listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: &team1.ID, OSSettingsFilter: fleet.OSSettingsPending}, 5) // pending supported linux hosts
+
+ require.NoError(t, ds.SaveLUKSData(context.Background(), hosts[1].ID, "key1", "mutton", 2)) // set host 1 to verified
+ require.NoError(t, ds.ReportEscrowError(context.Background(), hosts[2].ID, "error")) // set host 2 to failed
+
+ listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: &team1.ID, OSSettingsFilter: fleet.OSSettingsVerified}, 1) // hosts[1]
+ listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: &team1.ID, OSSettingsFilter: fleet.OSSettingsFailed}, 1) // hosts[2]
+ listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: &team1.ID, OSSettingsFilter: fleet.OSSettingsPending}, 3) // still-pending supported linux hosts
+
+ listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: &team1.ID, OSSettingsDiskEncryptionFilter: fleet.DiskEncryptionVerified}, 1)
+ listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: &team1.ID, OSSettingsDiskEncryptionFilter: fleet.DiskEncryptionFailed}, 1)
+ listHostsCheckCount(t, ds, userFilter, fleet.HostListOptions{TeamFilter: &team1.ID, OSSettingsDiskEncryptionFilter: fleet.DiskEncryptionActionRequired}, 3)
// Bad team filter
_, err = ds.ListHosts(context.Background(), userFilter, fleet.HostListOptions{TeamFilter: teamIDFilterBad})
diff --git a/server/datastore/mysql/labels_test.go b/server/datastore/mysql/labels_test.go
index 52805cecc6..8db192ddba 100644
--- a/server/datastore/mysql/labels_test.go
+++ b/server/datastore/mysql/labels_test.go
@@ -1568,14 +1568,14 @@ func testLabelsListHostsInLabelOSSettings(t *testing.T, db *Datastore) {
hosts := listHostsInLabelCheckCount(t, db, filter, l1.ID, fleet.HostListOptions{}, 3)
checkHosts(t, hosts, []uint{h1.ID, h2.ID, h3.ID})
- t.Run("os_settings", func(t *testing.T) {
+ t.Run("os_settings_disk_encryption", func(t *testing.T) {
hosts = listHostsInLabelCheckCount(t, db, filter, l1.ID, fleet.HostListOptions{OSSettingsDiskEncryptionFilter: fleet.DiskEncryptionVerified}, 1)
checkHosts(t, hosts, []uint{h1.ID})
hosts = listHostsInLabelCheckCount(t, db, filter, l1.ID, fleet.HostListOptions{OSSettingsDiskEncryptionFilter: fleet.DiskEncryptionEnforcing}, 1)
checkHosts(t, hosts, []uint{h2.ID})
})
- t.Run("os_settings_disk_encryption", func(t *testing.T) {
+ t.Run("os_settings", func(t *testing.T) {
hosts = listHostsInLabelCheckCount(t, db, filter, l1.ID, fleet.HostListOptions{OSSettingsFilter: fleet.OSSettingsVerified}, 1)
checkHosts(t, hosts, []uint{h1.ID})
hosts = listHostsInLabelCheckCount(t, db, filter, l1.ID, fleet.HostListOptions{OSSettingsFilter: fleet.OSSettingsPending}, 1)
diff --git a/server/datastore/mysql/linux_mdm.go b/server/datastore/mysql/linux_mdm.go
index 2cd88843ef..126cbc0a39 100644
--- a/server/datastore/mysql/linux_mdm.go
+++ b/server/datastore/mysql/linux_mdm.go
@@ -67,3 +67,37 @@ func (ds *Datastore) GetLinuxDiskEncryptionSummary(ctx context.Context, teamID *
return summary, nil
}
+
+func sqlCaseLinuxOSSettingsStatus() string {
+ return `
+ CASE WHEN
+ hdek.base64_encrypted IS NOT NULL
+ AND hdek.base64_encrypted != ''
+ AND hdek.client_error = '' THEN
+ '` + string(fleet.OSSettingsVerified) + `'
+ WHEN hdek.client_error IS NOT NULL
+ AND hdek.client_error != '' THEN
+ '` + string(fleet.OSSettingsFailed) + `'
+ WHEN hdek.base64_encrypted IS NULL
+ OR (hdek.base64_encrypted = ''
+ AND hdek.client_error = '') THEN
+ '` + string(fleet.OSSettingsPending) + `'
+ END`
+}
+
+func sqlCaseLinuxDiskEncryptionStatus() string {
+ return `
+ CASE WHEN
+ hdek.base64_encrypted IS NOT NULL
+ AND hdek.base64_encrypted != ''
+ AND hdek.client_error = '' THEN
+ '` + string(fleet.DiskEncryptionVerified) + `'
+ WHEN hdek.client_error IS NOT NULL
+ AND hdek.client_error != '' THEN
+ '` + string(fleet.DiskEncryptionFailed) + `'
+ WHEN hdek.base64_encrypted IS NULL
+ OR (hdek.base64_encrypted = ''
+ AND hdek.client_error = '') THEN
+ '` + string(fleet.DiskEncryptionActionRequired) + `'
+ END`
+}
diff --git a/server/datastore/mysql/migrations/tables/20241122171434_RemoveDuplicateIndexes.go b/server/datastore/mysql/migrations/tables/20241122171434_RemoveDuplicateIndexes.go
new file mode 100644
index 0000000000..972fa45f85
--- /dev/null
+++ b/server/datastore/mysql/migrations/tables/20241122171434_RemoveDuplicateIndexes.go
@@ -0,0 +1,117 @@
+package tables
+
+import (
+ "database/sql"
+ "fmt"
+)
+
+func init() {
+ MigrationClient.AddMigration(Up_20241122171434, Down_20241122171434)
+}
+
+func Up_20241122171434(tx *sql.Tx) error {
+ // Duplicate indexes identified after running pt-duplicate-key-checker
+ // https://docs.percona.com/percona-toolkit/pt-duplicate-key-checker.html
+
+ // # ########################################################################
+ // # fleet.app_config_json
+ // # ########################################################################
+ //
+ // # Uniqueness of id ignored because PRIMARY is a duplicate constraint
+ // # id is a duplicate of PRIMARY
+ // # Key definitions:
+ // # UNIQUE KEY `id` (`id`)
+ // # PRIMARY KEY (`id`),
+ // # Column types:
+ // # `id` int unsigned not null default '1'
+ // # To remove this duplicate index, execute:
+ // ALTER TABLE `fleet`.`app_config_json` DROP INDEX `id`;
+ //
+ // # ########################################################################
+ // # fleet.host_users
+ // # ########################################################################
+ //
+ // # idx_uid_username is a duplicate of PRIMARY
+ // # Key definitions:
+ // # UNIQUE KEY `idx_uid_username` (`host_id`,`uid`,`username`)
+ // # PRIMARY KEY (`host_id`,`uid`,`username`),
+ // # Column types:
+ // # `host_id` int unsigned not null
+ // # `uid` int unsigned not null
+ // # `username` varchar(255) collate utf8mb4_unicode_ci not null
+ // # To remove this duplicate index, execute:
+ // ALTER TABLE `fleet`.`host_users` DROP INDEX `idx_uid_username`;
+ //
+ // # ########################################################################
+ // # fleet.migration_status_tables
+ // # ########################################################################
+ //
+ // # Uniqueness of id ignored because PRIMARY is a duplicate constraint
+ // # id is a duplicate of PRIMARY
+ // # Key definitions:
+ // # UNIQUE KEY `id` (`id`)
+ // # PRIMARY KEY (`id`),
+ // # Column types:
+ // # `id` bigint unsigned not null auto_increment
+ // # To remove this duplicate index, execute:
+ // ALTER TABLE `fleet`.`migration_status_tables` DROP INDEX `id`;
+ //
+ // # ########################################################################
+ // # fleet.policy_membership
+ // # ########################################################################
+ //
+ // # idx_policy_membership_policy_id is a left-prefix of PRIMARY
+ // # Key definitions:
+ // # KEY `idx_policy_membership_policy_id` (`policy_id`),
+ // # PRIMARY KEY (`policy_id`,`host_id`),
+ // # Column types:
+ // # `policy_id` int unsigned not null
+ // # `host_id` int unsigned not null
+ // # To remove this duplicate index, execute:
+ // ALTER TABLE `fleet`.`policy_membership` DROP INDEX `idx_policy_membership_policy_id`;
+ //
+ // # ########################################################################
+ // # fleet.software
+ // # ########################################################################
+ //
+ // # Key software_listing_idx ends with a prefix of the clustered index
+ // # Key definitions:
+ // # KEY `software_listing_idx` (`name`,`id`),
+ // # PRIMARY KEY (`id`),
+ // # Column types:
+ // # `name` varchar(255) collate utf8mb4_unicode_ci not null
+ // # `id` bigint unsigned not null auto_increment
+ // # To shorten this duplicate clustered index, execute:
+ // ALTER TABLE `fleet`.`software` DROP INDEX `software_listing_idx`, ADD INDEX `software_listing_idx` (`name`);
+ //
+ // # ########################################################################
+ // # fleet.software_cve
+ // # ########################################################################
+ //
+ // # software_cve_software_id is a left-prefix of unq_software_id_cve
+ // # Key definitions:
+ // # KEY `software_cve_software_id` (`software_id`)
+ // # UNIQUE KEY `unq_software_id_cve` (`software_id`,`cve`),
+ // # Column types:
+ // # `software_id` bigint unsigned default null
+ // # `cve` varchar(255) collate utf8mb4_unicode_ci not null
+ // # To remove this duplicate index, execute:
+ // ALTER TABLE `fleet`.`software_cve` DROP INDEX `software_cve_software_id`;
+
+ _, err := tx.Exec(
+ "ALTER TABLE `app_config_json` DROP INDEX `id`;" +
+ "ALTER TABLE `host_users` DROP INDEX `idx_uid_username`;" +
+ "ALTER TABLE `migration_status_tables` DROP INDEX `id`;" +
+ "ALTER TABLE `policy_membership` DROP INDEX `idx_policy_membership_policy_id`;" +
+ "ALTER TABLE `software` DROP INDEX `software_listing_idx`, ADD INDEX `software_listing_idx` (`name`);" +
+ "ALTER TABLE `software_cve` DROP INDEX `software_cve_software_id`;",
+ )
+ if err != nil {
+ return fmt.Errorf("failed to remove duplicate indexes: %w", err)
+ }
+ return nil
+}
+
+func Down_20241122171434(tx *sql.Tx) error {
+ return nil
+}
diff --git a/server/datastore/mysql/migrations/tables/20241125150614_AddAppConfigWindowsMigrationEnabledField.go b/server/datastore/mysql/migrations/tables/20241125150614_AddAppConfigWindowsMigrationEnabledField.go
new file mode 100644
index 0000000000..1765d00c62
--- /dev/null
+++ b/server/datastore/mysql/migrations/tables/20241125150614_AddAppConfigWindowsMigrationEnabledField.go
@@ -0,0 +1,54 @@
+package tables
+
+import (
+ "database/sql"
+ "encoding/json"
+ "fmt"
+
+ "github.com/pkg/errors"
+)
+
+func init() {
+ MigrationClient.AddMigration(Up_20241125150614, Down_20241125150614)
+}
+
+func Up_20241125150614(tx *sql.Tx) error {
+ var raw json.RawMessage
+ var id uint
+ row := tx.QueryRow(`SELECT id, json_value FROM app_config_json LIMIT 1;`)
+ if err := row.Scan(&id, &raw); err != nil {
+ if errors.Is(err, sql.ErrNoRows) {
+ return nil
+ }
+ return fmt.Errorf("select app_config_json: %w", err)
+ }
+
+ var config map[string]interface{}
+ if err := json.Unmarshal(raw, &config); err != nil {
+ return fmt.Errorf("unmarshal appconfig: %w", err)
+ }
+
+ mdm, ok := config["mdm"]
+ if !ok {
+ return errors.New("missing mdm section")
+ }
+ mdmMap, ok := mdm.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("invalid type for mdm: %T", mdm)
+ }
+ mdmMap["windows_migration_enabled"] = false
+
+ b, err := json.Marshal(config)
+ if err != nil {
+ return fmt.Errorf("marshal updated appconfig: %w", err)
+ }
+ if _, err := tx.Exec(`UPDATE app_config_json SET json_value = ? WHERE id = ?;`, b, id); err != nil {
+ return fmt.Errorf("update app_config_json: %w", err)
+ }
+
+ return nil
+}
+
+func Down_20241125150614(tx *sql.Tx) error {
+ return nil
+}
diff --git a/server/datastore/mysql/migrations/tables/20241125150614_AddAppConfigWindowsMigrationEnabledField_test.go b/server/datastore/mysql/migrations/tables/20241125150614_AddAppConfigWindowsMigrationEnabledField_test.go
new file mode 100644
index 0000000000..743f82de1d
--- /dev/null
+++ b/server/datastore/mysql/migrations/tables/20241125150614_AddAppConfigWindowsMigrationEnabledField_test.go
@@ -0,0 +1,33 @@
+package tables
+
+import (
+ "encoding/json"
+ "testing"
+
+ "github.com/jmoiron/sqlx"
+ "github.com/stretchr/testify/require"
+)
+
+func TestUp_20241125150614(t *testing.T) {
+ db := applyUpToPrev(t)
+
+ // Apply current migration.
+ applyNext(t, db)
+
+ var appCfg json.RawMessage
+ err := sqlx.Get(db, &appCfg, `SELECT json_value FROM app_config_json LIMIT 1;`)
+ require.NoError(t, err)
+
+ var config map[string]interface{}
+ err = json.Unmarshal(appCfg, &config)
+ require.NoError(t, err)
+
+ mdm, ok := config["mdm"]
+ require.True(t, ok)
+ mdmMap, ok := mdm.(map[string]interface{})
+ require.True(t, ok)
+
+ _, ok = mdmMap["windows_enabled_and_configured"].(bool)
+ require.True(t, ok)
+ require.False(t, mdmMap["windows_migration_enabled"].(bool))
+}
diff --git a/server/datastore/mysql/migrations/tables/20241203125346_UpdateZoomFMA.go b/server/datastore/mysql/migrations/tables/20241203125346_UpdateZoomFMA.go
new file mode 100644
index 0000000000..27e5753f30
--- /dev/null
+++ b/server/datastore/mysql/migrations/tables/20241203125346_UpdateZoomFMA.go
@@ -0,0 +1,33 @@
+package tables
+
+import (
+ "database/sql"
+ "fmt"
+
+ "github.com/fleetdm/fleet/v4/server/fleet"
+)
+
+func init() {
+ MigrationClient.AddMigration(Up_20241203125346, Down_20241203125346)
+}
+
+func Up_20241203125346(tx *sql.Tx) error {
+ // Remove the existing Zoom fleet-maintained app
+ _, err := tx.Exec(`DELETE FROM fleet_library_apps WHERE token = 'zoom' AND platform = 'darwin'`)
+ if err != nil {
+ return fmt.Errorf("failed to remove existing zoom app from fleet_library_apps table: %w", err)
+ }
+
+ // Clear out scheduled runs for the maintained_apps cron. This will force the cron to run on
+ // next server start and pull in the updated Zoom FMA.
+ _, err = tx.Exec(`DELETE FROM cron_stats WHERE name = ? AND stats_type = ?`, fleet.CronMaintainedApps, fleet.CronStatsTypeScheduled)
+ if err != nil {
+ return fmt.Errorf("failed to clear past scheduled runs of maintained_apps from cron_stats table: %w", err)
+ }
+
+ return nil
+}
+
+func Down_20241203125346(tx *sql.Tx) error {
+ return nil
+}
diff --git a/server/datastore/mysql/migrations/tables/20241203125346_UpdateZoomFMA_test.go b/server/datastore/mysql/migrations/tables/20241203125346_UpdateZoomFMA_test.go
new file mode 100644
index 0000000000..0a73078ed4
--- /dev/null
+++ b/server/datastore/mysql/migrations/tables/20241203125346_UpdateZoomFMA_test.go
@@ -0,0 +1,79 @@
+package tables
+
+import (
+ "testing"
+
+ "github.com/fleetdm/fleet/v4/server/fleet"
+ "github.com/jmoiron/sqlx"
+ "github.com/jmoiron/sqlx/reflectx"
+ "github.com/stretchr/testify/require"
+)
+
+func TestUp_20241203125346(t *testing.T) {
+ db := applyUpToPrev(t)
+
+ // Insert a scheduled and a triggered job run for maintained_apps
+ execNoErr(t, db, `INSERT INTO cron_stats (name, instance, stats_type, status) VALUES (?, 'foo', ?, ?)`, fleet.CronMaintainedApps, fleet.CronStatsTypeScheduled, fleet.CronStatsStatusCompleted)
+ execNoErr(t, db, `INSERT INTO cron_stats (name, instance, stats_type, status) VALUES (?, 'foo', ?, ?)`, fleet.CronMaintainedApps, fleet.CronStatsTypeTriggered, fleet.CronStatsStatusCompleted)
+
+ // Add the old Zoom and Box Drive FMAs
+ tx, err := db.Begin()
+ require.NoError(t, err)
+ txx := sqlx.Tx{Tx: tx, Mapper: reflectx.NewMapperFunc("db", sqlx.NameMapper)}
+ installScriptID, err := getOrInsertScript(txx, "echo install")
+ require.NoError(t, err)
+ uninstallScriptID, err := getOrInsertScript(txx, "echo uninstall")
+ require.NoError(t, err)
+ err = tx.Commit()
+ require.NoError(t, err)
+
+ execNoErr(
+ t,
+ db,
+ `INSERT INTO fleet_library_apps (name, token, version, platform, installer_url, sha256, bundle_identifier, install_script_content_id, uninstall_script_content_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`,
+ "Zoom",
+ "zoom",
+ "6.2.11.43613",
+ "darwin",
+ "https://cdn.zoom.us/prod/6.2.11.43613/arm64/zoomusInstallerFull.pkg",
+ "dd6d28853eb6be7eaf7731aae1855c68cd6411ef6847158e6af18fffed5f8597",
+ "us.zoom.xos",
+ installScriptID,
+ uninstallScriptID,
+ )
+
+ execNoErr(
+ t,
+ db,
+ `INSERT INTO fleet_library_apps (name, token, version, platform, installer_url, sha256, bundle_identifier, install_script_content_id, uninstall_script_content_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`,
+ "Box Drive",
+ "box-drive",
+ "2.42.212",
+ "darwin",
+ "https://e3.boxcdn.net/desktop/releases/mac/BoxDrive-2.42.212.pkg",
+ "93550756150c434bc058c30b82352c294a21e978caf436ac99e0a5f431adfb6e",
+ "com.box.desktop",
+ installScriptID,
+ uninstallScriptID,
+ )
+
+ // Apply current migration.
+ applyNext(t, db)
+
+ // Zoom should be deleted, only the Box Drive FMA should remain
+ var fmas []fleet.MaintainedApp
+ err = db.Select(&fmas, `SELECT name, token FROM fleet_library_apps`)
+ require.NoError(t, err)
+ require.Len(t, fmas, 1)
+ require.Equal(t, "Box Drive", fmas[0].Name)
+ require.Equal(t, "box-drive", fmas[0].Token)
+
+ // Only the triggered job record should remain in the cron_stats table
+ var stats []fleet.CronStats
+ err = db.Select(&stats, `SELECT name, instance, stats_type, status FROM cron_stats`)
+ require.NoError(t, err)
+ require.Len(t, stats, 1)
+ require.Equal(t, string(fleet.CronMaintainedApps), stats[0].Name)
+ require.Equal(t, fleet.CronStatsTypeTriggered, stats[0].StatsType)
+ require.Equal(t, fleet.CronStatsStatusCompleted, stats[0].Status)
+}
diff --git a/server/datastore/mysql/schema.sql b/server/datastore/mysql/schema.sql
index 45718cbd1d..3dea0acad8 100644
--- a/server/datastore/mysql/schema.sql
+++ b/server/datastore/mysql/schema.sql
@@ -61,11 +61,10 @@ CREATE TABLE `app_config_json` (
`json_value` json NOT NULL,
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`),
- UNIQUE KEY `id` (`id`)
+ PRIMARY KEY (`id`)
) /*!50100 TABLESPACE `innodb_system` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO `app_config_json` VALUES (1,'{\"mdm\": {\"ios_updates\": {\"deadline\": null, \"minimum_version\": null}, \"macos_setup\": {\"script\": null, \"software\": null, \"bootstrap_package\": null, \"macos_setup_assistant\": null, \"enable_end_user_authentication\": false, \"enable_release_device_manually\": false}, \"macos_updates\": {\"deadline\": null, \"minimum_version\": null}, \"ipados_updates\": {\"deadline\": null, \"minimum_version\": null}, \"macos_settings\": {\"custom_settings\": null}, \"macos_migration\": {\"mode\": \"\", \"enable\": false, \"webhook_url\": \"\"}, \"windows_updates\": {\"deadline_days\": null, \"grace_period_days\": null}, \"apple_server_url\": \"\", \"windows_settings\": {\"custom_settings\": null}, \"apple_bm_terms_expired\": false, \"apple_business_manager\": null, \"enable_disk_encryption\": false, \"enabled_and_configured\": false, \"end_user_authentication\": {\"idp_name\": \"\", \"metadata\": \"\", \"entity_id\": \"\", \"issuer_uri\": \"\", \"metadata_url\": \"\"}, \"volume_purchasing_program\": null, \"windows_enabled_and_configured\": false, \"apple_bm_enabled_and_configured\": false}, \"scripts\": null, \"features\": {\"enable_host_users\": true, \"enable_software_inventory\": false}, \"org_info\": {\"org_name\": \"\", \"contact_url\": \"\", \"org_logo_url\": \"\", \"org_logo_url_light_background\": \"\"}, \"integrations\": {\"jira\": null, \"zendesk\": null, \"google_calendar\": null, \"ndes_scep_proxy\": null}, \"sso_settings\": {\"idp_name\": \"\", \"metadata\": \"\", \"entity_id\": \"\", \"enable_sso\": false, \"issuer_uri\": \"\", \"metadata_url\": \"\", \"idp_image_url\": \"\", \"enable_jit_role_sync\": false, \"enable_sso_idp_login\": false, \"enable_jit_provisioning\": false}, \"agent_options\": {\"config\": {\"options\": {\"logger_plugin\": \"tls\", \"pack_delimiter\": \"/\", \"logger_tls_period\": 10, \"distributed_plugin\": \"tls\", \"disable_distributed\": false, \"logger_tls_endpoint\": \"/api/osquery/log\", \"distributed_interval\": 10, \"distributed_tls_max_attempts\": 3}, \"decorators\": {\"load\": [\"SELECT uuid AS host_uuid FROM system_info;\", \"SELECT hostname AS hostname FROM system_info;\"]}}, \"overrides\": {}}, \"fleet_desktop\": {\"transparency_url\": \"\"}, \"smtp_settings\": {\"port\": 587, \"domain\": \"\", \"server\": \"\", \"password\": \"\", \"user_name\": \"\", \"configured\": false, \"enable_smtp\": false, \"enable_ssl_tls\": true, \"sender_address\": \"\", \"enable_start_tls\": true, \"verify_ssl_certs\": true, \"authentication_type\": \"0\", \"authentication_method\": \"0\"}, \"server_settings\": {\"server_url\": \"\", \"enable_analytics\": false, \"query_report_cap\": 0, \"scripts_disabled\": false, \"deferred_save_host\": false, \"live_query_disabled\": false, \"ai_features_disabled\": false, \"query_reports_disabled\": false}, \"webhook_settings\": {\"interval\": \"0s\", \"activities_webhook\": {\"destination_url\": \"\", \"enable_activities_webhook\": false}, \"host_status_webhook\": {\"days_count\": 0, \"destination_url\": \"\", \"host_percentage\": 0, \"enable_host_status_webhook\": false}, \"vulnerabilities_webhook\": {\"destination_url\": \"\", \"host_batch_size\": 0, \"enable_vulnerabilities_webhook\": false}, \"failing_policies_webhook\": {\"policy_ids\": null, \"destination_url\": \"\", \"host_batch_size\": 0, \"enable_failing_policies_webhook\": false}}, \"host_expiry_settings\": {\"host_expiry_window\": 0, \"host_expiry_enabled\": false}, \"vulnerability_settings\": {\"databases_path\": \"\"}, \"activity_expiry_settings\": {\"activity_expiry_window\": 0, \"activity_expiry_enabled\": false}}','2020-01-01 01:01:01','2020-01-01 01:01:01');
+INSERT INTO `app_config_json` VALUES (1,'{\"mdm\": {\"ios_updates\": {\"deadline\": null, \"minimum_version\": null}, \"macos_setup\": {\"script\": null, \"software\": null, \"bootstrap_package\": null, \"macos_setup_assistant\": null, \"enable_end_user_authentication\": false, \"enable_release_device_manually\": false}, \"macos_updates\": {\"deadline\": null, \"minimum_version\": null}, \"ipados_updates\": {\"deadline\": null, \"minimum_version\": null}, \"macos_settings\": {\"custom_settings\": null}, \"macos_migration\": {\"mode\": \"\", \"enable\": false, \"webhook_url\": \"\"}, \"windows_updates\": {\"deadline_days\": null, \"grace_period_days\": null}, \"apple_server_url\": \"\", \"windows_settings\": {\"custom_settings\": null}, \"apple_bm_terms_expired\": false, \"apple_business_manager\": null, \"enable_disk_encryption\": false, \"enabled_and_configured\": false, \"end_user_authentication\": {\"idp_name\": \"\", \"metadata\": \"\", \"entity_id\": \"\", \"issuer_uri\": \"\", \"metadata_url\": \"\"}, \"volume_purchasing_program\": null, \"windows_migration_enabled\": false, \"windows_enabled_and_configured\": false, \"apple_bm_enabled_and_configured\": false}, \"scripts\": null, \"features\": {\"enable_host_users\": true, \"enable_software_inventory\": false}, \"org_info\": {\"org_name\": \"\", \"contact_url\": \"\", \"org_logo_url\": \"\", \"org_logo_url_light_background\": \"\"}, \"integrations\": {\"jira\": null, \"zendesk\": null, \"google_calendar\": null, \"ndes_scep_proxy\": null}, \"sso_settings\": {\"idp_name\": \"\", \"metadata\": \"\", \"entity_id\": \"\", \"enable_sso\": false, \"issuer_uri\": \"\", \"metadata_url\": \"\", \"idp_image_url\": \"\", \"enable_jit_role_sync\": false, \"enable_sso_idp_login\": false, \"enable_jit_provisioning\": false}, \"agent_options\": {\"config\": {\"options\": {\"logger_plugin\": \"tls\", \"pack_delimiter\": \"/\", \"logger_tls_period\": 10, \"distributed_plugin\": \"tls\", \"disable_distributed\": false, \"logger_tls_endpoint\": \"/api/osquery/log\", \"distributed_interval\": 10, \"distributed_tls_max_attempts\": 3}, \"decorators\": {\"load\": [\"SELECT uuid AS host_uuid FROM system_info;\", \"SELECT hostname AS hostname FROM system_info;\"]}}, \"overrides\": {}}, \"fleet_desktop\": {\"transparency_url\": \"\"}, \"smtp_settings\": {\"port\": 587, \"domain\": \"\", \"server\": \"\", \"password\": \"\", \"user_name\": \"\", \"configured\": false, \"enable_smtp\": false, \"enable_ssl_tls\": true, \"sender_address\": \"\", \"enable_start_tls\": true, \"verify_ssl_certs\": true, \"authentication_type\": \"0\", \"authentication_method\": \"0\"}, \"server_settings\": {\"server_url\": \"\", \"enable_analytics\": false, \"query_report_cap\": 0, \"scripts_disabled\": false, \"deferred_save_host\": false, \"live_query_disabled\": false, \"ai_features_disabled\": false, \"query_reports_disabled\": false}, \"webhook_settings\": {\"interval\": \"0s\", \"activities_webhook\": {\"destination_url\": \"\", \"enable_activities_webhook\": false}, \"host_status_webhook\": {\"days_count\": 0, \"destination_url\": \"\", \"host_percentage\": 0, \"enable_host_status_webhook\": false}, \"vulnerabilities_webhook\": {\"destination_url\": \"\", \"host_batch_size\": 0, \"enable_vulnerabilities_webhook\": false}, \"failing_policies_webhook\": {\"policy_ids\": null, \"destination_url\": \"\", \"host_batch_size\": 0, \"enable_failing_policies_webhook\": false}}, \"host_expiry_settings\": {\"host_expiry_window\": 0, \"host_expiry_enabled\": false}, \"vulnerability_settings\": {\"databases_path\": \"\"}, \"activity_expiry_settings\": {\"activity_expiry_window\": 0, \"activity_expiry_enabled\": false}}','2020-01-01 01:01:01','2020-01-01 01:01:01');
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `calendar_events` (
@@ -654,8 +653,7 @@ CREATE TABLE `host_users` (
`removed_at` timestamp NULL DEFAULT NULL,
`user_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`shell` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
- PRIMARY KEY (`host_id`,`uid`,`username`),
- UNIQUE KEY `idx_uid_username` (`host_id`,`uid`,`username`)
+ PRIMARY KEY (`host_id`,`uid`,`username`)
) /*!50100 TABLESPACE `innodb_system` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET @saved_cs_client = @@character_set_client */;
@@ -1102,11 +1100,10 @@ CREATE TABLE `migration_status_tables` (
`version_id` bigint NOT NULL,
`is_applied` tinyint(1) NOT NULL,
`tstamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`),
- UNIQUE KEY `id` (`id`)
-) /*!50100 TABLESPACE `innodb_system` */ ENGINE=InnoDB AUTO_INCREMENT=331 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ PRIMARY KEY (`id`)
+) /*!50100 TABLESPACE `innodb_system` */ ENGINE=InnoDB AUTO_INCREMENT=334 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO `migration_status_tables` VALUES (1,0,1,'2020-01-01 01:01:01'),(2,20161118193812,1,'2020-01-01 01:01:01'),(3,20161118211713,1,'2020-01-01 01:01:01'),(4,20161118212436,1,'2020-01-01 01:01:01'),(5,20161118212515,1,'2020-01-01 01:01:01'),(6,20161118212528,1,'2020-01-01 01:01:01'),(7,20161118212538,1,'2020-01-01 01:01:01'),(8,20161118212549,1,'2020-01-01 01:01:01'),(9,20161118212557,1,'2020-01-01 01:01:01'),(10,20161118212604,1,'2020-01-01 01:01:01'),(11,20161118212613,1,'2020-01-01 01:01:01'),(12,20161118212621,1,'2020-01-01 01:01:01'),(13,20161118212630,1,'2020-01-01 01:01:01'),(14,20161118212641,1,'2020-01-01 01:01:01'),(15,20161118212649,1,'2020-01-01 01:01:01'),(16,20161118212656,1,'2020-01-01 01:01:01'),(17,20161118212758,1,'2020-01-01 01:01:01'),(18,20161128234849,1,'2020-01-01 01:01:01'),(19,20161230162221,1,'2020-01-01 01:01:01'),(20,20170104113816,1,'2020-01-01 01:01:01'),(21,20170105151732,1,'2020-01-01 01:01:01'),(22,20170108191242,1,'2020-01-01 01:01:01'),(23,20170109094020,1,'2020-01-01 01:01:01'),(24,20170109130438,1,'2020-01-01 01:01:01'),(25,20170110202752,1,'2020-01-01 01:01:01'),(26,20170111133013,1,'2020-01-01 01:01:01'),(27,20170117025759,1,'2020-01-01 01:01:01'),(28,20170118191001,1,'2020-01-01 01:01:01'),(29,20170119234632,1,'2020-01-01 01:01:01'),(30,20170124230432,1,'2020-01-01 01:01:01'),(31,20170127014618,1,'2020-01-01 01:01:01'),(32,20170131232841,1,'2020-01-01 01:01:01'),(33,20170223094154,1,'2020-01-01 01:01:01'),(34,20170306075207,1,'2020-01-01 01:01:01'),(35,20170309100733,1,'2020-01-01 01:01:01'),(36,20170331111922,1,'2020-01-01 01:01:01'),(37,20170502143928,1,'2020-01-01 01:01:01'),(38,20170504130602,1,'2020-01-01 01:01:01'),(39,20170509132100,1,'2020-01-01 01:01:01'),(40,20170519105647,1,'2020-01-01 01:01:01'),(41,20170519105648,1,'2020-01-01 01:01:01'),(42,20170831234300,1,'2020-01-01 01:01:01'),(43,20170831234301,1,'2020-01-01 01:01:01'),(44,20170831234303,1,'2020-01-01 01:01:01'),(45,20171116163618,1,'2020-01-01 01:01:01'),(46,20171219164727,1,'2020-01-01 01:01:01'),(47,20180620164811,1,'2020-01-01 01:01:01'),(48,20180620175054,1,'2020-01-01 01:01:01'),(49,20180620175055,1,'2020-01-01 01:01:01'),(50,20191010101639,1,'2020-01-01 01:01:01'),(51,20191010155147,1,'2020-01-01 01:01:01'),(52,20191220130734,1,'2020-01-01 01:01:01'),(53,20200311140000,1,'2020-01-01 01:01:01'),(54,20200405120000,1,'2020-01-01 01:01:01'),(55,20200407120000,1,'2020-01-01 01:01:01'),(56,20200420120000,1,'2020-01-01 01:01:01'),(57,20200504120000,1,'2020-01-01 01:01:01'),(58,20200512120000,1,'2020-01-01 01:01:01'),(59,20200707120000,1,'2020-01-01 01:01:01'),(60,20201011162341,1,'2020-01-01 01:01:01'),(61,20201021104586,1,'2020-01-01 01:01:01'),(62,20201102112520,1,'2020-01-01 01:01:01'),(63,20201208121729,1,'2020-01-01 01:01:01'),(64,20201215091637,1,'2020-01-01 01:01:01'),(65,20210119174155,1,'2020-01-01 01:01:01'),(66,20210326182902,1,'2020-01-01 01:01:01'),(67,20210421112652,1,'2020-01-01 01:01:01'),(68,20210506095025,1,'2020-01-01 01:01:01'),(69,20210513115729,1,'2020-01-01 01:01:01'),(70,20210526113559,1,'2020-01-01 01:01:01'),(71,20210601000001,1,'2020-01-01 01:01:01'),(72,20210601000002,1,'2020-01-01 01:01:01'),(73,20210601000003,1,'2020-01-01 01:01:01'),(74,20210601000004,1,'2020-01-01 01:01:01'),(75,20210601000005,1,'2020-01-01 01:01:01'),(76,20210601000006,1,'2020-01-01 01:01:01'),(77,20210601000007,1,'2020-01-01 01:01:01'),(78,20210601000008,1,'2020-01-01 01:01:01'),(79,20210606151329,1,'2020-01-01 01:01:01'),(80,20210616163757,1,'2020-01-01 01:01:01'),(81,20210617174723,1,'2020-01-01 01:01:01'),(82,20210622160235,1,'2020-01-01 01:01:01'),(83,20210623100031,1,'2020-01-01 01:01:01'),(84,20210623133615,1,'2020-01-01 01:01:01'),(85,20210708143152,1,'2020-01-01 01:01:01'),(86,20210709124443,1,'2020-01-01 01:01:01'),(87,20210712155608,1,'2020-01-01 01:01:01'),(88,20210714102108,1,'2020-01-01 01:01:01'),(89,20210719153709,1,'2020-01-01 01:01:01'),(90,20210721171531,1,'2020-01-01 01:01:01'),(91,20210723135713,1,'2020-01-01 01:01:01'),(92,20210802135933,1,'2020-01-01 01:01:01'),(93,20210806112844,1,'2020-01-01 01:01:01'),(94,20210810095603,1,'2020-01-01 01:01:01'),(95,20210811150223,1,'2020-01-01 01:01:01'),(96,20210818151827,1,'2020-01-01 01:01:01'),(97,20210818151828,1,'2020-01-01 01:01:01'),(98,20210818182258,1,'2020-01-01 01:01:01'),(99,20210819131107,1,'2020-01-01 01:01:01'),(100,20210819143446,1,'2020-01-01 01:01:01'),(101,20210903132338,1,'2020-01-01 01:01:01'),(102,20210915144307,1,'2020-01-01 01:01:01'),(103,20210920155130,1,'2020-01-01 01:01:01'),(104,20210927143115,1,'2020-01-01 01:01:01'),(105,20210927143116,1,'2020-01-01 01:01:01'),(106,20211013133706,1,'2020-01-01 01:01:01'),(107,20211013133707,1,'2020-01-01 01:01:01'),(108,20211102135149,1,'2020-01-01 01:01:01'),(109,20211109121546,1,'2020-01-01 01:01:01'),(110,20211110163320,1,'2020-01-01 01:01:01'),(111,20211116184029,1,'2020-01-01 01:01:01'),(112,20211116184030,1,'2020-01-01 01:01:01'),(113,20211202092042,1,'2020-01-01 01:01:01'),(114,20211202181033,1,'2020-01-01 01:01:01'),(115,20211207161856,1,'2020-01-01 01:01:01'),(116,20211216131203,1,'2020-01-01 01:01:01'),(117,20211221110132,1,'2020-01-01 01:01:01'),(118,20220107155700,1,'2020-01-01 01:01:01'),(119,20220125105650,1,'2020-01-01 01:01:01'),(120,20220201084510,1,'2020-01-01 01:01:01'),(121,20220208144830,1,'2020-01-01 01:01:01'),(122,20220208144831,1,'2020-01-01 01:01:01'),(123,20220215152203,1,'2020-01-01 01:01:01'),(124,20220223113157,1,'2020-01-01 01:01:01'),(125,20220307104655,1,'2020-01-01 01:01:01'),(126,20220309133956,1,'2020-01-01 01:01:01'),(127,20220316155700,1,'2020-01-01 01:01:01'),(128,20220323152301,1,'2020-01-01 01:01:01'),(129,20220330100659,1,'2020-01-01 01:01:01'),(130,20220404091216,1,'2020-01-01 01:01:01'),(131,20220419140750,1,'2020-01-01 01:01:01'),(132,20220428140039,1,'2020-01-01 01:01:01'),(133,20220503134048,1,'2020-01-01 01:01:01'),(134,20220524102918,1,'2020-01-01 01:01:01'),(135,20220526123327,1,'2020-01-01 01:01:01'),(136,20220526123328,1,'2020-01-01 01:01:01'),(137,20220526123329,1,'2020-01-01 01:01:01'),(138,20220608113128,1,'2020-01-01 01:01:01'),(139,20220627104817,1,'2020-01-01 01:01:01'),(140,20220704101843,1,'2020-01-01 01:01:01'),(141,20220708095046,1,'2020-01-01 01:01:01'),(142,20220713091130,1,'2020-01-01 01:01:01'),(143,20220802135510,1,'2020-01-01 01:01:01'),(144,20220818101352,1,'2020-01-01 01:01:01'),(145,20220822161445,1,'2020-01-01 01:01:01'),(146,20220831100036,1,'2020-01-01 01:01:01'),(147,20220831100151,1,'2020-01-01 01:01:01'),(148,20220908181826,1,'2020-01-01 01:01:01'),(149,20220914154915,1,'2020-01-01 01:01:01'),(150,20220915165115,1,'2020-01-01 01:01:01'),(151,20220915165116,1,'2020-01-01 01:01:01'),(152,20220928100158,1,'2020-01-01 01:01:01'),(153,20221014084130,1,'2020-01-01 01:01:01'),(154,20221027085019,1,'2020-01-01 01:01:01'),(155,20221101103952,1,'2020-01-01 01:01:01'),(156,20221104144401,1,'2020-01-01 01:01:01'),(157,20221109100749,1,'2020-01-01 01:01:01'),(158,20221115104546,1,'2020-01-01 01:01:01'),(159,20221130114928,1,'2020-01-01 01:01:01'),(160,20221205112142,1,'2020-01-01 01:01:01'),(161,20221216115820,1,'2020-01-01 01:01:01'),(162,20221220195934,1,'2020-01-01 01:01:01'),(163,20221220195935,1,'2020-01-01 01:01:01'),(164,20221223174807,1,'2020-01-01 01:01:01'),(165,20221227163855,1,'2020-01-01 01:01:01'),(166,20221227163856,1,'2020-01-01 01:01:01'),(167,20230202224725,1,'2020-01-01 01:01:01'),(168,20230206163608,1,'2020-01-01 01:01:01'),(169,20230214131519,1,'2020-01-01 01:01:01'),(170,20230303135738,1,'2020-01-01 01:01:01'),(171,20230313135301,1,'2020-01-01 01:01:01'),(172,20230313141819,1,'2020-01-01 01:01:01'),(173,20230315104937,1,'2020-01-01 01:01:01'),(174,20230317173844,1,'2020-01-01 01:01:01'),(175,20230320133602,1,'2020-01-01 01:01:01'),(176,20230330100011,1,'2020-01-01 01:01:01'),(177,20230330134823,1,'2020-01-01 01:01:01'),(178,20230405232025,1,'2020-01-01 01:01:01'),(179,20230408084104,1,'2020-01-01 01:01:01'),(180,20230411102858,1,'2020-01-01 01:01:01'),(181,20230421155932,1,'2020-01-01 01:01:01'),(182,20230425082126,1,'2020-01-01 01:01:01'),(183,20230425105727,1,'2020-01-01 01:01:01'),(184,20230501154913,1,'2020-01-01 01:01:01'),(185,20230503101418,1,'2020-01-01 01:01:01'),(186,20230515144206,1,'2020-01-01 01:01:01'),(187,20230517140952,1,'2020-01-01 01:01:01'),(188,20230517152807,1,'2020-01-01 01:01:01'),(189,20230518114155,1,'2020-01-01 01:01:01'),(190,20230520153236,1,'2020-01-01 01:01:01'),(191,20230525151159,1,'2020-01-01 01:01:01'),(192,20230530122103,1,'2020-01-01 01:01:01'),(193,20230602111827,1,'2020-01-01 01:01:01'),(194,20230608103123,1,'2020-01-01 01:01:01'),(195,20230629140529,1,'2020-01-01 01:01:01'),(196,20230629140530,1,'2020-01-01 01:01:01'),(197,20230711144622,1,'2020-01-01 01:01:01'),(198,20230721135421,1,'2020-01-01 01:01:01'),(199,20230721161508,1,'2020-01-01 01:01:01'),(200,20230726115701,1,'2020-01-01 01:01:01'),(201,20230807100822,1,'2020-01-01 01:01:01'),(202,20230814150442,1,'2020-01-01 01:01:01'),(203,20230823122728,1,'2020-01-01 01:01:01'),(204,20230906152143,1,'2020-01-01 01:01:01'),(205,20230911163618,1,'2020-01-01 01:01:01'),(206,20230912101759,1,'2020-01-01 01:01:01'),(207,20230915101341,1,'2020-01-01 01:01:01'),(208,20230918132351,1,'2020-01-01 01:01:01'),(209,20231004144339,1,'2020-01-01 01:01:01'),(210,20231009094541,1,'2020-01-01 01:01:01'),(211,20231009094542,1,'2020-01-01 01:01:01'),(212,20231009094543,1,'2020-01-01 01:01:01'),(213,20231009094544,1,'2020-01-01 01:01:01'),(214,20231016091915,1,'2020-01-01 01:01:01'),(215,20231024174135,1,'2020-01-01 01:01:01'),(216,20231025120016,1,'2020-01-01 01:01:01'),(217,20231025160156,1,'2020-01-01 01:01:01'),(218,20231031165350,1,'2020-01-01 01:01:01'),(219,20231106144110,1,'2020-01-01 01:01:01'),(220,20231107130934,1,'2020-01-01 01:01:01'),(221,20231109115838,1,'2020-01-01 01:01:01'),(222,20231121054530,1,'2020-01-01 01:01:01'),(223,20231122101320,1,'2020-01-01 01:01:01'),(224,20231130132828,1,'2020-01-01 01:01:01'),(225,20231130132931,1,'2020-01-01 01:01:01'),(226,20231204155427,1,'2020-01-01 01:01:01'),(227,20231206142340,1,'2020-01-01 01:01:01'),(228,20231207102320,1,'2020-01-01 01:01:01'),(229,20231207102321,1,'2020-01-01 01:01:01'),(230,20231207133731,1,'2020-01-01 01:01:01'),(231,20231212094238,1,'2020-01-01 01:01:01'),(232,20231212095734,1,'2020-01-01 01:01:01'),(233,20231212161121,1,'2020-01-01 01:01:01'),(234,20231215122713,1,'2020-01-01 01:01:01'),(235,20231219143041,1,'2020-01-01 01:01:01'),(236,20231224070653,1,'2020-01-01 01:01:01'),(237,20240110134315,1,'2020-01-01 01:01:01'),(238,20240119091637,1,'2020-01-01 01:01:01'),(239,20240126020642,1,'2020-01-01 01:01:01'),(240,20240126020643,1,'2020-01-01 01:01:01'),(241,20240129162819,1,'2020-01-01 01:01:01'),(242,20240130115133,1,'2020-01-01 01:01:01'),(243,20240131083822,1,'2020-01-01 01:01:01'),(244,20240205095928,1,'2020-01-01 01:01:01'),(245,20240205121956,1,'2020-01-01 01:01:01'),(246,20240209110212,1,'2020-01-01 01:01:01'),(247,20240212111533,1,'2020-01-01 01:01:01'),(248,20240221112844,1,'2020-01-01 01:01:01'),(249,20240222073518,1,'2020-01-01 01:01:01'),(250,20240222135115,1,'2020-01-01 01:01:01'),(251,20240226082255,1,'2020-01-01 01:01:01'),(252,20240228082706,1,'2020-01-01 01:01:01'),(253,20240301173035,1,'2020-01-01 01:01:01'),(254,20240302111134,1,'2020-01-01 01:01:01'),(255,20240312103753,1,'2020-01-01 01:01:01'),(256,20240313143416,1,'2020-01-01 01:01:01'),(257,20240314085226,1,'2020-01-01 01:01:01'),(258,20240314151747,1,'2020-01-01 01:01:01'),(259,20240320145650,1,'2020-01-01 01:01:01'),(260,20240327115530,1,'2020-01-01 01:01:01'),(261,20240327115617,1,'2020-01-01 01:01:01'),(262,20240408085837,1,'2020-01-01 01:01:01'),(263,20240415104633,1,'2020-01-01 01:01:01'),(264,20240430111727,1,'2020-01-01 01:01:01'),(265,20240515200020,1,'2020-01-01 01:01:01'),(266,20240521143023,1,'2020-01-01 01:01:01'),(267,20240521143024,1,'2020-01-01 01:01:01'),(268,20240601174138,1,'2020-01-01 01:01:01'),(269,20240607133721,1,'2020-01-01 01:01:01'),(270,20240612150059,1,'2020-01-01 01:01:01'),(271,20240613162201,1,'2020-01-01 01:01:01'),(272,20240613172616,1,'2020-01-01 01:01:01'),(273,20240618142419,1,'2020-01-01 01:01:01'),(274,20240625093543,1,'2020-01-01 01:01:01'),(275,20240626195531,1,'2020-01-01 01:01:01'),(276,20240702123921,1,'2020-01-01 01:01:01'),(277,20240703154849,1,'2020-01-01 01:01:01'),(278,20240707134035,1,'2020-01-01 01:01:01'),(279,20240707134036,1,'2020-01-01 01:01:01'),(280,20240709124958,1,'2020-01-01 01:01:01'),(281,20240709132642,1,'2020-01-01 01:01:01'),(282,20240709183940,1,'2020-01-01 01:01:01'),(283,20240710155623,1,'2020-01-01 01:01:01'),(284,20240723102712,1,'2020-01-01 01:01:01'),(285,20240725152735,1,'2020-01-01 01:01:01'),(286,20240725182118,1,'2020-01-01 01:01:01'),(287,20240726100517,1,'2020-01-01 01:01:01'),(288,20240730171504,1,'2020-01-01 01:01:01'),(289,20240730174056,1,'2020-01-01 01:01:01'),(290,20240730215453,1,'2020-01-01 01:01:01'),(291,20240730374423,1,'2020-01-01 01:01:01'),(292,20240801115359,1,'2020-01-01 01:01:01'),(293,20240802101043,1,'2020-01-01 01:01:01'),(294,20240802113716,1,'2020-01-01 01:01:01'),(295,20240814135330,1,'2020-01-01 01:01:01'),(296,20240815000000,1,'2020-01-01 01:01:01'),(297,20240815000001,1,'2020-01-01 01:01:01'),(298,20240816103247,1,'2020-01-01 01:01:01'),(299,20240820091218,1,'2020-01-01 01:01:01'),(300,20240826111228,1,'2020-01-01 01:01:01'),(301,20240826160025,1,'2020-01-01 01:01:01'),(302,20240829165448,1,'2020-01-01 01:01:01'),(303,20240829165605,1,'2020-01-01 01:01:01'),(304,20240829165715,1,'2020-01-01 01:01:01'),(305,20240829165930,1,'2020-01-01 01:01:01'),(306,20240829170023,1,'2020-01-01 01:01:01'),(307,20240829170033,1,'2020-01-01 01:01:01'),(308,20240829170044,1,'2020-01-01 01:01:01'),(309,20240905105135,1,'2020-01-01 01:01:01'),(310,20240905140514,1,'2020-01-01 01:01:01'),(311,20240905200000,1,'2020-01-01 01:01:01'),(312,20240905200001,1,'2020-01-01 01:01:01'),(313,20241002104104,1,'2020-01-01 01:01:01'),(314,20241002104105,1,'2020-01-01 01:01:01'),(315,20241002104106,1,'2020-01-01 01:01:01'),(316,20241002210000,1,'2020-01-01 01:01:01'),(317,20241003145349,1,'2020-01-01 01:01:01'),(318,20241004005000,1,'2020-01-01 01:01:01'),(319,20241008083925,1,'2020-01-01 01:01:01'),(320,20241009090010,1,'2020-01-01 01:01:01'),(321,20241017163402,1,'2020-01-01 01:01:01'),(322,20241021224359,1,'2020-01-01 01:01:01'),(323,20241022140321,1,'2020-01-01 01:01:01'),(324,20241025111236,1,'2020-01-01 01:01:01'),(325,20241025112748,1,'2020-01-01 01:01:01'),(326,20241025141855,1,'2020-01-01 01:01:01'),(327,20241110152839,1,'2020-01-01 01:01:01'),(328,20241110152840,1,'2020-01-01 01:01:01'),(329,20241110152841,1,'2020-01-01 01:01:01'),(330,20241116233322,1,'2020-01-01 01:01:01');
+INSERT INTO `migration_status_tables` VALUES (1,0,1,'2020-01-01 01:01:01'),(2,20161118193812,1,'2020-01-01 01:01:01'),(3,20161118211713,1,'2020-01-01 01:01:01'),(4,20161118212436,1,'2020-01-01 01:01:01'),(5,20161118212515,1,'2020-01-01 01:01:01'),(6,20161118212528,1,'2020-01-01 01:01:01'),(7,20161118212538,1,'2020-01-01 01:01:01'),(8,20161118212549,1,'2020-01-01 01:01:01'),(9,20161118212557,1,'2020-01-01 01:01:01'),(10,20161118212604,1,'2020-01-01 01:01:01'),(11,20161118212613,1,'2020-01-01 01:01:01'),(12,20161118212621,1,'2020-01-01 01:01:01'),(13,20161118212630,1,'2020-01-01 01:01:01'),(14,20161118212641,1,'2020-01-01 01:01:01'),(15,20161118212649,1,'2020-01-01 01:01:01'),(16,20161118212656,1,'2020-01-01 01:01:01'),(17,20161118212758,1,'2020-01-01 01:01:01'),(18,20161128234849,1,'2020-01-01 01:01:01'),(19,20161230162221,1,'2020-01-01 01:01:01'),(20,20170104113816,1,'2020-01-01 01:01:01'),(21,20170105151732,1,'2020-01-01 01:01:01'),(22,20170108191242,1,'2020-01-01 01:01:01'),(23,20170109094020,1,'2020-01-01 01:01:01'),(24,20170109130438,1,'2020-01-01 01:01:01'),(25,20170110202752,1,'2020-01-01 01:01:01'),(26,20170111133013,1,'2020-01-01 01:01:01'),(27,20170117025759,1,'2020-01-01 01:01:01'),(28,20170118191001,1,'2020-01-01 01:01:01'),(29,20170119234632,1,'2020-01-01 01:01:01'),(30,20170124230432,1,'2020-01-01 01:01:01'),(31,20170127014618,1,'2020-01-01 01:01:01'),(32,20170131232841,1,'2020-01-01 01:01:01'),(33,20170223094154,1,'2020-01-01 01:01:01'),(34,20170306075207,1,'2020-01-01 01:01:01'),(35,20170309100733,1,'2020-01-01 01:01:01'),(36,20170331111922,1,'2020-01-01 01:01:01'),(37,20170502143928,1,'2020-01-01 01:01:01'),(38,20170504130602,1,'2020-01-01 01:01:01'),(39,20170509132100,1,'2020-01-01 01:01:01'),(40,20170519105647,1,'2020-01-01 01:01:01'),(41,20170519105648,1,'2020-01-01 01:01:01'),(42,20170831234300,1,'2020-01-01 01:01:01'),(43,20170831234301,1,'2020-01-01 01:01:01'),(44,20170831234303,1,'2020-01-01 01:01:01'),(45,20171116163618,1,'2020-01-01 01:01:01'),(46,20171219164727,1,'2020-01-01 01:01:01'),(47,20180620164811,1,'2020-01-01 01:01:01'),(48,20180620175054,1,'2020-01-01 01:01:01'),(49,20180620175055,1,'2020-01-01 01:01:01'),(50,20191010101639,1,'2020-01-01 01:01:01'),(51,20191010155147,1,'2020-01-01 01:01:01'),(52,20191220130734,1,'2020-01-01 01:01:01'),(53,20200311140000,1,'2020-01-01 01:01:01'),(54,20200405120000,1,'2020-01-01 01:01:01'),(55,20200407120000,1,'2020-01-01 01:01:01'),(56,20200420120000,1,'2020-01-01 01:01:01'),(57,20200504120000,1,'2020-01-01 01:01:01'),(58,20200512120000,1,'2020-01-01 01:01:01'),(59,20200707120000,1,'2020-01-01 01:01:01'),(60,20201011162341,1,'2020-01-01 01:01:01'),(61,20201021104586,1,'2020-01-01 01:01:01'),(62,20201102112520,1,'2020-01-01 01:01:01'),(63,20201208121729,1,'2020-01-01 01:01:01'),(64,20201215091637,1,'2020-01-01 01:01:01'),(65,20210119174155,1,'2020-01-01 01:01:01'),(66,20210326182902,1,'2020-01-01 01:01:01'),(67,20210421112652,1,'2020-01-01 01:01:01'),(68,20210506095025,1,'2020-01-01 01:01:01'),(69,20210513115729,1,'2020-01-01 01:01:01'),(70,20210526113559,1,'2020-01-01 01:01:01'),(71,20210601000001,1,'2020-01-01 01:01:01'),(72,20210601000002,1,'2020-01-01 01:01:01'),(73,20210601000003,1,'2020-01-01 01:01:01'),(74,20210601000004,1,'2020-01-01 01:01:01'),(75,20210601000005,1,'2020-01-01 01:01:01'),(76,20210601000006,1,'2020-01-01 01:01:01'),(77,20210601000007,1,'2020-01-01 01:01:01'),(78,20210601000008,1,'2020-01-01 01:01:01'),(79,20210606151329,1,'2020-01-01 01:01:01'),(80,20210616163757,1,'2020-01-01 01:01:01'),(81,20210617174723,1,'2020-01-01 01:01:01'),(82,20210622160235,1,'2020-01-01 01:01:01'),(83,20210623100031,1,'2020-01-01 01:01:01'),(84,20210623133615,1,'2020-01-01 01:01:01'),(85,20210708143152,1,'2020-01-01 01:01:01'),(86,20210709124443,1,'2020-01-01 01:01:01'),(87,20210712155608,1,'2020-01-01 01:01:01'),(88,20210714102108,1,'2020-01-01 01:01:01'),(89,20210719153709,1,'2020-01-01 01:01:01'),(90,20210721171531,1,'2020-01-01 01:01:01'),(91,20210723135713,1,'2020-01-01 01:01:01'),(92,20210802135933,1,'2020-01-01 01:01:01'),(93,20210806112844,1,'2020-01-01 01:01:01'),(94,20210810095603,1,'2020-01-01 01:01:01'),(95,20210811150223,1,'2020-01-01 01:01:01'),(96,20210818151827,1,'2020-01-01 01:01:01'),(97,20210818151828,1,'2020-01-01 01:01:01'),(98,20210818182258,1,'2020-01-01 01:01:01'),(99,20210819131107,1,'2020-01-01 01:01:01'),(100,20210819143446,1,'2020-01-01 01:01:01'),(101,20210903132338,1,'2020-01-01 01:01:01'),(102,20210915144307,1,'2020-01-01 01:01:01'),(103,20210920155130,1,'2020-01-01 01:01:01'),(104,20210927143115,1,'2020-01-01 01:01:01'),(105,20210927143116,1,'2020-01-01 01:01:01'),(106,20211013133706,1,'2020-01-01 01:01:01'),(107,20211013133707,1,'2020-01-01 01:01:01'),(108,20211102135149,1,'2020-01-01 01:01:01'),(109,20211109121546,1,'2020-01-01 01:01:01'),(110,20211110163320,1,'2020-01-01 01:01:01'),(111,20211116184029,1,'2020-01-01 01:01:01'),(112,20211116184030,1,'2020-01-01 01:01:01'),(113,20211202092042,1,'2020-01-01 01:01:01'),(114,20211202181033,1,'2020-01-01 01:01:01'),(115,20211207161856,1,'2020-01-01 01:01:01'),(116,20211216131203,1,'2020-01-01 01:01:01'),(117,20211221110132,1,'2020-01-01 01:01:01'),(118,20220107155700,1,'2020-01-01 01:01:01'),(119,20220125105650,1,'2020-01-01 01:01:01'),(120,20220201084510,1,'2020-01-01 01:01:01'),(121,20220208144830,1,'2020-01-01 01:01:01'),(122,20220208144831,1,'2020-01-01 01:01:01'),(123,20220215152203,1,'2020-01-01 01:01:01'),(124,20220223113157,1,'2020-01-01 01:01:01'),(125,20220307104655,1,'2020-01-01 01:01:01'),(126,20220309133956,1,'2020-01-01 01:01:01'),(127,20220316155700,1,'2020-01-01 01:01:01'),(128,20220323152301,1,'2020-01-01 01:01:01'),(129,20220330100659,1,'2020-01-01 01:01:01'),(130,20220404091216,1,'2020-01-01 01:01:01'),(131,20220419140750,1,'2020-01-01 01:01:01'),(132,20220428140039,1,'2020-01-01 01:01:01'),(133,20220503134048,1,'2020-01-01 01:01:01'),(134,20220524102918,1,'2020-01-01 01:01:01'),(135,20220526123327,1,'2020-01-01 01:01:01'),(136,20220526123328,1,'2020-01-01 01:01:01'),(137,20220526123329,1,'2020-01-01 01:01:01'),(138,20220608113128,1,'2020-01-01 01:01:01'),(139,20220627104817,1,'2020-01-01 01:01:01'),(140,20220704101843,1,'2020-01-01 01:01:01'),(141,20220708095046,1,'2020-01-01 01:01:01'),(142,20220713091130,1,'2020-01-01 01:01:01'),(143,20220802135510,1,'2020-01-01 01:01:01'),(144,20220818101352,1,'2020-01-01 01:01:01'),(145,20220822161445,1,'2020-01-01 01:01:01'),(146,20220831100036,1,'2020-01-01 01:01:01'),(147,20220831100151,1,'2020-01-01 01:01:01'),(148,20220908181826,1,'2020-01-01 01:01:01'),(149,20220914154915,1,'2020-01-01 01:01:01'),(150,20220915165115,1,'2020-01-01 01:01:01'),(151,20220915165116,1,'2020-01-01 01:01:01'),(152,20220928100158,1,'2020-01-01 01:01:01'),(153,20221014084130,1,'2020-01-01 01:01:01'),(154,20221027085019,1,'2020-01-01 01:01:01'),(155,20221101103952,1,'2020-01-01 01:01:01'),(156,20221104144401,1,'2020-01-01 01:01:01'),(157,20221109100749,1,'2020-01-01 01:01:01'),(158,20221115104546,1,'2020-01-01 01:01:01'),(159,20221130114928,1,'2020-01-01 01:01:01'),(160,20221205112142,1,'2020-01-01 01:01:01'),(161,20221216115820,1,'2020-01-01 01:01:01'),(162,20221220195934,1,'2020-01-01 01:01:01'),(163,20221220195935,1,'2020-01-01 01:01:01'),(164,20221223174807,1,'2020-01-01 01:01:01'),(165,20221227163855,1,'2020-01-01 01:01:01'),(166,20221227163856,1,'2020-01-01 01:01:01'),(167,20230202224725,1,'2020-01-01 01:01:01'),(168,20230206163608,1,'2020-01-01 01:01:01'),(169,20230214131519,1,'2020-01-01 01:01:01'),(170,20230303135738,1,'2020-01-01 01:01:01'),(171,20230313135301,1,'2020-01-01 01:01:01'),(172,20230313141819,1,'2020-01-01 01:01:01'),(173,20230315104937,1,'2020-01-01 01:01:01'),(174,20230317173844,1,'2020-01-01 01:01:01'),(175,20230320133602,1,'2020-01-01 01:01:01'),(176,20230330100011,1,'2020-01-01 01:01:01'),(177,20230330134823,1,'2020-01-01 01:01:01'),(178,20230405232025,1,'2020-01-01 01:01:01'),(179,20230408084104,1,'2020-01-01 01:01:01'),(180,20230411102858,1,'2020-01-01 01:01:01'),(181,20230421155932,1,'2020-01-01 01:01:01'),(182,20230425082126,1,'2020-01-01 01:01:01'),(183,20230425105727,1,'2020-01-01 01:01:01'),(184,20230501154913,1,'2020-01-01 01:01:01'),(185,20230503101418,1,'2020-01-01 01:01:01'),(186,20230515144206,1,'2020-01-01 01:01:01'),(187,20230517140952,1,'2020-01-01 01:01:01'),(188,20230517152807,1,'2020-01-01 01:01:01'),(189,20230518114155,1,'2020-01-01 01:01:01'),(190,20230520153236,1,'2020-01-01 01:01:01'),(191,20230525151159,1,'2020-01-01 01:01:01'),(192,20230530122103,1,'2020-01-01 01:01:01'),(193,20230602111827,1,'2020-01-01 01:01:01'),(194,20230608103123,1,'2020-01-01 01:01:01'),(195,20230629140529,1,'2020-01-01 01:01:01'),(196,20230629140530,1,'2020-01-01 01:01:01'),(197,20230711144622,1,'2020-01-01 01:01:01'),(198,20230721135421,1,'2020-01-01 01:01:01'),(199,20230721161508,1,'2020-01-01 01:01:01'),(200,20230726115701,1,'2020-01-01 01:01:01'),(201,20230807100822,1,'2020-01-01 01:01:01'),(202,20230814150442,1,'2020-01-01 01:01:01'),(203,20230823122728,1,'2020-01-01 01:01:01'),(204,20230906152143,1,'2020-01-01 01:01:01'),(205,20230911163618,1,'2020-01-01 01:01:01'),(206,20230912101759,1,'2020-01-01 01:01:01'),(207,20230915101341,1,'2020-01-01 01:01:01'),(208,20230918132351,1,'2020-01-01 01:01:01'),(209,20231004144339,1,'2020-01-01 01:01:01'),(210,20231009094541,1,'2020-01-01 01:01:01'),(211,20231009094542,1,'2020-01-01 01:01:01'),(212,20231009094543,1,'2020-01-01 01:01:01'),(213,20231009094544,1,'2020-01-01 01:01:01'),(214,20231016091915,1,'2020-01-01 01:01:01'),(215,20231024174135,1,'2020-01-01 01:01:01'),(216,20231025120016,1,'2020-01-01 01:01:01'),(217,20231025160156,1,'2020-01-01 01:01:01'),(218,20231031165350,1,'2020-01-01 01:01:01'),(219,20231106144110,1,'2020-01-01 01:01:01'),(220,20231107130934,1,'2020-01-01 01:01:01'),(221,20231109115838,1,'2020-01-01 01:01:01'),(222,20231121054530,1,'2020-01-01 01:01:01'),(223,20231122101320,1,'2020-01-01 01:01:01'),(224,20231130132828,1,'2020-01-01 01:01:01'),(225,20231130132931,1,'2020-01-01 01:01:01'),(226,20231204155427,1,'2020-01-01 01:01:01'),(227,20231206142340,1,'2020-01-01 01:01:01'),(228,20231207102320,1,'2020-01-01 01:01:01'),(229,20231207102321,1,'2020-01-01 01:01:01'),(230,20231207133731,1,'2020-01-01 01:01:01'),(231,20231212094238,1,'2020-01-01 01:01:01'),(232,20231212095734,1,'2020-01-01 01:01:01'),(233,20231212161121,1,'2020-01-01 01:01:01'),(234,20231215122713,1,'2020-01-01 01:01:01'),(235,20231219143041,1,'2020-01-01 01:01:01'),(236,20231224070653,1,'2020-01-01 01:01:01'),(237,20240110134315,1,'2020-01-01 01:01:01'),(238,20240119091637,1,'2020-01-01 01:01:01'),(239,20240126020642,1,'2020-01-01 01:01:01'),(240,20240126020643,1,'2020-01-01 01:01:01'),(241,20240129162819,1,'2020-01-01 01:01:01'),(242,20240130115133,1,'2020-01-01 01:01:01'),(243,20240131083822,1,'2020-01-01 01:01:01'),(244,20240205095928,1,'2020-01-01 01:01:01'),(245,20240205121956,1,'2020-01-01 01:01:01'),(246,20240209110212,1,'2020-01-01 01:01:01'),(247,20240212111533,1,'2020-01-01 01:01:01'),(248,20240221112844,1,'2020-01-01 01:01:01'),(249,20240222073518,1,'2020-01-01 01:01:01'),(250,20240222135115,1,'2020-01-01 01:01:01'),(251,20240226082255,1,'2020-01-01 01:01:01'),(252,20240228082706,1,'2020-01-01 01:01:01'),(253,20240301173035,1,'2020-01-01 01:01:01'),(254,20240302111134,1,'2020-01-01 01:01:01'),(255,20240312103753,1,'2020-01-01 01:01:01'),(256,20240313143416,1,'2020-01-01 01:01:01'),(257,20240314085226,1,'2020-01-01 01:01:01'),(258,20240314151747,1,'2020-01-01 01:01:01'),(259,20240320145650,1,'2020-01-01 01:01:01'),(260,20240327115530,1,'2020-01-01 01:01:01'),(261,20240327115617,1,'2020-01-01 01:01:01'),(262,20240408085837,1,'2020-01-01 01:01:01'),(263,20240415104633,1,'2020-01-01 01:01:01'),(264,20240430111727,1,'2020-01-01 01:01:01'),(265,20240515200020,1,'2020-01-01 01:01:01'),(266,20240521143023,1,'2020-01-01 01:01:01'),(267,20240521143024,1,'2020-01-01 01:01:01'),(268,20240601174138,1,'2020-01-01 01:01:01'),(269,20240607133721,1,'2020-01-01 01:01:01'),(270,20240612150059,1,'2020-01-01 01:01:01'),(271,20240613162201,1,'2020-01-01 01:01:01'),(272,20240613172616,1,'2020-01-01 01:01:01'),(273,20240618142419,1,'2020-01-01 01:01:01'),(274,20240625093543,1,'2020-01-01 01:01:01'),(275,20240626195531,1,'2020-01-01 01:01:01'),(276,20240702123921,1,'2020-01-01 01:01:01'),(277,20240703154849,1,'2020-01-01 01:01:01'),(278,20240707134035,1,'2020-01-01 01:01:01'),(279,20240707134036,1,'2020-01-01 01:01:01'),(280,20240709124958,1,'2020-01-01 01:01:01'),(281,20240709132642,1,'2020-01-01 01:01:01'),(282,20240709183940,1,'2020-01-01 01:01:01'),(283,20240710155623,1,'2020-01-01 01:01:01'),(284,20240723102712,1,'2020-01-01 01:01:01'),(285,20240725152735,1,'2020-01-01 01:01:01'),(286,20240725182118,1,'2020-01-01 01:01:01'),(287,20240726100517,1,'2020-01-01 01:01:01'),(288,20240730171504,1,'2020-01-01 01:01:01'),(289,20240730174056,1,'2020-01-01 01:01:01'),(290,20240730215453,1,'2020-01-01 01:01:01'),(291,20240730374423,1,'2020-01-01 01:01:01'),(292,20240801115359,1,'2020-01-01 01:01:01'),(293,20240802101043,1,'2020-01-01 01:01:01'),(294,20240802113716,1,'2020-01-01 01:01:01'),(295,20240814135330,1,'2020-01-01 01:01:01'),(296,20240815000000,1,'2020-01-01 01:01:01'),(297,20240815000001,1,'2020-01-01 01:01:01'),(298,20240816103247,1,'2020-01-01 01:01:01'),(299,20240820091218,1,'2020-01-01 01:01:01'),(300,20240826111228,1,'2020-01-01 01:01:01'),(301,20240826160025,1,'2020-01-01 01:01:01'),(302,20240829165448,1,'2020-01-01 01:01:01'),(303,20240829165605,1,'2020-01-01 01:01:01'),(304,20240829165715,1,'2020-01-01 01:01:01'),(305,20240829165930,1,'2020-01-01 01:01:01'),(306,20240829170023,1,'2020-01-01 01:01:01'),(307,20240829170033,1,'2020-01-01 01:01:01'),(308,20240829170044,1,'2020-01-01 01:01:01'),(309,20240905105135,1,'2020-01-01 01:01:01'),(310,20240905140514,1,'2020-01-01 01:01:01'),(311,20240905200000,1,'2020-01-01 01:01:01'),(312,20240905200001,1,'2020-01-01 01:01:01'),(313,20241002104104,1,'2020-01-01 01:01:01'),(314,20241002104105,1,'2020-01-01 01:01:01'),(315,20241002104106,1,'2020-01-01 01:01:01'),(316,20241002210000,1,'2020-01-01 01:01:01'),(317,20241003145349,1,'2020-01-01 01:01:01'),(318,20241004005000,1,'2020-01-01 01:01:01'),(319,20241008083925,1,'2020-01-01 01:01:01'),(320,20241009090010,1,'2020-01-01 01:01:01'),(321,20241017163402,1,'2020-01-01 01:01:01'),(322,20241021224359,1,'2020-01-01 01:01:01'),(323,20241022140321,1,'2020-01-01 01:01:01'),(324,20241025111236,1,'2020-01-01 01:01:01'),(325,20241025112748,1,'2020-01-01 01:01:01'),(326,20241025141855,1,'2020-01-01 01:01:01'),(327,20241110152839,1,'2020-01-01 01:01:01'),(328,20241110152840,1,'2020-01-01 01:01:01'),(329,20241110152841,1,'2020-01-01 01:01:01'),(330,20241116233322,1,'2020-01-01 01:01:01'),(331,20241122171434,1,'2020-01-01 01:01:01'),(332,20241125150614,1,'2020-01-01 01:01:01'),(333,20241203125346,1,'2020-01-01 01:01:01');
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `mobile_device_management_solutions` (
@@ -1487,7 +1484,6 @@ CREATE TABLE `policy_membership` (
`automation_iteration` int DEFAULT NULL,
PRIMARY KEY (`policy_id`,`host_id`),
KEY `idx_policy_membership_passes` (`passes`),
- KEY `idx_policy_membership_policy_id` (`policy_id`),
KEY `idx_policy_membership_host_id_passes` (`host_id`,`passes`),
CONSTRAINT `policy_membership_ibfk_1` FOREIGN KEY (`policy_id`) REFERENCES `policies` (`id`) ON DELETE CASCADE
) /*!50100 TABLESPACE `innodb_system` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
@@ -1729,10 +1725,10 @@ CREATE TABLE `software` (
`checksum` binary(16) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `idx_software_checksum` (`checksum`),
- KEY `software_listing_idx` (`name`,`id`),
KEY `software_source_vendor_idx` (`source`,`vendor_old`),
KEY `title_id` (`title_id`),
- KEY `idx_sw_name_source_browser` (`name`,`source`,`browser`)
+ KEY `idx_sw_name_source_browser` (`name`,`source`,`browser`),
+ KEY `software_listing_idx` (`name`)
) /*!50100 TABLESPACE `innodb_system` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET @saved_cs_client = @@character_set_client */;
@@ -1760,8 +1756,7 @@ CREATE TABLE `software_cve` (
`software_id` bigint unsigned DEFAULT NULL,
`resolved_in_version` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`),
- UNIQUE KEY `unq_software_id_cve` (`software_id`,`cve`),
- KEY `software_cve_software_id` (`software_id`)
+ UNIQUE KEY `unq_software_id_cve` (`software_id`,`cve`)
) /*!50100 TABLESPACE `innodb_system` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET @saved_cs_client = @@character_set_client */;
diff --git a/server/fleet/activities.go b/server/fleet/activities.go
index 751218ac6e..1298476dde 100644
--- a/server/fleet/activities.go
+++ b/server/fleet/activities.go
@@ -79,6 +79,8 @@ var ActivityDetailsList = []ActivityDetails{
ActivityTypeEnabledWindowsMDM{},
ActivityTypeDisabledWindowsMDM{},
+ ActivityTypeEnabledWindowsMDMMigration{},
+ ActivityTypeDisabledWindowsMDMMigration{},
ActivityTypeRanScript{},
ActivityTypeAddedScript{},
@@ -1236,6 +1238,28 @@ func (a ActivityTypeDisabledWindowsMDM) Documentation() (activity, details, deta
`This activity does not contain any detail fields.`, ``
}
+type ActivityTypeEnabledWindowsMDMMigration struct{}
+
+func (a ActivityTypeEnabledWindowsMDMMigration) ActivityName() string {
+ return "enabled_windows_mdm_migration"
+}
+
+func (a ActivityTypeEnabledWindowsMDMMigration) Documentation() (activity, details, detailsExample string) {
+ return `Generated when a user enables automatic MDM migration for Windows hosts, if Windows MDM is turned on.`,
+ `This activity does not contain any detail fields.`, ``
+}
+
+type ActivityTypeDisabledWindowsMDMMigration struct{}
+
+func (a ActivityTypeDisabledWindowsMDMMigration) ActivityName() string {
+ return "disabled_windows_mdm_migration"
+}
+
+func (a ActivityTypeDisabledWindowsMDMMigration) Documentation() (activity, details, detailsExample string) {
+ return `Generated when a user disables automatic MDM migration for Windows hosts, if Windows MDM is turned on.`,
+ `This activity does not contain any detail fields.`, ``
+}
+
type ActivityTypeRanScript struct {
HostID uint `json:"host_id"`
HostDisplayName string `json:"host_display_name"`
diff --git a/server/fleet/app.go b/server/fleet/app.go
index 5622c438a9..662095832e 100644
--- a/server/fleet/app.go
+++ b/server/fleet/app.go
@@ -189,10 +189,11 @@ type MDM struct {
// WindowsUpdates defines the OS update settings for Windows devices.
WindowsUpdates WindowsUpdates `json:"windows_updates"`
- MacOSSettings MacOSSettings `json:"macos_settings"`
- MacOSSetup MacOSSetup `json:"macos_setup"`
- MacOSMigration MacOSMigration `json:"macos_migration"`
- EndUserAuthentication MDMEndUserAuthentication `json:"end_user_authentication"`
+ MacOSSettings MacOSSettings `json:"macos_settings"`
+ MacOSSetup MacOSSetup `json:"macos_setup"`
+ MacOSMigration MacOSMigration `json:"macos_migration"`
+ WindowsMigrationEnabled bool `json:"windows_migration_enabled"`
+ EndUserAuthentication MDMEndUserAuthentication `json:"end_user_authentication"`
// WindowsEnabledAndConfigured indicates if Fleet MDM is enabled for Windows.
// There is no other configuration required for Windows other than enabling
diff --git a/server/fleet/cron_schedules.go b/server/fleet/cron_schedules.go
index 42541a96d1..12fa1ef7ad 100644
--- a/server/fleet/cron_schedules.go
+++ b/server/fleet/cron_schedules.go
@@ -21,6 +21,7 @@ const (
CronWorkerIntegrations CronScheduleName = "integrations"
CronActivitiesStreaming CronScheduleName = "activities_streaming"
CronMDMAppleProfileManager CronScheduleName = "mdm_apple_profile_manager"
+ CronMDMWindowsProfileManager CronScheduleName = "mdm_windows_profile_manager"
CronAppleMDMIPhoneIPadRefetcher CronScheduleName = "apple_mdm_iphone_ipad_refetcher"
CronAppleMDMAPNsPusher CronScheduleName = "apple_mdm_apns_pusher"
CronCalendar CronScheduleName = "calendar"
diff --git a/server/fleet/hosts.go b/server/fleet/hosts.go
index 95ce9ee268..d55e4ff3ce 100644
--- a/server/fleet/hosts.go
+++ b/server/fleet/hosts.go
@@ -344,7 +344,7 @@ type Host struct {
// is that the latter is a one-time request, while this one is a persistent
// until the timestamp expires. The initial use-case is to check for a host
// to be unenrolled from its old MDM solution, in the "migrate to Fleet MDM"
- // workflow.
+ // workflow (both Apple and Windows).
//
// In the future, if we want to use it for more than one use-case, we could
// add a "reason" field with well-known labels so we know what condition(s)
diff --git a/server/fleet/mdm.go b/server/fleet/mdm.go
index 4d3e09f68e..b441067398 100644
--- a/server/fleet/mdm.go
+++ b/server/fleet/mdm.go
@@ -18,6 +18,11 @@ const (
MDMAppleDeclarationUUIDPrefix = "d"
MDMAppleProfileUUIDPrefix = "a"
MDMWindowsProfileUUIDPrefix = "w"
+
+ // RefetchMDMUnenrollCriticalQueryDuration is the duration to set the
+ // RefetchCriticalQueriesUntil field when migrating a device from a
+ // third-party MDM solution to Fleet.
+ RefetchMDMUnenrollCriticalQueryDuration = 3 * time.Minute
)
type AppleMDM struct {
diff --git a/server/fleet/orbit.go b/server/fleet/orbit.go
index 6c06a963e2..357af033a6 100644
--- a/server/fleet/orbit.go
+++ b/server/fleet/orbit.go
@@ -8,7 +8,12 @@ import "encoding/json"
type OrbitConfigNotifications struct {
RenewEnrollmentProfile bool `json:"renew_enrollment_profile,omitempty"`
RotateDiskEncryptionKey bool `json:"rotate_disk_encryption_key,omitempty"`
- NeedsMDMMigration bool `json:"needs_mdm_migration,omitempty"`
+
+ // NeedsMDMMigration is set to true if MDM is enabled for the host's
+ // platform, MDM migration is enabled for that platform, and the host is
+ // eligible for such a migration (e.g. it is enrolled in a third-party MDM
+ // solution).
+ NeedsMDMMigration bool `json:"needs_mdm_migration,omitempty"`
// NeedsProgrammaticWindowsMDMEnrollment is sent as true if Windows MDM is
// enabled and the device should be enrolled as far as the server knows (e.g.
diff --git a/server/fleet/service.go b/server/fleet/service.go
index e4e7611d44..b65e85e7be 100644
--- a/server/fleet/service.go
+++ b/server/fleet/service.go
@@ -851,6 +851,9 @@ type Service interface {
// ListABMTokens lists all the ABM tokens in Fleet.
ListABMTokens(ctx context.Context) ([]*ABMToken, error)
+ // CountABMTokens counts the ABM tokens in Fleet.
+ CountABMTokens(ctx context.Context) (int, error)
+
// UpdateABMTokenTeams updates the default macOS, iOS, and iPadOS team IDs for a given ABM token.
UpdateABMTokenTeams(ctx context.Context, tokenID uint, macOSTeamID, iOSTeamID, iPadOSTeamID *uint) (*ABMToken, error)
diff --git a/server/mdm/lifecycle/lifecycle.go b/server/mdm/lifecycle/lifecycle.go
index 33658a2367..fd96454274 100644
--- a/server/mdm/lifecycle/lifecycle.go
+++ b/server/mdm/lifecycle/lifecycle.go
@@ -32,13 +32,14 @@ const (
// Not all options are required for all actions, each individual action should
// validate that it receives the required information.
type HostOptions struct {
- Action HostAction
- Platform string
- UUID string
- HardwareSerial string
- HardwareModel string
- EnrollReference string
- Host *fleet.Host
+ Action HostAction
+ Platform string
+ UUID string
+ HardwareSerial string
+ HardwareModel string
+ EnrollReference string
+ Host *fleet.Host
+ HasSetupExperienceItems bool
}
// HostLifecycle manages MDM host lifecycle actions
@@ -174,6 +175,7 @@ func (t *HostLifecycle) turnOnDarwin(ctx context.Context, opts HostOptions) erro
opts.Platform,
tmID,
opts.EnrollReference,
+ !opts.HasSetupExperienceItems,
)
return ctxerr.Wrap(ctx, err, "queue DEP post-enroll task")
}
@@ -189,6 +191,7 @@ func (t *HostLifecycle) turnOnDarwin(ctx context.Context, opts HostOptions) erro
opts.Platform,
tmID,
opts.EnrollReference,
+ false,
); err != nil {
return ctxerr.Wrap(ctx, err, "queue manual post-enroll task")
}
diff --git a/server/mdm/maintainedapps/apps.json b/server/mdm/maintainedapps/apps.json
index c35dfb4f90..4594433737 100644
--- a/server/mdm/maintainedapps/apps.json
+++ b/server/mdm/maintainedapps/apps.json
@@ -1,133 +1,111 @@
[
- {
- "identifier": "1password",
- "bundle_identifier": "com.1password.1password",
- "installer_format": "zip:app",
- "automatic_policy_query": "SELECT 1 FROM apps WHERE bundle_identifier = 'com.1password.1password';"
- },
- {
- "identifier": "adobe-acrobat-reader",
- "bundle_identifier": "com.adobe.Reader",
- "installer_format": "dmg:pkg",
- "automatic_policy_query": "SELECT 1 FROM apps WHERE bundle_identifier = 'com.adobe.Reader';"
- },
- {
- "identifier": "box-drive",
- "bundle_identifier": "com.box.desktop",
- "installer_format": "pkg",
- "pre_uninstall_scripts": [
- "(cd /Users/$LOGGED_IN_USER; sudo -u $LOGGED_IN_USER fileproviderctl domain remove -A com.box.desktop.boxfileprovider)",
- "(cd /Users/$LOGGED_IN_USER; sudo -u $LOGGED_IN_USER /Applications/Box.app/Contents/MacOS/fpe/streem --remove-fpe-domain-and-archive-unsynced-content Box)",
- "(cd /Users/$LOGGED_IN_USER; sudo -u $LOGGED_IN_USER /Applications/Box.app/Contents/MacOS/fpe/streem --remove-fpe-domain-and-preserve-unsynced-content Box)",
- "(cd /Users/$LOGGED_IN_USER; defaults delete com.box.desktop)",
- "echo \"${LOGGED_IN_USER} ALL = (root) NOPASSWD: /Library/Application\\ Support/Box/uninstall_box_drive_r\" >> /etc/sudoers.d/box_uninstall"
- ],
- "post_uninstall_scripts": ["rm /etc/sudoers.d/box_uninstall"],
- "automatic_policy_query": "SELECT 1 FROM apps WHERE bundle_identifier = 'com.box.desktop';"
- },
- {
- "identifier": "brave-browser",
- "bundle_identifier": "com.brave.Browser",
- "installer_format": "dmg:app",
- "automatic_policy_query": "SELECT 1 FROM apps WHERE bundle_identifier = 'com.brave.Browser';"
- },
- {
- "identifier": "cloudflare-warp",
- "bundle_identifier": "com.cloudflare.1dot1dot1dot1.macos",
- "installer_format": "pkg",
- "post_uninstall_scripts": [
- "/Applications/Cloudflare\\ WARP.app/Contents/Resources/uninstall.sh"
- ],
- "automatic_policy_query": "SELECT 1 FROM apps WHERE bundle_identifier = 'com.cloudflare.1dot1dot1dot1.macos';"
- },
- {
- "identifier": "docker",
- "bundle_identifier": "com.docker.docker",
- "installer_format": "dmg:app",
- "automatic_policy_query": "SELECT 1 FROM apps WHERE bundle_identifier = 'com.docker.docker';"
- },
- {
- "identifier": "figma",
- "bundle_identifier": "com.figma.Desktop",
- "installer_format": "zip:app",
- "automatic_policy_query": "SELECT 1 FROM apps WHERE bundle_identifier = 'com.figma.Desktop';"
- },
- {
- "identifier": "firefox",
- "bundle_identifier": "org.mozilla.firefox",
- "installer_format": "dmg:app",
- "automatic_policy_query": "SELECT 1 FROM apps WHERE bundle_identifier = 'org.mozilla.firefox';"
- },
- {
- "identifier": "google-chrome",
- "bundle_identifier": "com.google.Chrome",
- "installer_format": "dmg:app",
- "automatic_policy_query": "SELECT 1 FROM apps WHERE bundle_identifier = 'com.google.Chrome';"
- },
- {
- "identifier": "microsoft-edge",
- "bundle_identifier": "com.microsoft.edgemac",
- "installer_format": "pkg",
- "automatic_policy_query": "SELECT 1 FROM apps WHERE bundle_identifier = 'com.microsoft.edgemac';"
- },
- {
- "identifier": "microsoft-excel",
- "bundle_identifier": "com.microsoft.Excel",
- "installer_format": "pkg",
- "automatic_policy_query": "SELECT 1 FROM apps WHERE bundle_identifier = 'com.microsoft.Excel';"
- },
- {
- "identifier": "microsoft-teams",
- "bundle_identifier": "com.microsoft.teams2",
- "installer_format": "pkg",
- "automatic_policy_query": "SELECT 1 FROM apps WHERE bundle_identifier = 'com.microsoft.teams2';"
- },
- {
- "identifier": "microsoft-word",
- "bundle_identifier": "com.microsoft.Word",
- "installer_format": "pkg",
- "automatic_policy_query": "SELECT 1 FROM apps WHERE bundle_identifier = 'com.microsoft.Word';"
- },
- {
- "identifier": "notion",
- "bundle_identifier": "notion.id",
- "installer_format": "dmg:app",
- "automatic_policy_query": "SELECT 1 FROM apps WHERE bundle_identifier = 'notion.id';"
- },
- {
- "identifier": "postman",
- "bundle_identifier": "com.postmanlabs.mac",
- "installer_format": "zip:app",
- "automatic_policy_query": "SELECT 1 FROM apps WHERE bundle_identifier = 'com.postmanlabs.mac';"
- },
- {
- "identifier": "slack",
- "bundle_identifier": "com.tinyspeck.slackmacgap",
- "installer_format": "dmg:app",
- "automatic_policy_query": "SELECT 1 FROM apps WHERE bundle_identifier = 'com.tinyspeck.slackmacgap';"
- },
- {
- "identifier": "teamviewer",
- "bundle_identifier": "com.teamviewer.TeamViewer",
- "installer_format": "pkg",
- "automatic_policy_query": "SELECT 1 FROM apps WHERE bundle_identifier = 'com.teamviewer.TeamViewer';"
- },
- {
- "identifier": "visual-studio-code",
- "bundle_identifier": "com.microsoft.VSCode",
- "installer_format": "zip:app",
- "automatic_policy_query": "SELECT 1 FROM apps WHERE bundle_identifier = 'com.microsoft.VSCode';"
- },
- {
- "identifier": "whatsapp",
- "bundle_identifier": "net.whatsapp.WhatsApp",
- "installer_format": "zip:app",
- "automatic_policy_query": "SELECT 1 FROM apps WHERE bundle_identifier = 'net.whatsapp.WhatsApp';"
- },
- {
- "identifier": "zoom",
- "bundle_identifier": "us.zoom.xos",
- "installer_format": "pkg",
- "automatic_policy_query": "SELECT 1 FROM apps WHERE bundle_identifier = 'us.zoom.xos';"
- }
+ {
+ "identifier": "1password",
+ "bundle_identifier": "com.1password.1password",
+ "installer_format": "zip:app"
+ },
+ {
+ "identifier": "adobe-acrobat-reader",
+ "bundle_identifier": "com.adobe.Reader",
+ "installer_format": "dmg:pkg"
+ },
+ {
+ "identifier": "box-drive",
+ "bundle_identifier": "com.box.desktop",
+ "installer_format": "pkg",
+ "pre_uninstall_scripts": [
+ "(cd /Users/$LOGGED_IN_USER; sudo -u $LOGGED_IN_USER fileproviderctl domain remove -A com.box.desktop.boxfileprovider)",
+ "(cd /Users/$LOGGED_IN_USER; sudo -u $LOGGED_IN_USER /Applications/Box.app/Contents/MacOS/fpe/streem --remove-fpe-domain-and-archive-unsynced-content Box)",
+ "(cd /Users/$LOGGED_IN_USER; sudo -u $LOGGED_IN_USER /Applications/Box.app/Contents/MacOS/fpe/streem --remove-fpe-domain-and-preserve-unsynced-content Box)",
+ "(cd /Users/$LOGGED_IN_USER; defaults delete com.box.desktop)",
+ "echo \"${LOGGED_IN_USER} ALL = (root) NOPASSWD: /Library/Application\\ Support/Box/uninstall_box_drive_r\" >> /etc/sudoers.d/box_uninstall"
+ ],
+ "post_uninstall_scripts": ["rm /etc/sudoers.d/box_uninstall"]
+ },
+ {
+ "identifier": "brave-browser",
+ "bundle_identifier": "com.brave.Browser",
+ "installer_format": "dmg:app"
+ },
+ {
+ "identifier": "cloudflare-warp",
+ "bundle_identifier": "com.cloudflare.1dot1dot1dot1.macos",
+ "installer_format": "pkg",
+ "post_uninstall_scripts": ["/Applications/Cloudflare\\ WARP.app/Contents/Resources/uninstall.sh"]
+ },
+ {
+ "identifier": "docker",
+ "bundle_identifier": "com.docker.docker",
+ "installer_format": "dmg:app"
+ },
+ {
+ "identifier": "figma",
+ "bundle_identifier": "com.figma.Desktop",
+ "installer_format": "zip:app"
+ },
+ {
+ "identifier": "firefox",
+ "bundle_identifier": "org.mozilla.firefox",
+ "installer_format": "dmg:app"
+ },
+ {
+ "identifier": "google-chrome",
+ "bundle_identifier": "com.google.Chrome",
+ "installer_format": "dmg:app"
+ },
+ {
+ "identifier": "microsoft-edge",
+ "bundle_identifier": "com.microsoft.edgemac",
+ "installer_format": "pkg"
+ },
+ {
+ "identifier": "microsoft-excel",
+ "bundle_identifier": "com.microsoft.Excel",
+ "installer_format": "pkg"
+ },
+ {
+ "identifier": "microsoft-teams",
+ "bundle_identifier": "com.microsoft.teams2",
+ "installer_format": "pkg"
+ },
+ {
+ "identifier": "microsoft-word",
+ "bundle_identifier": "com.microsoft.Word",
+ "installer_format": "pkg"
+ },
+ {
+ "identifier": "notion",
+ "bundle_identifier": "notion.id",
+ "installer_format": "dmg:app"
+ },
+ {
+ "identifier": "postman",
+ "bundle_identifier": "com.postmanlabs.mac",
+ "installer_format": "zip:app"
+ },
+ {
+ "identifier": "slack",
+ "bundle_identifier": "com.tinyspeck.slackmacgap",
+ "installer_format": "dmg:app"
+ },
+ {
+ "identifier": "teamviewer",
+ "bundle_identifier": "com.teamviewer.TeamViewer",
+ "installer_format": "pkg"
+ },
+ {
+ "identifier": "visual-studio-code",
+ "bundle_identifier": "com.microsoft.VSCode",
+ "installer_format": "zip:app"
+ },
+ {
+ "identifier": "whatsapp",
+ "bundle_identifier": "net.whatsapp.WhatsApp",
+ "installer_format": "zip:app"
+ },
+ {
+ "identifier": "zoom-for-it-admins",
+ "bundle_identifier": "us.zoom.xos",
+ "installer_format": "pkg"
+ }
]
diff --git a/server/mdm/maintainedapps/testdata/expected_apps.json b/server/mdm/maintainedapps/testdata/expected_apps.json
index 66c39b96e2..055e833d01 100644
--- a/server/mdm/maintainedapps/testdata/expected_apps.json
+++ b/server/mdm/maintainedapps/testdata/expected_apps.json
@@ -95,8 +95,8 @@
"platform": "darwin"
},
{
- "name": "Zoom",
- "version": "6.1.11.39163",
+ "name": "Zoom for IT Admins",
+ "version": "6.2.11.43613",
"platform": "darwin"
}
]
diff --git a/server/mdm/maintainedapps/testdata/scripts/zoom_install.golden.sh b/server/mdm/maintainedapps/testdata/scripts/zoom-for-it-admins_install.golden.sh
similarity index 64%
rename from server/mdm/maintainedapps/testdata/scripts/zoom_install.golden.sh
rename to server/mdm/maintainedapps/testdata/scripts/zoom-for-it-admins_install.golden.sh
index da33a91739..a181746b1a 100644
--- a/server/mdm/maintainedapps/testdata/scripts/zoom_install.golden.sh
+++ b/server/mdm/maintainedapps/testdata/scripts/zoom-for-it-admins_install.golden.sh
@@ -5,4 +5,4 @@ APPDIR="/Applications/"
TMPDIR=$(dirname "$(realpath $INSTALLER_PATH)")
# install pkg files
-sudo installer -pkg "$TMPDIR/zoomusInstallerFull.pkg" -target /
+sudo installer -pkg "$TMPDIR/ZoomInstallerIT.pkg" -target /
diff --git a/server/mdm/maintainedapps/testdata/scripts/zoom_uninstall.golden.sh b/server/mdm/maintainedapps/testdata/scripts/zoom-for-it-admins_uninstall.golden.sh
similarity index 93%
rename from server/mdm/maintainedapps/testdata/scripts/zoom_uninstall.golden.sh
rename to server/mdm/maintainedapps/testdata/scripts/zoom-for-it-admins_uninstall.golden.sh
index d9662c0a57..87c7866ba4 100644
--- a/server/mdm/maintainedapps/testdata/scripts/zoom_uninstall.golden.sh
+++ b/server/mdm/maintainedapps/testdata/scripts/zoom-for-it-admins_uninstall.golden.sh
@@ -114,16 +114,17 @@ remove_launchctl_service 'us.zoom.ZoomDaemon'
send_signal 'KILL' 'us.zoom.xos' "$LOGGED_IN_USER"
sudo pkgutil --forget 'us.zoom.pkg.videomeeting'
sudo rm -rf '/Applications/zoom.us.app'
+sudo rm -rf '/Library/Audio/Plug-Ins/HAL/ZoomAudioDevice.driver'
sudo rm -rf '/Library/Internet Plug-Ins/ZoomUsPlugIn.plugin'
sudo rm -rf '/Library/Logs/DiagnosticReports/zoom.us*'
sudo rm -rf '/Library/PrivilegedHelperTools/us.zoom.ZoomDaemon'
+trash $LOGGED_IN_USER '/Library/Preferences/us.zoom.config.plist'
trash $LOGGED_IN_USER '~/.zoomus'
trash $LOGGED_IN_USER '~/Desktop/Zoom'
trash $LOGGED_IN_USER '~/Documents/Zoom'
trash $LOGGED_IN_USER '~/Library/Application Scripts/*.ZoomClient3rd'
trash $LOGGED_IN_USER '~/Library/Application Support/CloudDocs/session/containers/iCloud.us.zoom.videomeetings'
trash $LOGGED_IN_USER '~/Library/Application Support/CloudDocs/session/containers/iCloud.us.zoom.videomeetings.plist'
-trash $LOGGED_IN_USER '~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/us.zoom*.sfl*'
trash $LOGGED_IN_USER '~/Library/Application Support/CrashReporter/zoom.us*'
trash $LOGGED_IN_USER '~/Library/Application Support/zoom.us'
trash $LOGGED_IN_USER '~/Library/Caches/us.zoom.xos'
@@ -135,13 +136,15 @@ trash $LOGGED_IN_USER '~/Library/Internet Plug-Ins/ZoomUsPlugIn.plugin'
trash $LOGGED_IN_USER '~/Library/Logs/zoom.us'
trash $LOGGED_IN_USER '~/Library/Logs/zoominstall.log'
trash $LOGGED_IN_USER '~/Library/Logs/ZoomPhone'
+trash $LOGGED_IN_USER '~/Library/Mobile Documents/iCloud~us~zoom~videomeetings'
trash $LOGGED_IN_USER '~/Library/Preferences/us.zoom.airhost.plist'
trash $LOGGED_IN_USER '~/Library/Preferences/us.zoom.caphost.plist'
trash $LOGGED_IN_USER '~/Library/Preferences/us.zoom.Transcode.plist'
trash $LOGGED_IN_USER '~/Library/Preferences/us.zoom.xos.Hotkey.plist'
trash $LOGGED_IN_USER '~/Library/Preferences/us.zoom.xos.plist'
trash $LOGGED_IN_USER '~/Library/Preferences/us.zoom.ZoomAutoUpdater.plist'
-trash $LOGGED_IN_USER '~/Library/Preferences/us.zoom.ZoomClips.plist'
trash $LOGGED_IN_USER '~/Library/Preferences/ZoomChat.plist'
+trash $LOGGED_IN_USER '~/Library/Safari/PerSiteZoomPreferences.plist'
+trash $LOGGED_IN_USER '~/Library/SafariTechnologyPreview/PerSiteZoomPreferences.plist'
trash $LOGGED_IN_USER '~/Library/Saved Application State/us.zoom.xos.savedState'
trash $LOGGED_IN_USER '~/Library/WebKit/us.zoom.xos'
diff --git a/server/mdm/maintainedapps/testdata/zoom-for-it-admins.json b/server/mdm/maintainedapps/testdata/zoom-for-it-admins.json
new file mode 100644
index 0000000000..4f6953a08d
--- /dev/null
+++ b/server/mdm/maintainedapps/testdata/zoom-for-it-admins.json
@@ -0,0 +1,103 @@
+{
+ "token": "zoom-for-it-admins",
+ "full_token": "zoom-for-it-admins",
+ "old_tokens": [],
+ "tap": "homebrew/cask",
+ "name": ["Zoom for IT Admins"],
+ "desc": "Video communication and virtual meeting platform",
+ "homepage": "https://www.zoom.us/",
+ "url": "https://cdn.zoom.us/prod/6.2.11.43613/ZoomInstallerIT.pkg",
+ "url_specs": {},
+ "version": "6.2.11.43613",
+ "installed": null,
+ "installed_time": null,
+ "bundle_version": null,
+ "bundle_short_version": null,
+ "outdated": false,
+ "sha256": "7773842fe8cb4cd3e9c9c072d2622b81fa06db71b8d72076fc51ce6b9b4c5a6f",
+ "artifacts": [
+ {
+ "uninstall": [
+ {
+ "launchctl": "us.zoom.ZoomDaemon",
+ "signal": ["KILL", "us.zoom.xos"],
+ "pkgutil": "us.zoom.pkg.videomeeting",
+ "delete": [
+ "/Applications/zoom.us.app",
+ "/Library/Audio/Plug-Ins/HAL/ZoomAudioDevice.driver",
+ "/Library/Internet Plug-Ins/ZoomUsPlugIn.plugin",
+ "/Library/Logs/DiagnosticReports/zoom.us*",
+ "/Library/PrivilegedHelperTools/us.zoom.ZoomDaemon"
+ ]
+ }
+ ]
+ },
+ { "pkg": ["ZoomInstallerIT.pkg"] },
+ {
+ "zap": [
+ {
+ "trash": [
+ "/Library/Preferences/us.zoom.config.plist",
+ "~/.zoomus",
+ "~/Desktop/Zoom",
+ "~/Documents/Zoom",
+ "~/Library/Application Scripts/*.ZoomClient3rd",
+ "~/Library/Application Support/CloudDocs/session/containers/iCloud.us.zoom.videomeetings",
+ "~/Library/Application Support/CloudDocs/session/containers/iCloud.us.zoom.videomeetings.plist",
+ "~/Library/Application Support/CrashReporter/zoom.us*",
+ "~/Library/Application Support/zoom.us",
+ "~/Library/Caches/us.zoom.xos",
+ "~/Library/Cookies/us.zoom.xos.binarycookies",
+ "~/Library/Group Containers/*.ZoomClient3rd",
+ "~/Library/HTTPStorages/us.zoom.xos",
+ "~/Library/HTTPStorages/us.zoom.xos.binarycookies",
+ "~/Library/Internet Plug-Ins/ZoomUsPlugIn.plugin",
+ "~/Library/Logs/zoom.us",
+ "~/Library/Logs/zoominstall.log",
+ "~/Library/Logs/ZoomPhone",
+ "~/Library/Mobile Documents/iCloud~us~zoom~videomeetings",
+ "~/Library/Preferences/us.zoom.airhost.plist",
+ "~/Library/Preferences/us.zoom.caphost.plist",
+ "~/Library/Preferences/us.zoom.Transcode.plist",
+ "~/Library/Preferences/us.zoom.xos.Hotkey.plist",
+ "~/Library/Preferences/us.zoom.xos.plist",
+ "~/Library/Preferences/us.zoom.ZoomAutoUpdater.plist",
+ "~/Library/Preferences/ZoomChat.plist",
+ "~/Library/Safari/PerSiteZoomPreferences.plist",
+ "~/Library/SafariTechnologyPreview/PerSiteZoomPreferences.plist",
+ "~/Library/Saved Application State/us.zoom.xos.savedState",
+ "~/Library/WebKit/us.zoom.xos"
+ ]
+ }
+ ]
+ }
+ ],
+ "caveats": null,
+ "depends_on": {},
+ "conflicts_with": { "cask": ["zoom"] },
+ "container": null,
+ "auto_updates": true,
+ "deprecated": false,
+ "deprecation_date": null,
+ "deprecation_reason": null,
+ "deprecation_replacement": null,
+ "disabled": false,
+ "disable_date": null,
+ "disable_reason": null,
+ "disable_replacement": null,
+ "tap_git_head": "5a68e8e9d92c7283862e60b5dc491cd9fee6466e",
+ "languages": [],
+ "ruby_source_path": "Casks/z/zoom-for-it-admins.rb",
+ "ruby_source_checksum": {
+ "sha256": "6764287e466a382bca4198f19062914d9fec67abc2ed83e9aa24abd0aca34c93"
+ },
+ "variations": {},
+ "analytics": {
+ "install": {
+ "30d": { "zoom-for-it-admins": 116 },
+ "90d": { "zoom-for-it-admins": 393 },
+ "365d": { "zoom-for-it-admins": 1342 }
+ }
+ },
+ "generated_date": "2024-12-03"
+}
diff --git a/server/mdm/maintainedapps/testdata/zoom.json b/server/mdm/maintainedapps/testdata/zoom.json
deleted file mode 100644
index 40e4640a75..0000000000
--- a/server/mdm/maintainedapps/testdata/zoom.json
+++ /dev/null
@@ -1,161 +0,0 @@
-{
- "token": "zoom",
- "full_token": "zoom",
- "old_tokens": [],
- "tap": "homebrew/cask",
- "name": [
- "Zoom"
- ],
- "desc": "Video communication and virtual meeting platform",
- "homepage": "https://www.zoom.us/",
- "url": "https://cdn.zoom.us/prod/6.1.11.39163/arm64/zoomusInstallerFull.pkg",
- "url_specs": {},
- "version": "6.1.11.39163",
- "installed": null,
- "installed_time": null,
- "bundle_version": null,
- "bundle_short_version": null,
- "outdated": false,
- "sha256": "c567828838583df4c026db571b96c2c212eef9b98795c145fecdfe10009ea61e",
- "artifacts": [
- {
- "uninstall": [
- {
- "launchctl": "us.zoom.ZoomDaemon",
- "signal": [
- "KILL",
- "us.zoom.xos"
- ],
- "pkgutil": "us.zoom.pkg.videomeeting",
- "delete": [
- "/Applications/zoom.us.app",
- "/Library/Internet Plug-Ins/ZoomUsPlugIn.plugin",
- "/Library/Logs/DiagnosticReports/zoom.us*",
- "/Library/PrivilegedHelperTools/us.zoom.ZoomDaemon"
- ]
- }
- ]
- },
- {
- "pkg": [
- "zoomusInstallerFull.pkg"
- ]
- },
- {
- "postflight": null
- },
- {
- "zap": [
- {
- "trash": [
- "~/.zoomus",
- "~/Desktop/Zoom",
- "~/Documents/Zoom",
- "~/Library/Application Scripts/*.ZoomClient3rd",
- "~/Library/Application Support/CloudDocs/session/containers/iCloud.us.zoom.videomeetings",
- "~/Library/Application Support/CloudDocs/session/containers/iCloud.us.zoom.videomeetings.plist",
- "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/us.zoom*.sfl*",
- "~/Library/Application Support/CrashReporter/zoom.us*",
- "~/Library/Application Support/zoom.us",
- "~/Library/Caches/us.zoom.xos",
- "~/Library/Cookies/us.zoom.xos.binarycookies",
- "~/Library/Group Containers/*.ZoomClient3rd",
- "~/Library/HTTPStorages/us.zoom.xos",
- "~/Library/HTTPStorages/us.zoom.xos.binarycookies",
- "~/Library/Internet Plug-Ins/ZoomUsPlugIn.plugin",
- "~/Library/Logs/zoom.us",
- "~/Library/Logs/zoominstall.log",
- "~/Library/Logs/ZoomPhone",
- "~/Library/Preferences/us.zoom.airhost.plist",
- "~/Library/Preferences/us.zoom.caphost.plist",
- "~/Library/Preferences/us.zoom.Transcode.plist",
- "~/Library/Preferences/us.zoom.xos.Hotkey.plist",
- "~/Library/Preferences/us.zoom.xos.plist",
- "~/Library/Preferences/us.zoom.ZoomAutoUpdater.plist",
- "~/Library/Preferences/us.zoom.ZoomClips.plist",
- "~/Library/Preferences/ZoomChat.plist",
- "~/Library/Saved Application State/us.zoom.xos.savedState",
- "~/Library/WebKit/us.zoom.xos"
- ]
- }
- ]
- }
- ],
- "caveats": null,
- "depends_on": {},
- "conflicts_with": {
- "cask": [
- "zoom-for-it-admins"
- ]
- },
- "container": null,
- "auto_updates": true,
- "deprecated": false,
- "deprecation_date": null,
- "deprecation_reason": null,
- "disabled": false,
- "disable_date": null,
- "disable_reason": null,
- "tap_git_head": "5e76d542a4e6e78701fdfae86e263074eab2a3e7",
- "languages": [],
- "ruby_source_path": "Casks/z/zoom.rb",
- "ruby_source_checksum": {
- "sha256": "7a76c4fbb2eaf6f2ef87a5756a5b7147cdfd4cee1f8cef275e007e924003fbda"
- },
- "variations": {
- "sequoia": {
- "url": "https://cdn.zoom.us/prod/6.1.11.39163/zoomusInstallerFull.pkg",
- "sha256": "001f905f1eabdeb6b299553bac427d74ee02a8923db67445de5eb5bee1a7aa92"
- },
- "sonoma": {
- "url": "https://cdn.zoom.us/prod/6.1.11.39163/zoomusInstallerFull.pkg",
- "sha256": "001f905f1eabdeb6b299553bac427d74ee02a8923db67445de5eb5bee1a7aa92"
- },
- "ventura": {
- "url": "https://cdn.zoom.us/prod/6.1.11.39163/zoomusInstallerFull.pkg",
- "sha256": "001f905f1eabdeb6b299553bac427d74ee02a8923db67445de5eb5bee1a7aa92"
- },
- "monterey": {
- "url": "https://cdn.zoom.us/prod/6.1.11.39163/zoomusInstallerFull.pkg",
- "sha256": "001f905f1eabdeb6b299553bac427d74ee02a8923db67445de5eb5bee1a7aa92"
- },
- "big_sur": {
- "url": "https://cdn.zoom.us/prod/6.1.11.39163/zoomusInstallerFull.pkg",
- "sha256": "001f905f1eabdeb6b299553bac427d74ee02a8923db67445de5eb5bee1a7aa92"
- },
- "catalina": {
- "url": "https://cdn.zoom.us/prod/6.1.11.39163/zoomusInstallerFull.pkg",
- "sha256": "001f905f1eabdeb6b299553bac427d74ee02a8923db67445de5eb5bee1a7aa92"
- },
- "mojave": {
- "url": "https://cdn.zoom.us/prod/6.1.11.39163/zoomusInstallerFull.pkg",
- "sha256": "001f905f1eabdeb6b299553bac427d74ee02a8923db67445de5eb5bee1a7aa92"
- },
- "high_sierra": {
- "url": "https://cdn.zoom.us/prod/6.1.11.39163/zoomusInstallerFull.pkg",
- "sha256": "001f905f1eabdeb6b299553bac427d74ee02a8923db67445de5eb5bee1a7aa92"
- },
- "sierra": {
- "url": "https://cdn.zoom.us/prod/6.1.11.39163/zoomusInstallerFull.pkg",
- "sha256": "001f905f1eabdeb6b299553bac427d74ee02a8923db67445de5eb5bee1a7aa92"
- },
- "el_capitan": {
- "url": "https://cdn.zoom.us/prod/6.1.11.39163/zoomusInstallerFull.pkg",
- "sha256": "001f905f1eabdeb6b299553bac427d74ee02a8923db67445de5eb5bee1a7aa92"
- }
- },
- "analytics": {
- "install": {
- "30d": {
- "zoom": 5878
- },
- "90d": {
- "zoom": 17578
- },
- "365d": {
- "zoom": 75807
- }
- }
- },
- "generated_date": "2024-09-09"
-}
diff --git a/server/service/appconfig.go b/server/service/appconfig.go
index 030c2c6502..e0ee0317e6 100644
--- a/server/service/appconfig.go
+++ b/server/service/appconfig.go
@@ -337,6 +337,15 @@ func (svc *Service) ModifyAppConfig(ctx context.Context, p []byte, applyOpts fle
return nil, ctxerr.Wrap(ctx, err)
}
+ // if turning off Windows MDM and Windows Migration is not explicitly set to
+ // on in the same update, set it to off (otherwise, if it is explicitly set
+ // to true, return an error that it can't be done when MDM is off, this is
+ // addressed in validateMDM).
+ if oldAppConfig.MDM.WindowsEnabledAndConfigured != appConfig.MDM.WindowsEnabledAndConfigured &&
+ !appConfig.MDM.WindowsEnabledAndConfigured && !newAppConfig.MDM.WindowsMigrationEnabled {
+ appConfig.MDM.WindowsMigrationEnabled = false
+ }
+
type ndesStatusType string
const (
ndesStatusAdded ndesStatusType = "added"
@@ -869,6 +878,18 @@ func (svc *Service) ModifyAppConfig(ctx context.Context, p []byte, applyOpts fle
}
}
+ if appConfig.MDM.WindowsEnabledAndConfigured && oldAppConfig.MDM.WindowsMigrationEnabled != appConfig.MDM.WindowsMigrationEnabled {
+ var act fleet.ActivityDetails
+ if appConfig.MDM.WindowsMigrationEnabled {
+ act = fleet.ActivityTypeEnabledWindowsMDMMigration{}
+ } else {
+ act = fleet.ActivityTypeDisabledWindowsMDMMigration{}
+ }
+ if err := svc.NewActivity(ctx, authz.UserFromContext(ctx), act); err != nil {
+ return nil, ctxerr.Wrapf(ctx, err, "create activity %s", act.ActivityName())
+ }
+ }
+
return obfuscatedAppConfig, nil
}
@@ -958,6 +979,9 @@ func (svc *Service) validateMDM(
if mdm.MacOSSetup.EnableEndUserAuthentication && oldMdm.MacOSSetup.EnableEndUserAuthentication != mdm.MacOSSetup.EnableEndUserAuthentication && !license.IsPremium() {
invalid.Append("macos_setup.enable_end_user_authentication", ErrMissingLicense.Error())
}
+ if mdm.WindowsMigrationEnabled && !license.IsPremium() {
+ invalid.Append("windows_migration_enabled", ErrMissingLicense.Error())
+ }
// we want to use `oldMdm` here as this boolean is set by the fleet
// server at startup and can't be modified by the user
@@ -1133,6 +1157,9 @@ func (svc *Service) validateMDM(
return nil
}
}
+ if !mdm.WindowsEnabledAndConfigured && mdm.WindowsMigrationEnabled {
+ invalid.Append("mdm.windows_migration_enabled", "Couldn't enable Windows MDM migration, Windows MDM is not enabled.")
+ }
return nil
}
diff --git a/server/service/apple_mdm.go b/server/service/apple_mdm.go
index 04ea557deb..56dc433539 100644
--- a/server/service/apple_mdm.go
+++ b/server/service/apple_mdm.go
@@ -51,7 +51,7 @@ import (
"github.com/go-kit/log/level"
"github.com/google/uuid"
"github.com/groob/plist"
- "go.mozilla.org/pkcs7"
+ "github.com/smallstep/pkcs7"
)
const (
@@ -2778,20 +2778,21 @@ func (svc *MDMAppleCheckinAndCommandService) TokenUpdate(r *mdm.Request, m *mdm.
return ctxerr.Wrap(r.Context, err, "cleaning SCEP refs")
}
+ var hasSetupExpItems bool
if m.AwaitingConfiguration {
// Enqueue setup experience items and mark the host as being in setup experience
- _, err := svc.ds.EnqueueSetupExperienceItems(r.Context, r.ID, info.TeamID)
+ hasSetupExpItems, err = svc.ds.EnqueueSetupExperienceItems(r.Context, r.ID, info.TeamID)
if err != nil {
return ctxerr.Wrap(r.Context, err, "queueing setup experience tasks")
}
-
}
return svc.mdmLifecycle.Do(r.Context, mdmlifecycle.HostOptions{
- Action: mdmlifecycle.HostActionTurnOn,
- Platform: info.Platform,
- UUID: r.ID,
- EnrollReference: r.Params[mobileconfig.FleetEnrollReferenceKey],
+ Action: mdmlifecycle.HostActionTurnOn,
+ Platform: info.Platform,
+ UUID: r.ID,
+ EnrollReference: r.Params[mobileconfig.FleetEnrollReferenceKey],
+ HasSetupExperienceItems: hasSetupExpItems,
})
}
@@ -4479,6 +4480,35 @@ func (svc *Service) ListABMTokens(ctx context.Context) ([]*fleet.ABMToken, error
return nil, fleet.ErrMissingLicense
}
+// //////////////////////////////////////////////////////////////////////////////
+// Count ABM tokens endpoint
+// //////////////////////////////////////////////////////////////////////////////
+
+type countABMTokensResponse struct {
+ Err error `json:"error,omitempty"`
+ Count int `json:"count"`
+}
+
+func (r countABMTokensResponse) error() error { return r.Err }
+
+func countABMTokensEndpoint(ctx context.Context, _ interface{}, svc fleet.Service) (errorer, error) {
+ tokenCount, err := svc.CountABMTokens(ctx)
+ if err != nil {
+ return &countABMTokensResponse{Err: err}, nil
+ }
+
+ return &countABMTokensResponse{Count: tokenCount}, nil
+}
+
+func (svc *Service) CountABMTokens(ctx context.Context) (int, error) {
+ // Automatic enrollment (ABM/ADE/DEP) is a feature that requires a license.
+ // skipauth: No authorization check needed due to implementation returning
+ // only license error.
+ svc.authz.SkipAuthorization(ctx)
+
+ return 0, fleet.ErrMissingLicense
+}
+
////////////////////////////////////////////////////////////////////////////////
// Update ABM token teams endpoint
////////////////////////////////////////////////////////////////////////////////
diff --git a/server/service/client.go b/server/service/client.go
index 2a3b1a6c5d..935ca07434 100644
--- a/server/service/client.go
+++ b/server/service/client.go
@@ -1512,6 +1512,11 @@ func (c *Client) DoGitOps(
} else {
mdmAppConfig["windows_enabled_and_configured"] = false
}
+ // Put in default values for windows_migration_enabled
+ mdmAppConfig["windows_migration_enabled"] = config.Controls.WindowsMigrationEnabled
+ if config.Controls.WindowsMigrationEnabled == nil {
+ mdmAppConfig["windows_migration_enabled"] = false
+ }
if windowsEnabledAndConfiguredAssumption, ok := mdmAppConfig["windows_enabled_and_configured"].(bool); ok {
teamAssumptions = &fleet.TeamSpecsDryRunAssumptions{
WindowsEnabledAndConfigured: optjson.SetBool(windowsEnabledAndConfiguredAssumption),
diff --git a/server/service/client_mdm.go b/server/service/client_mdm.go
index c41915b91a..e849eb4b0f 100644
--- a/server/service/client_mdm.go
+++ b/server/service/client_mdm.go
@@ -40,11 +40,11 @@ func (c *Client) GetAppleBM() (*fleet.AppleBM, error) {
return responseBody.AppleBM, err
}
-func (c *Client) ListABMTokens() ([]*fleet.ABMToken, error) {
- verb, path := "GET", "/api/latest/fleet/abm_tokens"
- var responseBody listABMTokensResponse
+func (c *Client) CountABMTokens() (int, error) {
+ verb, path := "GET", "/api/latest/fleet/abm_tokens/count"
+ var responseBody countABMTokensResponse
err := c.authenticatedRequestWithQuery(nil, verb, path, &responseBody, "")
- return responseBody.Tokens, err
+ return responseBody.Count, err
}
// RequestAppleCSR requests a signed CSR from the Fleet server and returns the
diff --git a/server/service/handler.go b/server/service/handler.go
index 9ea8406ad2..74fb012fb8 100644
--- a/server/service/handler.go
+++ b/server/service/handler.go
@@ -731,7 +731,10 @@ func attachFleetAPIRoutes(r *mux.Router, svc fleet.Service, config config.FleetC
mdmAnyMW.POST("/api/_version_/fleet/mdm/profiles", newMDMConfigProfileEndpoint, newMDMConfigProfileRequest{})
mdmAnyMW.POST("/api/_version_/fleet/configuration_profiles", newMDMConfigProfileEndpoint, newMDMConfigProfileRequest{})
+ // Deprecated: POST /hosts/{host_id:[0-9]+}/configuration_profiles/resend/{profile_uuid} is now deprecated, replaced by the
+ // POST /hosts/{host_id:[0-9]+}/configuration_profiles/{profile_uuid}/resend endpoint.
mdmAnyMW.POST("/api/_version_/fleet/hosts/{host_id:[0-9]+}/configuration_profiles/resend/{profile_uuid}", resendHostMDMProfileEndpoint, resendHostMDMProfileRequest{})
+ mdmAnyMW.POST("/api/_version_/fleet/hosts/{host_id:[0-9]+}/configuration_profiles/{profile_uuid}/resend", resendHostMDMProfileEndpoint, resendHostMDMProfileRequest{})
// Deprecated: PATCH /mdm/apple/settings is deprecated, replaced by POST /disk_encryption.
// It was only used to set disk encryption.
@@ -751,6 +754,7 @@ func attachFleetAPIRoutes(r *mux.Router, svc fleet.Service, config config.FleetC
ue.POST("/api/_version_/fleet/abm_tokens", uploadABMTokenEndpoint, uploadABMTokenRequest{})
ue.DELETE("/api/_version_/fleet/abm_tokens/{id:[0-9]+}", deleteABMTokenEndpoint, deleteABMTokenRequest{})
ue.GET("/api/_version_/fleet/abm_tokens", listABMTokensEndpoint, nil)
+ ue.GET("/api/_version_/fleet/abm_tokens/count", countABMTokensEndpoint, nil)
ue.PATCH("/api/_version_/fleet/abm_tokens/{id:[0-9]+}/teams", updateABMTokenTeamsEndpoint, updateABMTokenTeamsRequest{})
ue.PATCH("/api/_version_/fleet/abm_tokens/{id:[0-9]+}/renew", renewABMTokenEndpoint, renewABMTokenRequest{})
diff --git a/server/service/integration_core_test.go b/server/service/integration_core_test.go
index 0dfab1f02f..73171dfb3c 100644
--- a/server/service/integration_core_test.go
+++ b/server/service/integration_core_test.go
@@ -6314,6 +6314,12 @@ func (s *integrationTestSuite) TestPremiumEndpointsWithoutLicense() {
}`), http.StatusUnprocessableEntity)
errMsg = extractServerErrorText(res.Body)
require.Contains(t, errMsg, "missing or invalid license")
+
+ res = s.Do("PATCH", "/api/v1/fleet/config", json.RawMessage(`{
+ "mdm": { "windows_migration_enabled": true }
+ }`), http.StatusUnprocessableEntity)
+ errMsg = extractServerErrorText(res.Body)
+ require.Contains(t, errMsg, "missing or invalid license")
}
func (s *integrationTestSuite) TestScriptsEndpointsWithoutLicense() {
diff --git a/server/service/integration_enterprise_test.go b/server/service/integration_enterprise_test.go
index cdc606230c..74864270d0 100644
--- a/server/service/integration_enterprise_test.go
+++ b/server/service/integration_enterprise_test.go
@@ -15450,3 +15450,13 @@ func (s *integrationEnterpriseTestSuite) TestMaintainedApps() {
require.Equal(t, tpResp.Policy.InstallSoftware.Name, policies[0].InstallSoftware.Name)
require.Equal(t, tpResp.Policy.InstallSoftware.SoftwareTitleID, policies[0].InstallSoftware.SoftwareTitleID)
}
+
+func (s *integrationEnterpriseTestSuite) TestWindowsMigrateMDMNotEnabled() {
+ t := s.T()
+
+ res := s.Do("PATCH", "/api/v1/fleet/config", json.RawMessage(`{
+ "mdm": { "windows_migration_enabled": true }
+ }`), http.StatusUnprocessableEntity)
+ errMsg := extractServerErrorText(res.Body)
+ require.Contains(t, errMsg, "Windows MDM is not enabled")
+}
diff --git a/server/service/integration_mdm_dep_test.go b/server/service/integration_mdm_dep_test.go
index 249dddb185..c63a6a2916 100644
--- a/server/service/integration_mdm_dep_test.go
+++ b/server/service/integration_mdm_dep_test.go
@@ -38,9 +38,9 @@ import (
"github.com/groob/plist"
"github.com/jmoiron/sqlx"
micromdm "github.com/micromdm/micromdm/mdm/mdm"
+ "github.com/smallstep/pkcs7"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
- "go.mozilla.org/pkcs7"
)
type profileAssignmentReq struct {
@@ -121,12 +121,33 @@ func (s *integrationMDMTestSuite) TestDEPEnrollReleaseDeviceGlobal() {
s.enableABM("fleet_ade_test")
+ // add a setup experience script to run for no team
+ extraArgs := make(map[string][]string)
+ body, headers := generateNewScriptMultipartRequest(t,
+ "script.sh", []byte(`echo "hello"`), s.token, extraArgs)
+ s.DoRawWithHeaders("POST", "/api/latest/fleet/setup_experience/script", body.Bytes(), http.StatusOK, headers)
+
+ // test manual and automatic release with the new setup experience flow
+ for _, enableReleaseManually := range []bool{false, true} {
+ t.Run(fmt.Sprintf("enableReleaseManually=%t;new_flow", enableReleaseManually), func(t *testing.T) {
+ s.runDEPEnrollReleaseDeviceTest(t, globalDevice, enableReleaseManually, nil, "I1", false)
+ })
+ }
// test manual and automatic release with the old worker flow
for _, enableReleaseManually := range []bool{false, true} {
- t.Run(fmt.Sprintf("enableReleaseManually=%t", enableReleaseManually), func(t *testing.T) {
+ t.Run(fmt.Sprintf("enableReleaseManually=%t;old_flow", enableReleaseManually), func(t *testing.T) {
s.runDEPEnrollReleaseDeviceTest(t, globalDevice, enableReleaseManually, nil, "I1", true)
})
}
+
+ // remove the setup experience script, run the new setup experience flow when
+ // there is no setup experience item to process (so it is bypassed)
+ s.Do("DELETE", "/api/latest/fleet/setup_experience/script", nil, http.StatusOK)
+ for _, enableReleaseManually := range []bool{false, true} {
+ t.Run(fmt.Sprintf("enableReleaseManually=%t;bypass_flow", enableReleaseManually), func(t *testing.T) {
+ s.runDEPEnrollReleaseDeviceTest(t, globalDevice, enableReleaseManually, nil, "I1", false)
+ })
+ }
}
func (s *integrationMDMTestSuite) TestDEPEnrollReleaseDeviceTeam() {
@@ -211,12 +232,35 @@ func (s *integrationMDMTestSuite) TestDEPEnrollReleaseDeviceTeam() {
// enable FileVault
s.Do("PATCH", "/api/latest/fleet/mdm/apple/settings", json.RawMessage([]byte(fmt.Sprintf(`{"enable_disk_encryption":true,"team_id":%d}`, tm.ID))), http.StatusNoContent)
+ // add a setup experience script to run for this team
+ extraArgs := map[string][]string{
+ "team_id": {fmt.Sprintf("%d", tm.ID)},
+ }
+ body, headers := generateNewScriptMultipartRequest(t,
+ "script.sh", []byte(`echo "hello"`), s.token, extraArgs)
+ s.DoRawWithHeaders("POST", "/api/latest/fleet/setup_experience/script", body.Bytes(), http.StatusOK, headers)
+
+ // test manual and automatic release with the new setup experience flow
+ for _, enableReleaseManually := range []bool{false, true} {
+ t.Run(fmt.Sprintf("enableReleaseManually=%t;new_flow", enableReleaseManually), func(t *testing.T) {
+ s.runDEPEnrollReleaseDeviceTest(t, teamDevice, enableReleaseManually, &tm.ID, "I2", false)
+ })
+ }
// test manual and automatic release with the old worker flow
for _, enableReleaseManually := range []bool{false, true} {
- t.Run(fmt.Sprintf("enableReleaseManually=%t", enableReleaseManually), func(t *testing.T) {
+ t.Run(fmt.Sprintf("enableReleaseManually=%t;old_flow", enableReleaseManually), func(t *testing.T) {
s.runDEPEnrollReleaseDeviceTest(t, teamDevice, enableReleaseManually, &tm.ID, "I2", true)
})
}
+
+ // remove the setup experience script, run the new setup experience flow when
+ // there is no setup experience item to process (so it is bypassed)
+ s.Do("DELETE", "/api/latest/fleet/setup_experience/script", nil, http.StatusOK, "team_id", fmt.Sprint(tm.ID))
+ for _, enableReleaseManually := range []bool{false, true} {
+ t.Run(fmt.Sprintf("enableReleaseManually=%t;bypass_flow", enableReleaseManually), func(t *testing.T) {
+ s.runDEPEnrollReleaseDeviceTest(t, teamDevice, enableReleaseManually, &tm.ID, "I2", false)
+ })
+ }
}
func (s *integrationMDMTestSuite) TestDEPEnrollReleaseIphoneTeam() {
@@ -286,6 +330,11 @@ func (s *integrationMDMTestSuite) TestDEPEnrollReleaseIphoneTeam() {
func (s *integrationMDMTestSuite) runDEPEnrollReleaseDeviceTest(t *testing.T, device godep.Device, enableReleaseManually bool, teamID *uint, customProfileIdent string, useOldFleetdFlow bool) {
ctx := context.Background()
+ var isIphone bool
+ if device.DeviceFamily == "iPhone" {
+ isIphone = true
+ }
+
// set the enable release device manually option
payload := map[string]any{
"enable_release_device_manually": enableReleaseManually,
@@ -359,15 +408,22 @@ func (s *integrationMDMTestSuite) runDEPEnrollReleaseDeviceTest(t *testing.T, de
// enroll the host
depURLToken := loadEnrollmentProfileDEPToken(t, s.ds)
mdmDevice := mdmtest.NewTestMDMClientAppleDEP(s.server.URL, depURLToken)
- var isIphone bool
- if device.DeviceFamily == "iPhone" {
+ if isIphone {
mdmDevice.Model = "iPhone 14,6"
- isIphone = true
}
mdmDevice.SerialNumber = device.SerialNumber
err := mdmDevice.Enroll()
require.NoError(t, err)
+ // check if it has setup experience items or not
+ hasSetupExpItems := true
+ _, err = s.ds.GetHostAwaitingConfiguration(ctx, mdmDevice.UUID)
+ if fleet.IsNotFound(err) {
+ hasSetupExpItems = false
+ } else if err != nil {
+ require.NoError(t, err)
+ }
+
// run the worker to process the DEP enroll request
s.runWorker()
// run the cron to assign configuration profiles
@@ -525,8 +581,13 @@ func (s *integrationMDMTestSuite) runDEPEnrollReleaseDeviceTest(t *testing.T, de
b, err := io.ReadAll(res.Body)
require.NoError(t, err)
require.NoError(t, json.Unmarshal(b, &orbitConfigResp))
- // should be notified of the setup experience flow
- require.False(t, orbitConfigResp.Notifications.RunSetupExperience)
+ if hasSetupExpItems {
+ // should be notified of the setup experience flow
+ require.True(t, orbitConfigResp.Notifications.RunSetupExperience)
+ } else {
+ // should bypass the setup experience flow
+ require.False(t, orbitConfigResp.Notifications.RunSetupExperience)
+ }
if enableReleaseManually {
// get the worker's pending job from the future, there should not be any
@@ -537,7 +598,7 @@ func (s *integrationMDMTestSuite) runDEPEnrollReleaseDeviceTest(t *testing.T, de
return
}
- if useOldFleetdFlow {
+ if useOldFleetdFlow || !hasSetupExpItems {
// there should be a Release Device pending job
pending, err := s.ds.GetQueuedJobs(ctx, 2, time.Now().UTC().Add(time.Minute))
require.NoError(t, err)
@@ -574,6 +635,12 @@ func (s *integrationMDMTestSuite) runDEPEnrollReleaseDeviceTest(t *testing.T, de
require.NoError(t, err)
require.Len(t, pending, 0)
+ // mark the setup experience script as done
+ mysql.ExecAdhocSQL(t, s.ds, func(q sqlx.ExtContext) error {
+ _, err := q.ExecContext(ctx, `UPDATE setup_experience_status_results SET status = 'success' WHERE host_uuid = ?`, mdmDevice.UUID)
+ return err
+ })
+
// call the /status endpoint to automatically release the host
var statusResp getOrbitSetupExperienceStatusResponse
s.DoJSON("POST", "/api/fleet/orbit/setup_experience/status", json.RawMessage(fmt.Sprintf(`{"orbit_node_key": %q}`, *enrolledHost.OrbitNodeKey)), http.StatusOK, &statusResp)
diff --git a/server/service/integration_mdm_profiles_test.go b/server/service/integration_mdm_profiles_test.go
index f1e2794fcf..f9e73e1eee 100644
--- a/server/service/integration_mdm_profiles_test.go
+++ b/server/service/integration_mdm_profiles_test.go
@@ -224,7 +224,7 @@ func (s *integrationMDMTestSuite) TestAppleProfileManagement() {
s.checkMDMProfilesSummaries(t, &tm.ID, fleet.MDMProfilesSummary{Verifying: 1}, nil)
// can't resend profile while verifying
- res := s.DoRaw("POST", fmt.Sprintf("/api/latest/fleet/hosts/%d/configuration_profiles/resend/%s", host.ID, mcUUID), nil, http.StatusConflict)
+ res := s.DoRaw("POST", fmt.Sprintf("/api/latest/fleet/hosts/%d/configuration_profiles/%s/resend", host.ID, mcUUID), nil, http.StatusConflict)
errMsg := extractServerErrorText(res.Body)
require.Contains(t, errMsg, "Couldn’t resend. Configuration profiles with “pending” or “verifying” status can’t be resent.")
@@ -235,7 +235,7 @@ func (s *integrationMDMTestSuite) TestAppleProfileManagement() {
return err
})
s.checkMDMProfilesSummaries(t, &tm.ID, fleet.MDMProfilesSummary{Pending: 1}, nil)
- res = s.DoRaw("POST", fmt.Sprintf("/api/latest/fleet/hosts/%d/configuration_profiles/resend/%s", host.ID, mcUUID), nil, http.StatusConflict)
+ res = s.DoRaw("POST", fmt.Sprintf("/api/latest/fleet/hosts/%d/configuration_profiles/%s/resend", host.ID, mcUUID), nil, http.StatusConflict)
errMsg = extractServerErrorText(res.Body)
require.Contains(t, errMsg, "Couldn’t resend. Configuration profiles with “pending” or “verifying” status can’t be resent.")
@@ -246,7 +246,7 @@ func (s *integrationMDMTestSuite) TestAppleProfileManagement() {
return err
})
s.checkMDMProfilesSummaries(t, &tm.ID, fleet.MDMProfilesSummary{Failed: 1}, nil)
- _ = s.DoRaw("POST", fmt.Sprintf("/api/latest/fleet/hosts/%d/configuration_profiles/resend/%s", host.ID, mcUUID), nil, http.StatusAccepted)
+ _ = s.DoRaw("POST", fmt.Sprintf("/api/latest/fleet/hosts/%d/configuration_profiles/%s/resend", host.ID, mcUUID), nil, http.StatusAccepted)
s.awaitTriggerProfileSchedule(t)
installs, removes = checkNextPayloads(t, mdmDevice, false)
require.Len(t, installs, 1)
@@ -255,7 +255,7 @@ func (s *integrationMDMTestSuite) TestAppleProfileManagement() {
s.checkMDMProfilesSummaries(t, &tm.ID, fleet.MDMProfilesSummary{Verifying: 1}, nil)
// can't resend profile while verifying
- res = s.DoRaw("POST", fmt.Sprintf("/api/latest/fleet/hosts/%d/configuration_profiles/resend/%s", host.ID, mcUUID), nil, http.StatusConflict)
+ res = s.DoRaw("POST", fmt.Sprintf("/api/latest/fleet/hosts/%d/configuration_profiles/%s/resend", host.ID, mcUUID), nil, http.StatusConflict)
errMsg = extractServerErrorText(res.Body)
require.Contains(t, errMsg, "Couldn’t resend. Configuration profiles with “pending” or “verifying” status can’t be resent.")
@@ -265,7 +265,7 @@ func (s *integrationMDMTestSuite) TestAppleProfileManagement() {
_, err := q.ExecContext(context.Background(), stmt, fleet.MDMDeliveryVerified, mcUUID, host.UUID)
return err
})
- _ = s.DoRaw("POST", fmt.Sprintf("/api/latest/fleet/hosts/%d/configuration_profiles/resend/%s", host.ID, mcUUID), nil, http.StatusAccepted)
+ _ = s.DoRaw("POST", fmt.Sprintf("/api/latest/fleet/hosts/%d/configuration_profiles/%s/resend", host.ID, mcUUID), nil, http.StatusAccepted)
s.awaitTriggerProfileSchedule(t)
installs, removes = checkNextPayloads(t, mdmDevice, false)
require.Len(t, installs, 1)
@@ -309,7 +309,7 @@ func (s *integrationMDMTestSuite) TestAppleProfileManagement() {
s.checkMDMProfilesSummaries(t, &tm.ID, fleet.MDMProfilesSummary{Verifying: 1}, nil)
// can't resend declaration while verifying
- res = s.DoRaw("POST", fmt.Sprintf("/api/latest/fleet/hosts/%d/configuration_profiles/resend/%s", host.ID, declUUID), nil, http.StatusConflict)
+ res = s.DoRaw("POST", fmt.Sprintf("/api/latest/fleet/hosts/%d/configuration_profiles/%s/resend", host.ID, declUUID), nil, http.StatusConflict)
errMsg = extractServerErrorText(res.Body)
require.Contains(t, errMsg, "Couldn’t resend. Configuration profiles with “pending” or “verifying” status can’t be resent.")
@@ -319,7 +319,7 @@ func (s *integrationMDMTestSuite) TestAppleProfileManagement() {
_, err := q.ExecContext(context.Background(), stmt, fleet.MDMDeliveryVerified, declUUID, host.UUID)
return err
})
- _ = s.DoRaw("POST", fmt.Sprintf("/api/latest/fleet/hosts/%d/configuration_profiles/resend/%s", host.ID, declUUID), nil, http.StatusAccepted)
+ _ = s.DoRaw("POST", fmt.Sprintf("/api/latest/fleet/hosts/%d/configuration_profiles/%s/resend", host.ID, declUUID), nil, http.StatusAccepted)
checkDDMSync(mdmDevice)
s.checkMDMProfilesSummaries(t, &tm.ID, fleet.MDMProfilesSummary{Verifying: 1}, nil)
s.lastActivityMatches(
@@ -342,18 +342,18 @@ func (s *integrationMDMTestSuite) TestAppleProfileManagement() {
s.checkMDMProfilesSummaries(t, &tm.ID, expectedTeamSummary, &expectedTeamSummary)
// can't resend profile from another team
- res = s.DoRaw("POST", fmt.Sprintf("/api/latest/fleet/hosts/%d/configuration_profiles/resend/%s", host.ID, mcUUID), nil, http.StatusNotFound)
+ res = s.DoRaw("POST", fmt.Sprintf("/api/latest/fleet/hosts/%d/configuration_profiles/%s/resend", host.ID, mcUUID), nil, http.StatusNotFound)
errMsg = extractServerErrorText(res.Body)
require.Contains(t, errMsg, "Unable to match profile to host")
// add a Windows profile, resend not supported when host is macOS
wpUUID := mysql.InsertWindowsProfileForTest(t, s.ds, 0)
- res = s.DoRaw("POST", fmt.Sprintf("/api/latest/fleet/hosts/%d/configuration_profiles/resend/%s", host.ID, wpUUID), nil, http.StatusUnprocessableEntity)
+ res = s.DoRaw("POST", fmt.Sprintf("/api/latest/fleet/hosts/%d/configuration_profiles/%s/resend", host.ID, wpUUID), nil, http.StatusUnprocessableEntity)
errMsg = extractServerErrorText(res.Body)
require.Contains(t, errMsg, "Profile is not compatible with host platform")
// invalid profile UUID prefix should return 404
- res = s.DoRaw("POST", fmt.Sprintf("/api/latest/fleet/hosts/%d/configuration_profiles/resend/%s", host.ID, "z"+uuid.NewString()), nil, http.StatusNotFound)
+ res = s.DoRaw("POST", fmt.Sprintf("/api/latest/fleet/hosts/%d/configuration_profiles/%s/resend", host.ID, "z"+uuid.NewString()), nil, http.StatusNotFound)
errMsg = extractServerErrorText(res.Body)
require.Contains(t, errMsg, "Invalid profile UUID prefix")
@@ -3583,7 +3583,7 @@ func (s *integrationMDMTestSuite) TestWindowsProfileManagement() {
checkHostDetails(t, host, globalProfiles, fleet.MDMDeliveryVerifying)
// can't resend a profile while it is verifying
- res := s.DoRaw("POST", fmt.Sprintf("/api/latest/fleet/hosts/%d/configuration_profiles/resend/%s", host.ID, globalProfiles[0]), nil, http.StatusConflict)
+ res := s.DoRaw("POST", fmt.Sprintf("/api/latest/fleet/hosts/%d/configuration_profiles/%s/resend", host.ID, globalProfiles[0]), nil, http.StatusConflict)
errMsg := extractServerErrorText(res.Body)
require.Contains(t, errMsg, "Couldn’t resend. Configuration profiles with “pending” or “verifying” status can’t be resent.")
@@ -3650,6 +3650,7 @@ func (s *integrationMDMTestSuite) TestWindowsProfileManagement() {
}, nil)
// can resend a profile after it has failed
+ // purposefully using deprecated path for backwards compatibility
_ = s.DoRaw("POST", fmt.Sprintf("/api/latest/fleet/hosts/%d/configuration_profiles/resend/%s", host.ID, globalProfiles[0]), nil,
http.StatusAccepted)
verifyProfiles(mdmDevice, 1, false) // trigger a profile sync, device gets the profile resent
@@ -3683,11 +3684,12 @@ func (s *integrationMDMTestSuite) TestWindowsProfileManagement() {
checkHostDetails(t, host, teamProfiles, fleet.MDMDeliveryVerifying)
// can't resend a profile while it is verifying
- res = s.DoRaw("POST", fmt.Sprintf("/api/latest/fleet/hosts/%d/configuration_profiles/resend/%s", host.ID, teamProfiles[0]), nil, http.StatusConflict)
+ res = s.DoRaw("POST", fmt.Sprintf("/api/latest/fleet/hosts/%d/configuration_profiles/%s/resend", host.ID, teamProfiles[0]), nil, http.StatusConflict)
errMsg = extractServerErrorText(res.Body)
require.Contains(t, errMsg, "Couldn’t resend. Configuration profiles with “pending” or “verifying” status can’t be resent.")
// can't resend a profile from the wrong team
+ // purposefully using deprecated path for backwards compatibility
res = s.DoRaw("POST", fmt.Sprintf("/api/latest/fleet/hosts/%d/configuration_profiles/resend/%s", host.ID, globalProfiles[0]), nil, http.StatusNotFound)
errMsg = extractServerErrorText(res.Body)
require.Contains(t, errMsg, "Unable to match profile to host.")
@@ -3761,7 +3763,7 @@ func (s *integrationMDMTestSuite) TestWindowsProfileManagement() {
}, nil)
// can resend a profile after it has failed
- _ = s.DoRaw("POST", fmt.Sprintf("/api/latest/fleet/hosts/%d/configuration_profiles/resend/%s", host.ID, teamProfiles[0]), nil,
+ _ = s.DoRaw("POST", fmt.Sprintf("/api/latest/fleet/hosts/%d/configuration_profiles/%s/resend", host.ID, teamProfiles[0]), nil,
http.StatusAccepted)
verifyProfiles(mdmDevice, 1, false) // trigger a profile sync, device gets the profile resent
checkHostProfileStatus(t, host.UUID, teamProfiles[0], fleet.MDMDeliveryVerifying) // profile was resent, so back to verifying
@@ -3783,7 +3785,7 @@ func (s *integrationMDMTestSuite) TestWindowsProfileManagement() {
verifyProfiles(mdmDevice, 0, false)
// can't resend a macOS profile to a Windows host
- res = s.DoRaw("POST", fmt.Sprintf("/api/latest/fleet/hosts/%d/configuration_profiles/resend/%s", host.ID, mcUUID), nil, http.StatusUnprocessableEntity)
+ res = s.DoRaw("POST", fmt.Sprintf("/api/latest/fleet/hosts/%d/configuration_profiles/%s/resend", host.ID, mcUUID), nil, http.StatusUnprocessableEntity)
errMsg = extractServerErrorText(res.Body)
require.Contains(t, errMsg, "Profile is not compatible with host platform")
}
diff --git a/server/service/integration_mdm_test.go b/server/service/integration_mdm_test.go
index d8d2f6390d..f480b3de05 100644
--- a/server/service/integration_mdm_test.go
+++ b/server/service/integration_mdm_test.go
@@ -677,6 +677,14 @@ func (s *integrationMDMTestSuite) TearDownTest() {
_, err := tx.ExecContext(ctx, "DELETE FROM vpp_tokens;")
return err
})
+ mysql.ExecAdhocSQL(t, s.ds, func(tx sqlx.ExtContext) error {
+ _, err := tx.ExecContext(ctx, "DELETE FROM setup_experience_status_results;")
+ return err
+ })
+ mysql.ExecAdhocSQL(t, s.ds, func(tx sqlx.ExtContext) error {
+ _, err := tx.ExecContext(ctx, "DELETE FROM setup_experience_scripts;")
+ return err
+ })
}
func (s *integrationMDMTestSuite) mockDEPResponse(orgName string, handler http.Handler) {
@@ -821,6 +829,10 @@ func (s *integrationMDMTestSuite) TestAppleGetAppleMDM() {
require.Equal(t, "Fleet", mdmResp.CommonName)
require.NotZero(t, mdmResp.RenewDate)
+ var countTokensResp countABMTokensResponse
+ s.DoJSON("GET", "/api/latest/fleet/abm_tokens/count", nil, http.StatusOK, &countTokensResp)
+ assert.EqualValues(t, 0, countTokensResp.Count)
+
// set up multiple ABM tokens with different org names
defaultOrgName := "fleet_test"
s.enableABM(defaultOrgName)
@@ -852,6 +864,9 @@ func (s *integrationMDMTestSuite) TestAppleGetAppleMDM() {
require.Equal(t, fleet.TeamNameNoTeam, tok.IOSTeam.Name)
require.Equal(t, fleet.TeamNameNoTeam, tok.IPadOSTeam.Name)
+ s.DoJSON("GET", "/api/latest/fleet/abm_tokens/count", nil, http.StatusOK, &countTokensResp)
+ assert.EqualValues(t, 2, countTokensResp.Count)
+
// create a new team
tm, err := s.ds.NewTeam(context.Background(), &fleet.Team{
Name: t.Name(),
@@ -5926,7 +5941,6 @@ func (s *integrationMDMTestSuite) TestAppConfigWindowsMDM() {
err = s.ds.SaveAppConfig(context.Background(), appConf)
require.NoError(s.T(), err)
- // the feature flag is enabled for the MDM test suite
var acResp appConfigResponse
s.DoJSON("GET", "/api/latest/fleet/config", nil, http.StatusOK, &acResp)
assert.False(t, acResp.MDM.WindowsEnabledAndConfigured)
@@ -5937,47 +5951,66 @@ func (s *integrationMDMTestSuite) TestAppConfigWindowsMDM() {
tm2, err := s.ds.NewTeam(ctx, &fleet.Team{Name: t.Name() + "2"})
require.NoError(t, err)
- // create some hosts - a Windows workstation in each team and no-team,
- // Windows server in no team, Windows workstation enrolled in a 3rd-party in
- // team 2, Windows workstation already enrolled in Fleet in no team, and a
- // macOS host in no team.
- metadataHosts := []struct {
- os string
- suffix string
- isServer bool
- teamID *uint
- enrolledName string
- shouldEnroll bool
- }{
- {"windows", "win-no-team", false, nil, "", true},
- {"windows", "win-team-1", false, &tm1.ID, "", true},
- {"windows", "win-team-2", false, &tm2.ID, "", true},
- {"windows", "win-server", true, nil, "", false}, // is a server
- {"windows", "win-third-party", false, &tm2.ID, fleet.WellKnownMDMSimpleMDM, false}, // is enrolled in 3rd-party
- {"windows", "win-fleet", false, nil, fleet.WellKnownMDMFleet, false}, // is already Fleet-enrolled
- {"darwin", "macos-no-team", false, nil, "", false}, // is not Windows
- }
- hostsBySuffix := make(map[string]*fleet.Host, len(metadataHosts))
- for _, meta := range metadataHosts {
- h := createOrbitEnrolledHost(t, meta.os, meta.suffix, s.ds)
- createDeviceTokenForHost(t, s.ds, h.ID, meta.suffix)
- err := s.ds.SetOrUpdateMDMData(ctx, h.ID, meta.isServer, meta.enrolledName != "", "https://example.com", false, meta.enrolledName, "")
- require.NoError(t, err)
- if meta.teamID != nil {
- err = s.ds.AddHostsToTeam(ctx, meta.teamID, []uint{h.ID})
- require.NoError(t, err)
- }
- hostsBySuffix[meta.suffix] = h
- }
-
// enable Windows MDM
acResp = appConfigResponse{}
s.DoJSON("PATCH", "/api/latest/fleet/config", json.RawMessage(`{
"mdm": { "windows_enabled_and_configured": true }
}`), http.StatusOK, &acResp)
assert.True(t, acResp.MDM.WindowsEnabledAndConfigured)
+ assert.False(t, acResp.MDM.WindowsMigrationEnabled)
s.lastActivityOfTypeMatches(fleet.ActivityTypeEnabledWindowsMDM{}.ActivityName(), `{}`, 0)
+ // create some hosts - a Windows workstation in each team and no-team,
+ // Windows server in no team, Windows workstation enrolled in a 3rd-party in
+ // team 2, Windows workstation already enrolled in Fleet in no team, and a
+ // macOS host in no team.
+ metadataHosts := []struct {
+ os string
+ suffix string
+ isServer bool
+ teamID *uint
+ enrolledName string
+ shouldEnroll bool
+ shouldMigrate bool
+ }{
+ {"windows", "win-no-team", false, nil, "", true, false},
+ {"windows", "win-team-1", false, &tm1.ID, "", true, false},
+ {"windows", "win-team-2", false, &tm2.ID, "", true, false},
+ {"windows", "win-server", true, nil, "", false, false}, // is a server
+ {"windows", "win-third-party", false, &tm2.ID, fleet.WellKnownMDMSimpleMDM, false, true}, // is enrolled in 3rd-party
+ {"windows", "win-fleet", false, nil, fleet.WellKnownMDMFleet, false, false}, // is already Fleet-enrolled
+ {"darwin", "macos-no-team", false, nil, "", false, false}, // is not Windows
+ {"windows", "win-server-third-party", true, nil, fleet.WellKnownMDMSimpleMDM, false, false}, // is enrolled in 3rd-party, but is a server
+ }
+ hostsBySuffix := make(map[string]*fleet.Host, len(metadataHosts))
+ for _, meta := range metadataHosts {
+ var host *fleet.Host
+ if meta.os == "windows" && meta.enrolledName == fleet.WellKnownMDMFleet {
+ // special-case to create a properly MDM-enrolled into Fleet host
+ host = createOrbitEnrolledHost(t, meta.os, meta.suffix, s.ds)
+ mdmDevice := mdmtest.NewTestMDMClientWindowsProgramatic(s.server.URL, *host.OrbitNodeKey)
+ err := mdmDevice.Enroll()
+ require.NoError(t, err)
+ err = s.ds.UpdateMDMWindowsEnrollmentsHostUUID(ctx, host.UUID, mdmDevice.DeviceID)
+ require.NoError(t, err)
+ err = s.ds.SetOrUpdateMDMData(ctx, host.ID, meta.isServer, true, s.server.URL, false, fleet.WellKnownMDMFleet, "")
+ require.NoError(t, err)
+ } else {
+ host = createOrbitEnrolledHost(t, meta.os, meta.suffix, s.ds)
+ createDeviceTokenForHost(t, s.ds, host.ID, meta.suffix)
+
+ serverURL := "https://example.com"
+ err := s.ds.SetOrUpdateMDMData(ctx, host.ID, meta.isServer, meta.enrolledName != "", serverURL, false, meta.enrolledName, "")
+ require.NoError(t, err)
+ }
+
+ if meta.teamID != nil {
+ err = s.ds.AddHostsToTeam(ctx, meta.teamID, []uint{host.ID})
+ require.NoError(t, err)
+ }
+ hostsBySuffix[meta.suffix] = host
+ }
+
// get the orbit config for each host, verify that only the expected ones
// receive the "needs enrollment to Windows MDM" notification.
for _, meta := range metadataHosts {
@@ -5987,6 +6020,7 @@ func (s *integrationMDMTestSuite) TestAppConfigWindowsMDM() {
http.StatusOK, &resp)
require.Equal(t, meta.shouldEnroll, resp.Notifications.NeedsProgrammaticWindowsMDMEnrollment)
require.False(t, resp.Notifications.NeedsProgrammaticWindowsMDMUnenrollment)
+ require.False(t, resp.Notifications.NeedsMDMMigration)
if meta.shouldEnroll {
require.Contains(t, resp.Notifications.WindowsMDMDiscoveryEndpoint, microsoft_mdm.MDE2DiscoveryPath)
} else {
@@ -5994,7 +6028,34 @@ func (s *integrationMDMTestSuite) TestAppConfigWindowsMDM() {
}
}
- // turn on MDM for a host
+ // enable Windows MDM migration
+ acResp = appConfigResponse{}
+ s.DoJSON("PATCH", "/api/latest/fleet/config", json.RawMessage(`{
+ "mdm": { "windows_migration_enabled": true }
+ }`), http.StatusOK, &acResp)
+ assert.True(t, acResp.MDM.WindowsEnabledAndConfigured)
+ assert.True(t, acResp.MDM.WindowsMigrationEnabled)
+ s.lastActivityMatches(fleet.ActivityTypeEnabledWindowsMDMMigration{}.ActivityName(), `{}`, 0)
+
+ // get the orbit config for each host, verify that only the expected ones
+ // receive the "needs enrollment to Windows MDM" and "needs migration" notifications.
+ // They still get enrollment notifications as we have not proceeded with enrollment.
+ for _, meta := range metadataHosts {
+ var resp orbitGetConfigResponse
+ s.DoJSON("POST", "/api/fleet/orbit/config",
+ json.RawMessage(fmt.Sprintf(`{"orbit_node_key": %q}`, *hostsBySuffix[meta.suffix].OrbitNodeKey)),
+ http.StatusOK, &resp)
+ require.Equal(t, meta.shouldEnroll, resp.Notifications.NeedsProgrammaticWindowsMDMEnrollment)
+ require.Equal(t, meta.shouldMigrate, resp.Notifications.NeedsMDMMigration)
+ require.False(t, resp.Notifications.NeedsProgrammaticWindowsMDMUnenrollment)
+ if meta.shouldEnroll {
+ require.Contains(t, resp.Notifications.WindowsMDMDiscoveryEndpoint, microsoft_mdm.MDE2DiscoveryPath)
+ } else {
+ require.Empty(t, resp.Notifications.WindowsMDMDiscoveryEndpoint)
+ }
+ }
+
+ // turn on MDM for another host
orbitHost, _ := createWindowsHostThenEnrollMDM(s.ds, s.server.URL, t)
// disable Microsoft MDM
@@ -6002,9 +6063,10 @@ func (s *integrationMDMTestSuite) TestAppConfigWindowsMDM() {
"mdm": { "windows_enabled_and_configured": false }
}`), http.StatusOK, &acResp)
assert.False(t, acResp.MDM.WindowsEnabledAndConfigured)
+ assert.False(t, acResp.MDM.WindowsMigrationEnabled)
s.lastActivityOfTypeMatches(fleet.ActivityTypeDisabledWindowsMDM{}.ActivityName(), `{}`, 0)
- // get the orbit config for win-no-team should return true for the
+ // get the orbit config for that MDM-enrolled host returns true for the
// unenrollment notification
var resp orbitGetConfigResponse
s.DoJSON("POST", "/api/fleet/orbit/config",
@@ -6012,7 +6074,25 @@ func (s *integrationMDMTestSuite) TestAppConfigWindowsMDM() {
http.StatusOK, &resp)
require.True(t, resp.Notifications.NeedsProgrammaticWindowsMDMUnenrollment)
require.False(t, resp.Notifications.NeedsProgrammaticWindowsMDMEnrollment)
+ require.False(t, resp.Notifications.NeedsMDMMigration)
require.Empty(t, resp.Notifications.WindowsMDMDiscoveryEndpoint)
+
+ // get the orbit config for each host, only the fleet-enrolled ones get the unenrollment,
+ // and none get enrollment/migration (because MDM is now off).
+ for _, meta := range metadataHosts {
+ var resp orbitGetConfigResponse
+ s.DoJSON("POST", "/api/fleet/orbit/config",
+ json.RawMessage(fmt.Sprintf(`{"orbit_node_key": %q}`, *hostsBySuffix[meta.suffix].OrbitNodeKey)),
+ http.StatusOK, &resp)
+ require.False(t, resp.Notifications.NeedsProgrammaticWindowsMDMEnrollment)
+ require.False(t, resp.Notifications.NeedsMDMMigration)
+ if meta.enrolledName == fleet.WellKnownMDMFleet {
+ require.True(t, resp.Notifications.NeedsProgrammaticWindowsMDMUnenrollment)
+ } else {
+ require.False(t, resp.Notifications.NeedsProgrammaticWindowsMDMUnenrollment)
+ }
+ require.Empty(t, resp.Notifications.WindowsMDMDiscoveryEndpoint)
+ }
}
func (s *integrationMDMTestSuite) TestOrbitConfigNudgeSettings() {
@@ -11896,6 +11976,88 @@ func (s *integrationMDMTestSuite) TestSetupExperience() {
require.True(t, awaitingConfig)
}
+func (s *integrationMDMTestSuite) TestWindowsMigrationEnabled() {
+ t := s.T()
+
+ var acResp appConfigResponse
+ s.DoJSON("GET", "/api/latest/fleet/config", nil, http.StatusOK, &acResp)
+ require.True(t, acResp.MDM.WindowsEnabledAndConfigured)
+ require.False(t, acResp.MDM.WindowsMigrationEnabled)
+
+ s.DoJSON("PATCH", "/api/latest/fleet/config", json.RawMessage(`{
+ "mdm": {
+ "windows_migration_enabled": true
+ }
+ }`), http.StatusOK, &acResp)
+ require.True(t, acResp.MDM.WindowsEnabledAndConfigured)
+ require.True(t, acResp.MDM.WindowsMigrationEnabled)
+ s.lastActivityMatches(fleet.ActivityTypeEnabledWindowsMDMMigration{}.ActivityName(), "", 0)
+
+ s.DoJSON("PATCH", "/api/latest/fleet/config", json.RawMessage(`{
+ "mdm": {
+ "windows_migration_enabled": false
+ }
+ }`), http.StatusOK, &acResp)
+ require.True(t, acResp.MDM.WindowsEnabledAndConfigured)
+ require.False(t, acResp.MDM.WindowsMigrationEnabled)
+ s.lastActivityMatches(fleet.ActivityTypeDisabledWindowsMDMMigration{}.ActivityName(), "", 0)
+
+ // set migrations back to true to see if they turn false when turning MDM off
+ s.DoJSON("PATCH", "/api/latest/fleet/config", json.RawMessage(`{
+ "mdm": {
+ "windows_migration_enabled": true
+ }
+ }`), http.StatusOK, &acResp)
+ require.True(t, acResp.MDM.WindowsEnabledAndConfigured)
+ require.True(t, acResp.MDM.WindowsMigrationEnabled)
+ lastEnabledID := s.lastActivityMatches(fleet.ActivityTypeEnabledWindowsMDMMigration{}.ActivityName(), "", 0)
+
+ // not providing any mdm update should leave the current values
+ s.DoJSON("PATCH", "/api/latest/fleet/config", json.RawMessage(`{
+ "mdm": {}
+ }`), http.StatusOK, &acResp)
+ require.True(t, acResp.MDM.WindowsEnabledAndConfigured)
+ require.True(t, acResp.MDM.WindowsMigrationEnabled)
+ // no new activity was created
+ s.lastActivityOfTypeMatches(fleet.ActivityTypeEnabledWindowsMDMMigration{}.ActivityName(), "", lastEnabledID)
+
+ // set to true again does not generate a new activity, was already true
+ s.DoJSON("PATCH", "/api/latest/fleet/config", json.RawMessage(`{
+ "mdm": {
+ "windows_migration_enabled": true
+ }
+ }`), http.StatusOK, &acResp)
+ require.True(t, acResp.MDM.WindowsEnabledAndConfigured)
+ require.True(t, acResp.MDM.WindowsMigrationEnabled)
+ s.lastActivityOfTypeMatches(fleet.ActivityTypeEnabledWindowsMDMMigration{}.ActivityName(), "", lastEnabledID)
+
+ res := s.Do("PATCH", "/api/latest/fleet/config", json.RawMessage(`{
+ "mdm": {
+ "windows_enabled_and_configured": false,
+ "windows_migration_enabled": true
+ }
+ }`), http.StatusUnprocessableEntity)
+ errMsg := extractServerErrorText(res.Body)
+ require.Contains(t, errMsg, "Windows MDM is not enabled")
+
+ // turn off Windows MDM and try to enable migrations in a distinct call
+ s.DoJSON("PATCH", "/api/latest/fleet/config", json.RawMessage(`{
+ "mdm": {
+ "windows_enabled_and_configured": false
+ }
+ }`), http.StatusOK, &acResp)
+ require.False(t, acResp.MDM.WindowsEnabledAndConfigured)
+ require.False(t, acResp.MDM.WindowsMigrationEnabled)
+
+ res = s.Do("PATCH", "/api/latest/fleet/config", json.RawMessage(`{
+ "mdm": {
+ "windows_migration_enabled": true
+ }
+ }`), http.StatusUnprocessableEntity)
+ errMsg = extractServerErrorText(res.Body)
+ require.Contains(t, errMsg, "Windows MDM is not enabled")
+}
+
func (s *integrationMDMTestSuite) TestHostsCantTurnMDMOff() {
t := s.T()
iOSHost, _ := s.createAppleMobileHostThenEnrollMDM("ios")
diff --git a/server/service/microsoft_mdm.go b/server/service/microsoft_mdm.go
index 78fde975ff..4d79d45ce8 100644
--- a/server/service/microsoft_mdm.go
+++ b/server/service/microsoft_mdm.go
@@ -615,14 +615,22 @@ func NewCertStoreProvisioningData(enrollmentType string, identityFingerprint str
return certStore
}
-// IsEligibleForWindowsMDMEnrollment returns true if the host can be enrolled
+// isEligibleForWindowsMDMEnrollment returns true if the host can be enrolled
// in Fleet's Windows MDM (if it was enabled).
-func IsEligibleForWindowsMDMEnrollment(host *fleet.Host, mdmInfo *fleet.HostMDM) bool {
+func isEligibleForWindowsMDMEnrollment(host *fleet.Host, mdmInfo *fleet.HostMDM) bool {
return host.FleetPlatform() == "windows" &&
host.IsOsqueryEnrolled() &&
(mdmInfo == nil || (!mdmInfo.IsServer && !mdmInfo.Enrolled))
}
+// isEligibleForWindowsMDMMigration returns true if the host can be migrated to
+// Fleet's Windows MDM (if it was enabled).
+func isEligibleForWindowsMDMMigration(host *fleet.Host, mdmInfo *fleet.HostMDM) bool {
+ return host.FleetPlatform() == "windows" &&
+ host.IsOsqueryEnrolled() &&
+ (mdmInfo != nil && !mdmInfo.IsServer && mdmInfo.Enrolled && mdmInfo.Name != fleet.WellKnownMDMFleet)
+}
+
// NewApplicationProvisioningData returns a new ApplicationProvisioningData Characteristic
// The Application Provisioning configuration is used for bootstrapping a device with an OMA DM account
// The paramenters here maps to the W7 application CSP
@@ -976,7 +984,7 @@ func (svc *Service) authBinarySecurityToken(ctx context.Context, authToken *flee
}
// This ensures that only hosts that are eligible for Windows enrollment can be enrolled
- if !IsEligibleForWindowsMDMEnrollment(host, mdmInfo) {
+ if !isEligibleForWindowsMDMEnrollment(host, mdmInfo) {
return "", "", errors.New("host is not elegible for Windows MDM enrollment")
}
diff --git a/server/service/orbit.go b/server/service/orbit.go
index df75ce21c5..79771afdda 100644
--- a/server/service/orbit.go
+++ b/server/service/orbit.go
@@ -249,15 +249,13 @@ func (svc *Service) GetOrbitConfig(ctx context.Context) (fleet.OrbitConfig, erro
notifs.RunSetupExperience = true
}
- if inSetupAssistant || fleet.IsNotFound(err) {
- // If the client is running a fleetd that doesn't support setup experience, or if no
- // software/script has been configured for setup experience, then we should fall back to
- // the "old way" of releasing the device. We do an additional check for
- // !inSetupAssistant to prevent enqueuing a new job every time the /config
- // endpoint is hit.
+ if inSetupAssistant {
+ // If the client is running a fleetd that doesn't support setup
+ // experience, then we should fall back to the "old way" of releasing
+ // the device.
mp, ok := capabilities.FromContext(ctx)
- if !ok || !mp.Has(fleet.CapabilitySetupExperience) || !inSetupAssistant {
- level.Debug(svc.logger).Log("msg", "host doesn't support setup experience or no setup experience configured, falling back to worker-based device release", "host_uuid", host.UUID)
+ if !ok || !mp.Has(fleet.CapabilitySetupExperience) {
+ level.Debug(svc.logger).Log("msg", "host doesn't support setup experience, falling back to worker-based device release", "host_uuid", host.UUID)
if err := svc.processReleaseDeviceForOldFleetd(ctx, host); err != nil {
return fleet.OrbitConfig{}, err
}
@@ -268,13 +266,26 @@ func (svc *Service) GetOrbitConfig(ctx context.Context) (fleet.OrbitConfig, erro
// set the host's orbit notifications for Windows MDM
if appConfig.MDM.WindowsEnabledAndConfigured {
- if IsEligibleForWindowsMDMEnrollment(host, mdmInfo) {
+ if isEligibleForWindowsMDMEnrollment(host, mdmInfo) {
discoURL, err := microsoft_mdm.ResolveWindowsMDMDiscovery(appConfig.ServerSettings.ServerURL)
if err != nil {
return fleet.OrbitConfig{}, err
}
notifs.WindowsMDMDiscoveryEndpoint = discoURL
notifs.NeedsProgrammaticWindowsMDMEnrollment = true
+ } else if appConfig.MDM.WindowsMigrationEnabled && isEligibleForWindowsMDMMigration(host, mdmInfo) {
+ notifs.NeedsMDMMigration = true
+
+ // Set the host to refetch the "critical queries" quickly for some time,
+ // to improve ingestion time of the unenroll and make the host eligible to
+ // enroll into Fleet faster.
+ if host.RefetchCriticalQueriesUntil == nil {
+ refetchUntil := svc.clock.Now().Add(fleet.RefetchMDMUnenrollCriticalQueryDuration)
+ host.RefetchCriticalQueriesUntil = &refetchUntil
+ if err := svc.ds.UpdateHostRefetchCriticalQueriesUntil(ctx, host.ID, &refetchUntil); err != nil {
+ return fleet.OrbitConfig{}, err
+ }
+ }
}
}
if !appConfig.MDM.WindowsEnabledAndConfigured {
@@ -521,7 +532,7 @@ func (svc *Service) processReleaseDeviceForOldFleetd(ctx context.Context, host *
// Enroll reference arg is not used in the release device task, passing empty string.
if err := worker.QueueAppleMDMJob(ctx, svc.ds, svc.logger, worker.AppleMDMPostDEPReleaseDeviceTask,
- host.UUID, host.Platform, host.TeamID, "", bootstrapCmdUUID, acctConfigCmdUUID); err != nil {
+ host.UUID, host.Platform, host.TeamID, "", false, bootstrapCmdUUID, acctConfigCmdUUID); err != nil {
return ctxerr.Wrap(ctx, err, "queue Apple Post-DEP release device job")
}
}
diff --git a/server/service/osquery.go b/server/service/osquery.go
index 21555df372..ce88aa6250 100644
--- a/server/service/osquery.go
+++ b/server/service/osquery.go
@@ -691,7 +691,8 @@ const alwaysTrueQuery = "SELECT 1"
// list of detail queries that are returned when only the critical queries
// should be returned (due to RefetchCriticalQueriesUntil timestamp being set).
var criticalDetailQueries = map[string]bool{
- "mdm": true,
+ "mdm": true,
+ "mdm_windows": true,
}
// detailQueriesForHost returns the map of detail+additional queries that should be executed by
diff --git a/server/service/osquery_test.go b/server/service/osquery_test.go
index 5be2974a12..d0f37e1e90 100644
--- a/server/service/osquery_test.go
+++ b/server/service/osquery_test.go
@@ -179,7 +179,7 @@ func TestGetClientConfig(t *testing.T) {
// Check scheduled queries are loaded properly
conf, err = svc.GetClientConfig(ctx3)
require.NoError(t, err)
- assert.JSONEq(t, `{
+ assert.JSONEq(t, `{
"pack_by_label": {
"queries":{
"time":{"query":"select * from time","interval":30,"removed":false}
@@ -208,7 +208,7 @@ func TestGetClientConfig(t *testing.T) {
"version": ""
}
}
- }
+ }
}`,
string(conf["packs"].(json.RawMessage)),
)
@@ -1165,8 +1165,12 @@ func TestHostDetailQueries(t *testing.T) {
host.RefetchCriticalQueriesUntil = ptr.Time(mockClock.Now().Add(1 * time.Minute))
queries, discovery, err = svc.detailQueriesForHost(ctx, &host)
require.NoError(t, err)
- require.Equal(t, len(criticalDetailQueries), len(queries), distQueriesMapKeys(queries))
+ // host is darwin so it gets only the darwin critical query
+ require.Equal(t, 1, len(queries), distQueriesMapKeys(queries))
for name := range criticalDetailQueries {
+ if strings.HasSuffix(name, "_windows") {
+ continue
+ }
assert.Contains(t, queries, hostDetailQueryPrefix+name)
}
verifyDiscovery(t, queries, discovery)
diff --git a/server/service/osquery_utils/queries.go b/server/service/osquery_utils/queries.go
index da62dfef17..8f7600c16c 100644
--- a/server/service/osquery_utils/queries.go
+++ b/server/service/osquery_utils/queries.go
@@ -1885,6 +1885,11 @@ func directIngestMDMWindows(ctx context.Context, logger log.Logger, host *fleet.
return nil
}
+ if host.RefetchCriticalQueriesUntil != nil {
+ level.Debug(logger).Log("msg", "ingesting Windows mdm data during refetch critical queries window", "host_id", host.ID,
+ "data", fmt.Sprintf("%+v", rows))
+ }
+
data := rows[0]
var enrolled bool
var automatic bool
@@ -1900,13 +1905,20 @@ func directIngestMDMWindows(ctx context.Context, logger log.Logger, host *fleet.
}
isServer := strings.Contains(strings.ToLower(data["installation_type"]), "server")
+ mdmSolutionName := deduceMDMNameWindows(data)
+ if !enrolled && mdmSolutionName != fleet.WellKnownMDMFleet && host.RefetchCriticalQueriesUntil != nil {
+ // the host was unenrolled from a non-Fleet MDM solution, and the refetch
+ // critical queries timestamp was set, so clear it.
+ host.RefetchCriticalQueriesUntil = nil
+ }
+
return ds.SetOrUpdateMDMData(ctx,
host.ID,
isServer,
enrolled,
serverURL,
automatic,
- deduceMDMNameWindows(data),
+ mdmSolutionName,
"",
)
}
diff --git a/server/vulnerabilities/nvd/cpe_test.go b/server/vulnerabilities/nvd/cpe_test.go
index 386234d8ac..0628f95d67 100644
--- a/server/vulnerabilities/nvd/cpe_test.go
+++ b/server/vulnerabilities/nvd/cpe_test.go
@@ -1663,6 +1663,24 @@ func TestCPEFromSoftwareIntegration(t *testing.T) {
},
cpe: "cpe:2.3:a:oracle:virtualbox:7.0.12:*:*:*:*:macos:*:*",
},
+ {
+ software: fleet.Software{
+ Name: "gh",
+ Source: "deb_packages",
+ Version: "2.61.0",
+ Vendor: "",
+ BundleIdentifier: "",
+ }, cpe: "cpe:2.3:a:github:cli:2.61.0:*:*:*:*:*:*:*",
+ },
+ {
+ software: fleet.Software{
+ Name: "gh",
+ Source: "homebrew_packages",
+ Version: "2.61.0",
+ Vendor: "",
+ BundleIdentifier: "",
+ }, cpe: "cpe:2.3:a:github:cli:2.61.0:*:*:*:*:macos:*:*",
+ },
}
// NVD_TEST_CPEDB_PATH can be used to speed up development (sync cpe.sqlite only once).
diff --git a/server/vulnerabilities/nvd/cpe_translations.json b/server/vulnerabilities/nvd/cpe_translations.json
index ec03b2e26c..59518162bd 100644
--- a/server/vulnerabilities/nvd/cpe_translations.json
+++ b/server/vulnerabilities/nvd/cpe_translations.json
@@ -426,5 +426,14 @@
"product": ["virtualbox"],
"vendor": ["oracle"]
}
+ },
+ {
+ "software": {
+ "name": ["gh"]
+ },
+ "filter": {
+ "product": ["cli"],
+ "vendor": ["github"]
+ }
}
]
\ No newline at end of file
diff --git a/server/vulnerabilities/nvd/cve_test.go b/server/vulnerabilities/nvd/cve_test.go
index 2b2d796198..1169b93b96 100644
--- a/server/vulnerabilities/nvd/cve_test.go
+++ b/server/vulnerabilities/nvd/cve_test.go
@@ -343,12 +343,14 @@ func TestTranslateCPEToCVE(t *testing.T) {
excludedCVEs: []string{"CVE-2024-4030"},
continuesToUpdate: true,
},
- "cpe:2.3:a:python:python:3.9.6:*:*:*:*:windows:*:*": {
- includedCVEs: []cve{
- {ID: "CVE-2024-4030", resolvedInVersion: "3.9.20"},
- },
- continuesToUpdate: true,
- },
+ // Skipping test while troubleshooting https://github.com/fleetdm/fleet/issues/24286
+ //
+ // "cpe:2.3:a:python:python:3.9.6:*:*:*:*:windows:*:*": {
+ // includedCVEs: []cve{
+ // {ID: "CVE-2024-4030", resolvedInVersion: "3.9.20"},
+ // },
+ // continuesToUpdate: true,
+ // },
// Tests the expandCPEAliases rule for virtualbox on macOS
"cpe:2.3:a:oracle:virtualbox:7.0.6:*:*:*:*:macos:*:*": {
includedCVEs: []cve{
diff --git a/server/worker/apple_mdm.go b/server/worker/apple_mdm.go
index 01ac59ea79..235a3a7333 100644
--- a/server/worker/apple_mdm.go
+++ b/server/worker/apple_mdm.go
@@ -50,12 +50,13 @@ func (a *AppleMDM) Name() string {
// appleMDMArgs is the payload for the Apple MDM job.
type appleMDMArgs struct {
- Task AppleMDMTask `json:"task"`
- HostUUID string `json:"host_uuid"`
- TeamID *uint `json:"team_id,omitempty"`
- EnrollReference string `json:"enroll_reference,omitempty"`
- EnrollmentCommands []string `json:"enrollment_commands,omitempty"`
- Platform string `json:"platform,omitempty"`
+ Task AppleMDMTask `json:"task"`
+ HostUUID string `json:"host_uuid"`
+ TeamID *uint `json:"team_id,omitempty"`
+ EnrollReference string `json:"enroll_reference,omitempty"`
+ EnrollmentCommands []string `json:"enrollment_commands,omitempty"`
+ Platform string `json:"platform,omitempty"`
+ UseWorkerDeviceRelease bool `json:"use_worker_device_release,omitempty"`
}
// Run executes the apple_mdm job.
@@ -163,9 +164,10 @@ func (a *AppleMDM) runPostDEPEnrollment(ctx context.Context, args appleMDMArgs)
}
}
- // proceed to release the device only if it is not a macos, as those are
- // released via the setup experience flow.
- if !isMacOS(args.Platform) {
+ // proceed to release the device if it is not a macos, as those are released
+ // via the setup experience flow, or if we were told to use the worker based
+ // release.
+ if !isMacOS(args.Platform) || args.UseWorkerDeviceRelease {
var manualRelease bool
if args.TeamID == nil {
ac, err := a.Datastore.AppConfig(ctx)
@@ -187,7 +189,7 @@ func (a *AppleMDM) runPostDEPEnrollment(ctx context.Context, args appleMDMArgs)
// be final and same for MDM profiles of that host; it means the DEP
// enrollment process is done and the device can be released.
if err := QueueAppleMDMJob(ctx, a.Datastore, a.Log, AppleMDMPostDEPReleaseDeviceTask,
- args.HostUUID, args.Platform, args.TeamID, args.EnrollReference, awaitCmdUUIDs...); err != nil {
+ args.HostUUID, args.Platform, args.TeamID, args.EnrollReference, false, awaitCmdUUIDs...); err != nil {
return ctxerr.Wrap(ctx, err, "queue Apple Post-DEP release device job")
}
}
@@ -198,10 +200,11 @@ func (a *AppleMDM) runPostDEPEnrollment(ctx context.Context, args appleMDMArgs)
// This job is deprecated for macos because releasing devices is now done via
// the orbit endpoint /setup_experience/status that is polled by a swift dialog
-// UI window during the setup process, and automatically releases the device
-// once all pending setup tasks are done. However, it must remain implemented
-// for iOS and iPadOS and in case there are such jobs to process after a Fleet
-// migration to a new version.
+// UI window during the setup process (unless there are no setup experience
+// items, in which case this worker job is used), and automatically releases
+// the device once all pending setup tasks are done. However, it must remain
+// implemented for iOS and iPadOS and in case there are such jobs to process
+// after a Fleet migration to a new version.
func (a *AppleMDM) runPostDEPReleaseDevice(ctx context.Context, args appleMDMArgs) error {
// Edge cases:
// - if the device goes offline for a long time, should we go ahead and
@@ -355,6 +358,7 @@ func QueueAppleMDMJob(
platform string,
teamID *uint,
enrollReference string,
+ useWorkerDeviceRelease bool,
enrollmentCommandUUIDs ...string,
) error {
attrs := []interface{}{
@@ -373,12 +377,13 @@ func QueueAppleMDMJob(
level.Info(logger).Log(attrs...)
args := &appleMDMArgs{
- Task: task,
- HostUUID: hostUUID,
- TeamID: teamID,
- EnrollReference: enrollReference,
- EnrollmentCommands: enrollmentCommandUUIDs,
- Platform: platform,
+ Task: task,
+ HostUUID: hostUUID,
+ TeamID: teamID,
+ EnrollReference: enrollReference,
+ EnrollmentCommands: enrollmentCommandUUIDs,
+ Platform: platform,
+ UseWorkerDeviceRelease: useWorkerDeviceRelease,
}
// the release device task is always added with a delay
diff --git a/server/worker/apple_mdm_test.go b/server/worker/apple_mdm_test.go
index 8b497379ab..f27aa32bf1 100644
--- a/server/worker/apple_mdm_test.go
+++ b/server/worker/apple_mdm_test.go
@@ -141,7 +141,7 @@ func TestAppleMDM(t *testing.T) {
// create a host and enqueue the job
h := createEnrolledHost(t, 1, nil, true)
- err := QueueAppleMDMJob(ctx, ds, nopLog, AppleMDMPostDEPEnrollmentTask, h.UUID, "darwin", nil, "")
+ err := QueueAppleMDMJob(ctx, ds, nopLog, AppleMDMPostDEPEnrollmentTask, h.UUID, "darwin", nil, "", false)
require.NoError(t, err)
// run the worker, should mark the job as done
@@ -171,7 +171,7 @@ func TestAppleMDM(t *testing.T) {
// create a host and enqueue the job
h := createEnrolledHost(t, 1, nil, true)
- err := QueueAppleMDMJob(ctx, ds, nopLog, AppleMDMTask("no-such-task"), h.UUID, "darwin", nil, "")
+ err := QueueAppleMDMJob(ctx, ds, nopLog, AppleMDMTask("no-such-task"), h.UUID, "darwin", nil, "", false)
require.NoError(t, err)
// run the worker, should mark the job as failed
@@ -204,7 +204,7 @@ func TestAppleMDM(t *testing.T) {
w.Register(mdmWorker)
// use "" instead of "darwin" as platform to test a queued job after the upgrade to iOS/iPadOS support.
- err := QueueAppleMDMJob(ctx, ds, nopLog, AppleMDMPostDEPEnrollmentTask, h.UUID, "", nil, "")
+ err := QueueAppleMDMJob(ctx, ds, nopLog, AppleMDMPostDEPEnrollmentTask, h.UUID, "", nil, "", false)
require.NoError(t, err)
// run the worker, should succeed
@@ -239,7 +239,7 @@ func TestAppleMDM(t *testing.T) {
w := NewWorker(ds, nopLog)
w.Register(mdmWorker)
- err = QueueAppleMDMJob(ctx, ds, nopLog, AppleMDMPostDEPEnrollmentTask, h.UUID, "darwin", nil, "")
+ err = QueueAppleMDMJob(ctx, ds, nopLog, AppleMDMPostDEPEnrollmentTask, h.UUID, "darwin", nil, "", false)
require.NoError(t, err)
// run the worker, should succeed
@@ -281,7 +281,7 @@ func TestAppleMDM(t *testing.T) {
w := NewWorker(ds, nopLog)
w.Register(mdmWorker)
- err = QueueAppleMDMJob(ctx, ds, nopLog, AppleMDMPostDEPEnrollmentTask, h.UUID, "darwin", nil, "")
+ err = QueueAppleMDMJob(ctx, ds, nopLog, AppleMDMPostDEPEnrollmentTask, h.UUID, "darwin", nil, "", false)
require.NoError(t, err)
// run the worker, should succeed
@@ -330,7 +330,7 @@ func TestAppleMDM(t *testing.T) {
w := NewWorker(ds, nopLog)
w.Register(mdmWorker)
- err = QueueAppleMDMJob(ctx, ds, nopLog, AppleMDMPostDEPEnrollmentTask, h.UUID, "darwin", &tm.ID, "")
+ err = QueueAppleMDMJob(ctx, ds, nopLog, AppleMDMPostDEPEnrollmentTask, h.UUID, "darwin", &tm.ID, "", false)
require.NoError(t, err)
// run the worker, should succeed
@@ -380,7 +380,7 @@ func TestAppleMDM(t *testing.T) {
w := NewWorker(ds, nopLog)
w.Register(mdmWorker)
- err = QueueAppleMDMJob(ctx, ds, nopLog, AppleMDMPostDEPEnrollmentTask, h.UUID, "darwin", &tm.ID, "")
+ err = QueueAppleMDMJob(ctx, ds, nopLog, AppleMDMPostDEPEnrollmentTask, h.UUID, "darwin", &tm.ID, "", false)
require.NoError(t, err)
// run the worker, should succeed
@@ -418,7 +418,7 @@ func TestAppleMDM(t *testing.T) {
w := NewWorker(ds, nopLog)
w.Register(mdmWorker)
- err := QueueAppleMDMJob(ctx, ds, nopLog, AppleMDMPostDEPEnrollmentTask, h.UUID, "darwin", nil, "abcd")
+ err := QueueAppleMDMJob(ctx, ds, nopLog, AppleMDMPostDEPEnrollmentTask, h.UUID, "darwin", nil, "abcd", false)
require.NoError(t, err)
// run the worker, should succeed
@@ -461,7 +461,7 @@ func TestAppleMDM(t *testing.T) {
w := NewWorker(ds, nopLog)
w.Register(mdmWorker)
- err = QueueAppleMDMJob(ctx, ds, nopLog, AppleMDMPostDEPEnrollmentTask, h.UUID, "darwin", nil, idpAcc.UUID)
+ err = QueueAppleMDMJob(ctx, ds, nopLog, AppleMDMPostDEPEnrollmentTask, h.UUID, "darwin", nil, idpAcc.UUID, false)
require.NoError(t, err)
// run the worker, should succeed
@@ -514,7 +514,7 @@ func TestAppleMDM(t *testing.T) {
w := NewWorker(ds, nopLog)
w.Register(mdmWorker)
- err = QueueAppleMDMJob(ctx, ds, nopLog, AppleMDMPostDEPEnrollmentTask, h.UUID, "darwin", &tm.ID, idpAcc.UUID)
+ err = QueueAppleMDMJob(ctx, ds, nopLog, AppleMDMPostDEPEnrollmentTask, h.UUID, "darwin", &tm.ID, idpAcc.UUID, false)
require.NoError(t, err)
// run the worker, should succeed
@@ -548,7 +548,7 @@ func TestAppleMDM(t *testing.T) {
w := NewWorker(ds, nopLog)
w.Register(mdmWorker)
- err := QueueAppleMDMJob(ctx, ds, nopLog, AppleMDMPostManualEnrollmentTask, h.UUID, "darwin", nil, "")
+ err := QueueAppleMDMJob(ctx, ds, nopLog, AppleMDMPostManualEnrollmentTask, h.UUID, "darwin", nil, "", false)
require.NoError(t, err)
// run the worker, should succeed
@@ -564,4 +564,40 @@ func TestAppleMDM(t *testing.T) {
require.Empty(t, jobs)
require.ElementsMatch(t, []string{"InstallEnterpriseApplication"}, getEnqueuedCommandTypes(t))
})
+
+ t.Run("use worker for automatic release", func(t *testing.T) {
+ mysql.SetTestABMAssets(t, ds, testOrgName)
+ defer mysql.TruncateTables(t, ds)
+
+ h := createEnrolledHost(t, 1, nil, true)
+
+ mdmWorker := &AppleMDM{
+ Datastore: ds,
+ Log: nopLog,
+ Commander: apple_mdm.NewMDMAppleCommander(mdmStorage, mockPusher{}),
+ }
+ w := NewWorker(ds, nopLog)
+ w.Register(mdmWorker)
+
+ err := QueueAppleMDMJob(ctx, ds, nopLog, AppleMDMPostDEPEnrollmentTask, h.UUID, "darwin", nil, "", true)
+ require.NoError(t, err)
+
+ // run the worker, should succeed
+ err = w.ProcessJobs(ctx)
+ require.NoError(t, err)
+
+ // ensure the job's not_before allows it to be returned if it were to run
+ // again
+ time.Sleep(time.Second)
+
+ require.ElementsMatch(t, []string{"InstallEnterpriseApplication"}, getEnqueuedCommandTypes(t))
+
+ // the release device job got enqueued
+ jobs, err := ds.GetQueuedJobs(ctx, 1, time.Now().Add(time.Minute)) // release job is always added with a delay
+ require.NoError(t, err)
+ require.Len(t, jobs, 1)
+ require.Equal(t, fleet.JobStateQueued, jobs[0].State)
+ require.Equal(t, appleMDMJobName, jobs[0].Name)
+ require.Contains(t, string(*jobs[0].Args), AppleMDMPostDEPReleaseDeviceTask)
+ })
}
diff --git a/terraform/addons/vuln-processing/variables.tf b/terraform/addons/vuln-processing/variables.tf
index b372a36ff8..bdf2ae161c 100644
--- a/terraform/addons/vuln-processing/variables.tf
+++ b/terraform/addons/vuln-processing/variables.tf
@@ -24,7 +24,7 @@ variable "fleet_config" {
vuln_processing_cpu = optional(number, 2048)
vuln_data_stream_mem = optional(number, 1024)
vuln_data_stream_cpu = optional(number, 512)
- image = optional(string, "fleetdm/fleet:v4.59.1")
+ image = optional(string, "fleetdm/fleet:v4.60.0")
family = optional(string, "fleet-vuln-processing")
sidecars = optional(list(any), [])
extra_environment_variables = optional(map(string), {})
@@ -82,7 +82,7 @@ variable "fleet_config" {
vuln_processing_cpu = 2048
vuln_data_stream_mem = 1024
vuln_data_stream_cpu = 512
- image = "fleetdm/fleet:v4.59.1"
+ image = "fleetdm/fleet:v4.60.0"
family = "fleet-vuln-processing"
sidecars = []
extra_environment_variables = {}
diff --git a/terraform/byo-vpc/byo-db/byo-ecs/variables.tf b/terraform/byo-vpc/byo-db/byo-ecs/variables.tf
index 580e94cbf5..2ffd63d25a 100644
--- a/terraform/byo-vpc/byo-db/byo-ecs/variables.tf
+++ b/terraform/byo-vpc/byo-db/byo-ecs/variables.tf
@@ -16,7 +16,7 @@ variable "fleet_config" {
mem = optional(number, 4096)
cpu = optional(number, 512)
pid_mode = optional(string, null)
- image = optional(string, "fleetdm/fleet:v4.59.1")
+ image = optional(string, "fleetdm/fleet:v4.60.0")
family = optional(string, "fleet")
sidecars = optional(list(any), [])
depends_on = optional(list(any), [])
@@ -119,7 +119,7 @@ variable "fleet_config" {
mem = 512
cpu = 256
pid_mode = null
- image = "fleetdm/fleet:v4.59.1"
+ image = "fleetdm/fleet:v4.60.0"
family = "fleet"
sidecars = []
depends_on = []
diff --git a/terraform/byo-vpc/byo-db/variables.tf b/terraform/byo-vpc/byo-db/variables.tf
index 16c7d7a1e9..4259c64f02 100644
--- a/terraform/byo-vpc/byo-db/variables.tf
+++ b/terraform/byo-vpc/byo-db/variables.tf
@@ -77,7 +77,7 @@ variable "fleet_config" {
mem = optional(number, 4096)
cpu = optional(number, 512)
pid_mode = optional(string, null)
- image = optional(string, "fleetdm/fleet:v4.59.1")
+ image = optional(string, "fleetdm/fleet:v4.60.0")
family = optional(string, "fleet")
sidecars = optional(list(any), [])
depends_on = optional(list(any), [])
@@ -205,7 +205,7 @@ variable "fleet_config" {
mem = 512
cpu = 256
pid_mode = null
- image = "fleetdm/fleet:v4.59.1"
+ image = "fleetdm/fleet:v4.60.0"
family = "fleet"
sidecars = []
depends_on = []
diff --git a/terraform/byo-vpc/example/main.tf b/terraform/byo-vpc/example/main.tf
index 855ab59f9f..bca3bd652c 100644
--- a/terraform/byo-vpc/example/main.tf
+++ b/terraform/byo-vpc/example/main.tf
@@ -17,7 +17,7 @@ provider "aws" {
}
locals {
- fleet_image = "fleetdm/fleet:v4.59.1"
+ fleet_image = "fleetdm/fleet:v4.60.0"
domain_name = "example.com"
}
diff --git a/terraform/byo-vpc/variables.tf b/terraform/byo-vpc/variables.tf
index 4c8e173387..ad32f036b5 100644
--- a/terraform/byo-vpc/variables.tf
+++ b/terraform/byo-vpc/variables.tf
@@ -170,7 +170,7 @@ variable "fleet_config" {
mem = optional(number, 4096)
cpu = optional(number, 512)
pid_mode = optional(string, null)
- image = optional(string, "fleetdm/fleet:v4.59.1")
+ image = optional(string, "fleetdm/fleet:v4.60.0")
family = optional(string, "fleet")
sidecars = optional(list(any), [])
depends_on = optional(list(any), [])
@@ -298,7 +298,7 @@ variable "fleet_config" {
mem = 512
cpu = 256
pid_mode = null
- image = "fleetdm/fleet:v4.59.1"
+ image = "fleetdm/fleet:v4.60.0"
family = "fleet"
sidecars = []
depends_on = []
diff --git a/terraform/example/main.tf b/terraform/example/main.tf
index 81ff3cd693..5bffd00bab 100644
--- a/terraform/example/main.tf
+++ b/terraform/example/main.tf
@@ -63,8 +63,8 @@ module "fleet" {
fleet_config = {
# To avoid pull-rate limiting from dockerhub, consider using our quay.io mirror
- # for the Fleet image. e.g. "quay.io/fleetdm/fleet:v4.59.1"
- image = "fleetdm/fleet:v4.59.1" # override default to deploy the image you desire
+ # for the Fleet image. e.g. "quay.io/fleetdm/fleet:v4.60.0"
+ image = "fleetdm/fleet:v4.60.0" # override default to deploy the image you desire
# See https://fleetdm.com/docs/deploy/reference-architectures#aws for appropriate scaling
# memory and cpu.
autoscaling = {
diff --git a/terraform/variables.tf b/terraform/variables.tf
index 6bb2f22317..1f42b20ff8 100644
--- a/terraform/variables.tf
+++ b/terraform/variables.tf
@@ -218,7 +218,7 @@ variable "fleet_config" {
mem = optional(number, 4096)
cpu = optional(number, 512)
pid_mode = optional(string, null)
- image = optional(string, "fleetdm/fleet:v4.59.1")
+ image = optional(string, "fleetdm/fleet:v4.60.0")
family = optional(string, "fleet")
sidecars = optional(list(any), [])
depends_on = optional(list(any), [])
@@ -346,7 +346,7 @@ variable "fleet_config" {
mem = 512
cpu = 256
pid_mode = null
- image = "fleetdm/fleet:v4.59.1"
+ image = "fleetdm/fleet:v4.60.0"
family = "fleet"
sidecars = []
depends_on = []
diff --git a/tools/cloner-check/generated_files/appconfig.txt b/tools/cloner-check/generated_files/appconfig.txt
index 2454027fa9..6c48aadd23 100644
--- a/tools/cloner-check/generated_files/appconfig.txt
+++ b/tools/cloner-check/generated_files/appconfig.txt
@@ -158,6 +158,7 @@ github.com/fleetdm/fleet/v4/server/fleet/MDM MacOSMigration fleet.MacOSMigration
github.com/fleetdm/fleet/v4/server/fleet/MacOSMigration Enable bool
github.com/fleetdm/fleet/v4/server/fleet/MacOSMigration Mode fleet.MacOSMigrationMode string
github.com/fleetdm/fleet/v4/server/fleet/MacOSMigration WebhookURL string
+github.com/fleetdm/fleet/v4/server/fleet/MDM WindowsMigrationEnabled bool
github.com/fleetdm/fleet/v4/server/fleet/MDM EndUserAuthentication fleet.MDMEndUserAuthentication
github.com/fleetdm/fleet/v4/server/fleet/MDMEndUserAuthentication SSOProviderSettings fleet.SSOProviderSettings
github.com/fleetdm/fleet/v4/server/fleet/MDM WindowsEnabledAndConfigured bool
diff --git a/tools/fleetctl-npm/package.json b/tools/fleetctl-npm/package.json
index d9d07156ca..5dd2236b30 100644
--- a/tools/fleetctl-npm/package.json
+++ b/tools/fleetctl-npm/package.json
@@ -1,6 +1,6 @@
{
"name": "fleetctl",
- "version": "v4.59.1",
+ "version": "v4.60.0",
"description": "Installer for the fleetctl CLI tool",
"bin": {
"fleetctl": "./run.js"
diff --git a/tools/mdm/windows/poc-mdm-server/README.md b/tools/mdm/windows/poc-mdm-server/README.md
index 74760b2de2..eebc49061a 100644
--- a/tools/mdm/windows/poc-mdm-server/README.md
+++ b/tools/mdm/windows/poc-mdm-server/README.md
@@ -23,6 +23,17 @@ This code is MIT licensed and it was forked from [here](https://github.com/oscar
## Usage
On the server side, you just need to run the project using the already provided cert and keys. The certificate is in `.pfx` file format, so you need to extract the certificate and key first, see https://stackoverflow.com/a/59120388/1094941.
+The "Import password" is "testpassword", and the names of the output files matter, on Linux something like this works (assuming you are in the certs/ directory):
+
+```
+# for the cert
+$ openssl pkcs12 -in dev_cert_mdmwindows_com.pfx -clcerts -nokeys -out dev_cert_mdmwindows_com_cert.pem
+
+# for the key
+$ openssl pkcs12 -in dev_cert_mdmwindows_com.pfx -out dev_cert_mdmwindows_com.key -nocerts -nodes
+```
+
+Note that an asn1 error might occur when running the server, if that's the case you need to patch your local Go toolchain by running `$ go run ./patch/patch.go` (`GOROOT` env var must be set to point to your `go env GOROOT` directory). It may require `sudo` depending on where your `go` installation is (due to https://github.com/golang/go/issues/14017).
Next go to the project folder and run.
@@ -30,7 +41,9 @@ Next go to the project folder and run.
go run .
```
-On the Windows client side, you need to import a custom CA certificate to the certificate store, and populate the `hosts` file before running the Windows Enrollment. The certificate to import is on the certs directory and it is called `dev_cert_mdmwindows_com.pfx`. You need to copy this certificate to the client machine and run the powershell command below. This is required because the project uses a local dev https endpoint.
+Note that the server binds to the standard and usually firewall-protected `443` port, so you may need to configure your firewall to allow connections to it for the duration of your test.
+
+On the Windows client side, you need to import the custom CA certificate to the certificate store, and populate the `hosts` file before running the Windows Enrollment. The certificate to import is on the certs directory and it is called `dev_cert_mdmwindows_com.pfx`. You need to copy this certificate to the client machine and run the powershell command below (in the console, not in a powershell terminal). This is required because the project uses a local dev https endpoint.
1) Import certificate to Trusted CAs repository (be sure to update the path to the pfx certificate)
@@ -42,6 +55,8 @@ On the Windows client side, you need to import a custom CA certificate to the ce
echo autodiscovery.mdmwindows.com >> %SystemRoot%\System32\drivers\etc\hosts
echo enterpriseenrollment.mdmwindows.com >> %SystemRoot%\System32\drivers\etc\hosts
+To enroll the device into this MDM server, go to `Settings > Accounts > Access work or school` and click the connect button, enter the email provided to the server when you ran `go run .` (default: `demo@mdmwindows.com`) and it should automatically detect the server and proceed with enrollment. This is why the server must run on port `:443`, because it uses automatic discovery and will not attempt a custom port.
+
## Protocol Details
Below is the raw https exchange of the MS-MDE and MS-MDM protocols when run using the -verbose mode:
diff --git a/tools/release/publish_release.sh b/tools/release/publish_release.sh
index cea7e6fccb..3757432b47 100755
--- a/tools/release/publish_release.sh
+++ b/tools/release/publish_release.sh
@@ -626,15 +626,6 @@ fi
start_ver_tag=fleet-$start_version
-# Check if there are updates to fleetctl dependencies (only when doing security updates to base images).
-if [[ $(git diff $start_ver_tag ./tools/wix-docker ./tools/bomutils-docker) ]]; then
- echo "⚠️ Changes in fleetctl dependencies detected, please run the following before continuing the release:"
- echo "1. git tag fleetctl-docker-deps-$next_ver && git push origin fleetctl-docker-deps-$next_ver"
- echo "2. Wait for the triggered https://github.com/fleetdm/fleet/actions/workflows/release-fleetctl-docker-deps.yaml build to finish."
- echo "3. Smoke test the pushed images by manually running the following action: https://github.com/fleetdm/fleet/actions/workflows/test-packaging.yml"
- exit 1
-fi
-
if [[ "$minor" == "true" ]]; then
echo "Minor release from $start_version to $next_ver"
# For scheduled minor releases, we want to branch off of main
diff --git a/website/api/controllers/customers/get-stripe-checkout-session-url.js b/website/api/controllers/customers/get-stripe-checkout-session-url.js
new file mode 100644
index 0000000000..324e428a91
--- /dev/null
+++ b/website/api/controllers/customers/get-stripe-checkout-session-url.js
@@ -0,0 +1,70 @@
+module.exports = {
+
+
+ friendlyName: 'Get Stripe checkout session url',
+
+
+ description: 'Creates a Stripe checkout session for a new Fleet Premium subscription and returns the URL',
+
+
+ inputs: {
+ quoteId: {
+ type: 'number',
+ required: true,
+ description: 'The quote to use (determines the price and number of hosts.)'
+ },
+
+ },
+
+
+ exits: {
+ success: {
+ description: 'A Stripe checkout session was successfully created for a new Fleet Premium subscription.'
+ }
+ },
+
+
+ fn: async function (inputs) {
+ // Configure Stripe
+ const stripe = require('stripe')(sails.config.custom.stripeSecret);
+
+ // Find the quote record that was created.
+ let quoteRecord = await Quote.findOne({id: inputs.quoteId});
+ if(!quoteRecord) {
+ throw new Error(`Consistency violation: The specified quote (${inputs.quoteId}) no longer seems to exist.`);
+ }
+
+ // What if the stripe customer id doesn't already exist on the user?
+ if (!this.req.me.stripeCustomerId) {
+ throw new Error(`Consistency violation: The logged-in user's (${this.req.me.emailAddress}) Stripe customer id has somehow gone missing!`);
+ }
+ // Create a new Stripe checkout session for this subscription.
+ let stripeCheckoutSession = await stripe.checkout.sessions.create({
+ customer: this.req.me.stripeCustomerId,
+ customer_update: {// eslint-disable-line camelcase
+ name: 'auto',
+ address: 'auto',
+ },
+ success_url: `${sails.config.custom.baseUrl}/customers/dashboard?order-complete`,// eslint-disable-line camelcase
+ line_items: [// eslint-disable-line camelcase
+ {
+ price: sails.config.custom.stripeSubscriptionPriceId,
+ quantity: quoteRecord.numberOfHosts,
+ },
+ ],
+ mode: 'subscription',
+ billing_address_collection: 'required',// eslint-disable-line camelcase
+ tax_id_collection: {// eslint-disable-line camelcase
+ enabled: true,
+ required: 'if_supported'
+ }
+ });
+
+ // Return the url of the Stripe checkout session.
+ // Users will be taken to this URL via the handleSubmitting function of the on the /customers/new-license page.
+ return stripeCheckoutSession.url;
+
+ }
+
+
+};
diff --git a/website/api/controllers/customers/redirect-to-stripe-billing-portal.js b/website/api/controllers/customers/redirect-to-stripe-billing-portal.js
new file mode 100644
index 0000000000..9e094da429
--- /dev/null
+++ b/website/api/controllers/customers/redirect-to-stripe-billing-portal.js
@@ -0,0 +1,41 @@
+module.exports = {
+
+
+ friendlyName: 'Redirect to stripe billing portal',
+
+
+ description: 'Creates a Stripe billing portal session for a Fleet Premium subscriber and redirects them.',
+
+
+ exits: {
+ redirect: {
+ responseType: 'redirect',
+ description: 'The requesting user is being redirected to the Stripe customer billing portal.'
+ },
+ noSubscription: {
+ responseType: 'redirect',
+ description: 'The Requesting user does not have a Fleet premium subscription.'
+ },
+ },
+
+
+ fn: async function () {
+ // Note: This action is covered by the 'is-logged-in' policy.
+ const stripe = require('stripe')(sails.config.custom.stripeSecret);
+
+ let thisUsersSubscription = await Subscription.findOne({user: this.req.me.id});
+ if(!thisUsersSubscription){
+ throw {noSubscription: '/customers/new-license'};
+ }
+
+ let session = await stripe.billingPortal.sessions.create({
+ customer: this.req.me.stripeCustomerId,
+ return_url: `${sails.config.custom.baseUrl}/customers/dashboard`,// eslint-disable-line camelcase
+ });
+ // All done.
+ throw {redirect: session.url};
+
+ }
+
+
+};
diff --git a/website/api/controllers/customers/view-dashboard.js b/website/api/controllers/customers/view-dashboard.js
index 2cc99e4820..338159e6b4 100644
--- a/website/api/controllers/customers/view-dashboard.js
+++ b/website/api/controllers/customers/view-dashboard.js
@@ -22,7 +22,7 @@ module.exports = {
fn: async function () {
-
+ const stripe = require('stripe')(sails.config.custom.stripeSecret);
const today = Date.now();
const oneYearInMs = (1000 * 60 * 60 * 24 * 365);
const oneYearAgoAt = today - oneYearInMs;
@@ -30,24 +30,33 @@ module.exports = {
const thirtyDaysFromNowAt = today + (1000 * 60 * 60 * 24 * 30);
let subscriptionHasBeenRecentlyRenewed = false;
let subscriptionExpiresSoon = false;
+ let subscriptionIsExpired = false;
// Get subscription Info
let thisSubscription = await Subscription.findOne({user: this.req.me.id});
-
// If the user does not have a subscription, then help them subscribe.
if(!thisSubscription) {
throw {redirect: '/customers/new-license'};
}
+ let stripeSubscriptionDetails = await stripe.subscriptions.retrieve(thisSubscription.stripeSubscriptionId);
+ let willSubscriptionRenew = true;
+ if(stripeSubscriptionDetails.cancel_at_period_end === true){
+ willSubscriptionRenew = false;
+ }
// If this subscription is over a year old, and was renewed in the past 30 days set subscriptionHasBeenRecentlyRenewed to true.
if(thisSubscription.createdAt <= oneYearAgoAt && (thisSubscription.nextBillingAt - oneYearInMs) >= thirtyDaysAgoAt) {
subscriptionHasBeenRecentlyRenewed = true;
}
// If this subscription will renew in the next 30 days, set subscriptionExpiresSoon to true.
- if(thisSubscription.nextBillingAt <= thirtyDaysFromNowAt){
+ if(thisSubscription.nextBillingAt <= thirtyDaysFromNowAt && willSubscriptionRenew){
subscriptionExpiresSoon = true;
}
+ // If this subscription is expired, set subscriptionIsExpired to true.
+ if(thisSubscription.nextBillingAt <= Date.now()){
+ subscriptionIsExpired = true;
+ }
// Respond with view.
return {
@@ -55,6 +64,8 @@ module.exports = {
thisSubscription,
subscriptionExpiresSoon,
subscriptionHasBeenRecentlyRenewed,
+ willSubscriptionRenew,
+ subscriptionIsExpired,
};
}
diff --git a/website/api/controllers/view-app-details.js b/website/api/controllers/view-app-details.js
new file mode 100644
index 0000000000..e757164e3c
--- /dev/null
+++ b/website/api/controllers/view-app-details.js
@@ -0,0 +1,60 @@
+module.exports = {
+
+
+ friendlyName: 'View app details',
+
+
+ description: 'Display "App details" page.',
+
+
+ inputs: {
+ appIdentifier: {
+ type: 'string',
+ required: true,
+ description: 'the identifier of an app in Fleet\'s maintained app library.',
+ example: '1password'
+ },
+ },
+
+ exits: {
+
+ success: {
+ viewTemplatePath: 'pages/app-details'
+ },
+
+ badConfig: {
+ responseType: 'badConfig'
+ },
+
+ notFound: {
+ responseType: 'notFound'
+ },
+
+ },
+
+
+ fn: async function ({appIdentifier}) {
+
+ if (!_.isObject(sails.config.builtStaticContent) || !_.isArray(sails.config.builtStaticContent.appLibrary) || !sails.config.builtStaticContent.appLibrary) {
+ throw {badConfig: 'builtStaticContent.appLibrary'};
+ }
+
+ let thisApp = _.find(sails.config.builtStaticContent.appLibrary, { identifier: appIdentifier });
+ if (!thisApp) {
+ throw 'notFound';
+ }
+ // FUTURE: make these better.
+ let pageTitleForMeta = thisApp.name + ' | Fleet app library';
+ // let pageDescriptionForMeta = 'TODO'
+
+ // Respond with view.
+ return {
+ thisApp,
+ // pageDescriptionForMeta,
+ pageTitleForMeta,
+ };
+
+ }
+
+
+};
diff --git a/website/api/controllers/view-app-library.js b/website/api/controllers/view-app-library.js
new file mode 100644
index 0000000000..1ea01f1e25
--- /dev/null
+++ b/website/api/controllers/view-app-library.js
@@ -0,0 +1,33 @@
+module.exports = {
+
+
+ friendlyName: 'View app library',
+
+
+ description: 'Display "App library" page.',
+
+
+ exits: {
+
+ success: {
+ viewTemplatePath: 'pages/app-library'
+ },
+ badConfig: { responseType: 'badConfig' },
+ },
+
+
+ fn: async function () {
+
+ if (!_.isObject(sails.config.builtStaticContent) || !_.isArray(sails.config.builtStaticContent.appLibrary) || !sails.config.builtStaticContent.appLibrary) {
+ throw {badConfig: 'builtStaticContent.appLibrary'};
+ }
+
+ let allApps = sails.config.builtStaticContent.appLibrary;
+ allApps = _.sortBy(allApps, 'name');
+ // Respond with view.
+ return {allApps};
+
+ }
+
+
+};
diff --git a/website/api/controllers/view-endpoint-ops.js b/website/api/controllers/view-observability.js
similarity index 96%
rename from website/api/controllers/view-endpoint-ops.js
rename to website/api/controllers/view-observability.js
index 7854159b65..6fa1a3381e 100644
--- a/website/api/controllers/view-endpoint-ops.js
+++ b/website/api/controllers/view-observability.js
@@ -1,16 +1,16 @@
module.exports = {
- friendlyName: 'View endpoint ops',
+ friendlyName: 'View observability',
- description: 'Display "Endpoint ops" page.',
+ description: 'Display "Observability" page.',
exits: {
success: {
- viewTemplatePath: 'pages/endpoint-ops'
+ viewTemplatePath: 'pages/observability'
},
badConfig: { responseType: 'badConfig' },
},
diff --git a/website/api/controllers/webhooks/receive-from-stripe.js b/website/api/controllers/webhooks/receive-from-stripe.js
index 394c17851e..9f505c8d02 100644
--- a/website/api/controllers/webhooks/receive-from-stripe.js
+++ b/website/api/controllers/webhooks/receive-from-stripe.js
@@ -41,7 +41,7 @@ module.exports = {
fn: async function ({id, type, data, webhookSecret}) {
-
+ const stripe = require('stripe')(sails.config.custom.stripeSecret);
let assert = require('assert');
if(!this.req.get('stripe-signature')) {
@@ -77,6 +77,7 @@ module.exports = {
'invoice.payment_action_required',// Sent when a user's billing card requires additional verification from stripe.
'invoice.updated',// Sent before an incomplete invoice is voided. (~24 hours after a payment fails)
'invoice.voided',// Sent when an incomplete invoice is marked as voided. (~24 hours after a payment fails)
+ 'checkout.session.completed'// Sent when a user completes a Stripe Checkout session.
];
// If this event is for a subscription that was just created, we won't have a matching Subscription record in the database. This is because we wait until the subscription's invoice is paid to create the record in our database.
@@ -86,15 +87,16 @@ module.exports = {
throw new Error(`The Stripe subscription events webhook received a event for a subscription with stripeSubscriptionId: ${subscriptionIdToFind}, but no matching record was found in our database.`);
} else {
let userReferencedInStripeEvent = await User.findOne({stripeCustomerId: stripeEventData.customer});
- if(!userReferencedInStripeEvent){
+ if(!userReferencedInStripeEvent) {
throw new Error(`The receive-from-stripe webhook received an event for an invoice (type: ${type}) for a subscription (stripeSubscriptionId: ${subscriptionIdToFind}) but no matching Subscription or User record (stripeCustomerId: ${stripeEventData.customer}) was found in our databse.`);
- } else {
- return;
}
}
}
- let userForThisSubscription = subscriptionForThisEvent.user;
+ let userForThisSubscription = await User.findOne({stripeCustomerId: stripeEventData.customer});
+ if(!userForThisSubscription){
+ throw new Error(`The stripe subscription events webhook received a tpye ${type} event for a user with stripeCustomerId: ${stripeEventData.customer}, but no matching user was found in the databse. Stripe event ID: ${id}`);
+ }
// ┬ ┬┌─┐┌─┐┌─┐┌┬┐┬┌┐┌┌─┐ ┬─┐┌─┐┌┐┌┌─┐┬ ┬┌─┐┬
// │ │├─┘│ │ │││││││││ ┬ ├┬┘├┤ │││├┤ │││├─┤│
// └─┘┴ └─┘└─┘┴ ┴┴┘└┘└─┘ ┴└─└─┘┘└┘└─┘└┴┘┴ ┴┴─┘
@@ -200,6 +202,37 @@ module.exports = {
fleetLicenseKey: newLicenseKeyForThisSubscription,
nextBillingAt: nextBillingAt
});
+ } else if(type === 'checkout.session.completed' && stripeEventData.payment_status === 'paid') {
+ // For handling successful payments from a Stripe checkout session.
+ // Note: This event is sent the moment the user's payment succeeds.
+ if(subscriptionForThisEvent){// Throw an error if there is an existing subscription with this ID that matches this event in the website's database.
+ throw new Error(`Consistency violation! The stripe webhook received a "${type}" event for a new subscription being created, but a subscription with the stripe ID ${subscriptionForThisEvent.stripeSubscriptionId} already exists.`);
+ }
+ // Retrieve the subscription details from Stripe.
+ let newSubscriptionDetails = await stripe.subscriptions.retrieve(stripeEventData.subscription);
+ // Convert the timestamp of the next time this subscription will be billed into a JS timestamp (Epoch MS)
+ let nextBillingAt = newSubscriptionDetails.current_period_end * 1000;
+ // Get the number of Hosts.
+ let numberOfHosts = newSubscriptionDetails.quantity;
+ // Get the whole dollar price per host.
+ let subscriptionPricePerHost = newSubscriptionDetails.plan.amount / 100;
+ // Determine the annual cost of this user's subscription
+ let subscriptionPrice = subscriptionPricePerHost * numberOfHosts;
+ // Generate a new license key.
+ let newLicenseKey = await sails.helpers.createLicenseKey.with({
+ numberOfHosts,
+ organization: userForThisSubscription.organization,
+ expiresAt: nextBillingAt,
+ });
+ // Create the database record for this subscription.
+ await Subscription.create({
+ nextBillingAt,
+ numberOfHosts,
+ subscriptionPrice,
+ stripeSubscriptionId: newSubscriptionDetails.id,
+ fleetLicenseKey: newLicenseKey,
+ user: userForThisSubscription.id,
+ });
}
// FUTURE: send emails about failed payments. (type === 'invoice.payment_failed' && stripeEventData.billing_reason === 'subscription_cycle')
diff --git a/website/api/helpers/salesforce/update-or-create-contact-and-account.js b/website/api/helpers/salesforce/update-or-create-contact-and-account.js
index 0f2c26c965..5d0b24dcd5 100644
--- a/website/api/helpers/salesforce/update-or-create-contact-and-account.js
+++ b/website/api/helpers/salesforce/update-or-create-contact-and-account.js
@@ -161,8 +161,9 @@ module.exports = {
delete valuesToSet.Intent_signals__c;
}
}
- // Check the existing contact record's psychologicalStage.
- if(psychologicalStage) {
+
+ // Check the existing contact record's psychologicalStage (If it is set).
+ if(psychologicalStage && existingContactRecord.Stage__c !== null) {
let recordsCurrentPsyStage = existingContactRecord.Stage__c;
// Because each psychological stage starts with a number, we'll get the first character in the record's current psychological stage and the new psychological stage to make comparison easier.
let psyStageStageNumberToChangeTo = Number(psychologicalStage[0]);
diff --git a/website/assets/images/app-icon-1password-60x60@2x.png b/website/assets/images/app-icon-1password-60x60@2x.png
new file mode 100644
index 0000000000..99bf1fe9ba
Binary files /dev/null and b/website/assets/images/app-icon-1password-60x60@2x.png differ
diff --git a/website/assets/images/app-icon-adobe-acrobat-reader-60x60@2x.png b/website/assets/images/app-icon-adobe-acrobat-reader-60x60@2x.png
new file mode 100644
index 0000000000..b7d47badf5
Binary files /dev/null and b/website/assets/images/app-icon-adobe-acrobat-reader-60x60@2x.png differ
diff --git a/website/assets/images/app-icon-box-drive-60x60@2x.png b/website/assets/images/app-icon-box-drive-60x60@2x.png
new file mode 100644
index 0000000000..807083aca3
Binary files /dev/null and b/website/assets/images/app-icon-box-drive-60x60@2x.png differ
diff --git a/website/assets/images/app-icon-brave-browser-60x60@2x.png b/website/assets/images/app-icon-brave-browser-60x60@2x.png
new file mode 100644
index 0000000000..53fe7548c4
Binary files /dev/null and b/website/assets/images/app-icon-brave-browser-60x60@2x.png differ
diff --git a/website/assets/images/app-icon-cloudflare-warp-60x60@2x.png b/website/assets/images/app-icon-cloudflare-warp-60x60@2x.png
new file mode 100644
index 0000000000..3c38697db8
Binary files /dev/null and b/website/assets/images/app-icon-cloudflare-warp-60x60@2x.png differ
diff --git a/website/assets/images/app-icon-docker-60x60@2x.png b/website/assets/images/app-icon-docker-60x60@2x.png
new file mode 100644
index 0000000000..074766f398
Binary files /dev/null and b/website/assets/images/app-icon-docker-60x60@2x.png differ
diff --git a/website/assets/images/app-icon-figma-60x60@2x.png b/website/assets/images/app-icon-figma-60x60@2x.png
new file mode 100644
index 0000000000..a30d4e9024
Binary files /dev/null and b/website/assets/images/app-icon-figma-60x60@2x.png differ
diff --git a/website/assets/images/app-icon-firefox-60x60@2x.png b/website/assets/images/app-icon-firefox-60x60@2x.png
new file mode 100644
index 0000000000..1ff3b7c35d
Binary files /dev/null and b/website/assets/images/app-icon-firefox-60x60@2x.png differ
diff --git a/website/assets/images/app-icon-google-chrome-60x60@2x.png b/website/assets/images/app-icon-google-chrome-60x60@2x.png
new file mode 100644
index 0000000000..3bf92c2a9e
Binary files /dev/null and b/website/assets/images/app-icon-google-chrome-60x60@2x.png differ
diff --git a/website/assets/images/app-icon-microsoft-edge-60x60@2x.png b/website/assets/images/app-icon-microsoft-edge-60x60@2x.png
new file mode 100644
index 0000000000..bd42b2fad4
Binary files /dev/null and b/website/assets/images/app-icon-microsoft-edge-60x60@2x.png differ
diff --git a/website/assets/images/app-icon-microsoft-excel-60x60@2x.png b/website/assets/images/app-icon-microsoft-excel-60x60@2x.png
new file mode 100644
index 0000000000..8401843239
Binary files /dev/null and b/website/assets/images/app-icon-microsoft-excel-60x60@2x.png differ
diff --git a/website/assets/images/app-icon-microsoft-teams-60x60@2x.png b/website/assets/images/app-icon-microsoft-teams-60x60@2x.png
new file mode 100644
index 0000000000..08c254d101
Binary files /dev/null and b/website/assets/images/app-icon-microsoft-teams-60x60@2x.png differ
diff --git a/website/assets/images/app-icon-microsoft-word-60x60@2x.png b/website/assets/images/app-icon-microsoft-word-60x60@2x.png
new file mode 100644
index 0000000000..18cd2362c1
Binary files /dev/null and b/website/assets/images/app-icon-microsoft-word-60x60@2x.png differ
diff --git a/website/assets/images/app-icon-notion-60x60@2x.png b/website/assets/images/app-icon-notion-60x60@2x.png
new file mode 100644
index 0000000000..7afb82ba82
Binary files /dev/null and b/website/assets/images/app-icon-notion-60x60@2x.png differ
diff --git a/website/assets/images/app-icon-postman-60x60@2x.png b/website/assets/images/app-icon-postman-60x60@2x.png
new file mode 100644
index 0000000000..3801a78f78
Binary files /dev/null and b/website/assets/images/app-icon-postman-60x60@2x.png differ
diff --git a/website/assets/images/app-icon-slack-60x60@2x.png b/website/assets/images/app-icon-slack-60x60@2x.png
new file mode 100644
index 0000000000..9811ab1eec
Binary files /dev/null and b/website/assets/images/app-icon-slack-60x60@2x.png differ
diff --git a/website/assets/images/app-icon-teamviewer-60x60@2x.png b/website/assets/images/app-icon-teamviewer-60x60@2x.png
new file mode 100644
index 0000000000..298113cfb1
Binary files /dev/null and b/website/assets/images/app-icon-teamviewer-60x60@2x.png differ
diff --git a/website/assets/images/app-icon-visual-studio-code-60x60@2x.png b/website/assets/images/app-icon-visual-studio-code-60x60@2x.png
new file mode 100644
index 0000000000..b9fe5290ac
Binary files /dev/null and b/website/assets/images/app-icon-visual-studio-code-60x60@2x.png differ
diff --git a/website/assets/images/app-icon-whatsapp-60x60@2x.png b/website/assets/images/app-icon-whatsapp-60x60@2x.png
new file mode 100644
index 0000000000..0a44830984
Binary files /dev/null and b/website/assets/images/app-icon-whatsapp-60x60@2x.png differ
diff --git a/website/assets/images/app-icon-zoom-60x60@2x.png b/website/assets/images/app-icon-zoom-60x60@2x.png
new file mode 100644
index 0000000000..069259362d
Binary files /dev/null and b/website/assets/images/app-icon-zoom-60x60@2x.png differ
diff --git a/website/assets/images/articles/fedora-1-1200x675@2x.png b/website/assets/images/articles/fedora-1-1200x675@2x.png
new file mode 100644
index 0000000000..ec32e32b06
Binary files /dev/null and b/website/assets/images/articles/fedora-1-1200x675@2x.png differ
diff --git a/website/assets/images/articles/fedora-2-1200x675@2x.png b/website/assets/images/articles/fedora-2-1200x675@2x.png
new file mode 100644
index 0000000000..1d533640c2
Binary files /dev/null and b/website/assets/images/articles/fedora-2-1200x675@2x.png differ
diff --git a/website/assets/images/articles/fleet-4.60.0-1600x900@2x.png b/website/assets/images/articles/fleet-4.60.0-1600x900@2x.png
new file mode 100644
index 0000000000..01feb42ba2
Binary files /dev/null and b/website/assets/images/articles/fleet-4.60.0-1600x900@2x.png differ
diff --git a/website/assets/images/articles/ubuntu-1-1200x675@2x.png b/website/assets/images/articles/ubuntu-1-1200x675@2x.png
new file mode 100644
index 0000000000..e6c1f3edf8
Binary files /dev/null and b/website/assets/images/articles/ubuntu-1-1200x675@2x.png differ
diff --git a/website/assets/images/articles/ubuntu-2-1200x675@2x.png b/website/assets/images/articles/ubuntu-2-1200x675@2x.png
new file mode 100644
index 0000000000..6c5e5357d8
Binary files /dev/null and b/website/assets/images/articles/ubuntu-2-1200x675@2x.png differ
diff --git a/website/assets/js/cloud.setup.js b/website/assets/js/cloud.setup.js
index 9c08e4dde1..35f7bcdf45 100644
--- a/website/assets/js/cloud.setup.js
+++ b/website/assets/js/cloud.setup.js
@@ -13,7 +13,7 @@
Cloud.setup({
/* eslint-disable */
- methods: {"downloadSitemap":{"verb":"GET","url":"/sitemap.xml","args":[]},"downloadRssFeed":{"verb":"GET","url":"/rss/:categoryName","args":["categoryName"]},"receiveUsageAnalytics":{"verb":"POST","url":"/api/v1/webhooks/receive-usage-analytics","args":["anonymousIdentifier","fleetVersion","licenseTier","numHostsEnrolled","numUsers","numTeams","numPolicies","numLabels","softwareInventoryEnabled","vulnDetectionEnabled","systemUsersEnabled","hostsStatusWebHookEnabled","numWeeklyActiveUsers","numWeeklyPolicyViolationDaysActual","numWeeklyPolicyViolationDaysPossible","hostsEnrolledByOperatingSystem","hostsEnrolledByOrbitVersion","hostsEnrolledByOsqueryVersion","storedErrors","numHostsNotResponding","organization","mdmMacOsEnabled","mdmWindowsEnabled","liveQueryDisabled","hostExpiryEnabled","numSoftwareVersions","numHostSoftwares","numSoftwareTitles","numHostSoftwareInstalledPaths","numSoftwareCPEs","numSoftwareCVEs"]},"receiveFromGithub":{"verb":"GET","url":"/api/v1/webhooks/github","args":["botSignature","action","sender","repository","changes","issue","comment","pull_request","label","release"]},"receiveFromStripe":{"verb":"POST","url":"/api/v1/webhooks/receive-from-stripe","args":["id","type","data","webhookSecret"]},"deliverContactFormMessage":{"verb":"POST","url":"/api/v1/deliver-contact-form-message","args":["emailAddress","firstName","lastName","message"]},"sendPasswordRecoveryEmail":{"verb":"POST","url":"/api/v1/entrance/send-password-recovery-email","args":["emailAddress"]},"signup":{"verb":"POST","url":"/api/v1/customers/signup","args":["emailAddress","password","organization","firstName","lastName","signupReason"]},"updateProfile":{"verb":"POST","url":"/api/v1/account/update-profile","args":["firstName","lastName","organization","emailAddress"]},"updatePassword":{"verb":"POST","url":"/api/v1/account/update-password","args":["oldPassword","newPassword"]},"updateBillingCard":{"verb":"POST","url":"/api/v1/account/update-billing-card","args":["stripeToken","billingCardLast4","billingCardBrand","billingCardExpMonth","billingCardExpYear"]},"login":{"verb":"POST","url":"/api/v1/customers/login","args":["emailAddress","password","rememberMe"]},"logout":{"verb":"GET","url":"/api/v1/account/logout","args":[]},"createQuote":{"verb":"POST","url":"/api/v1/customers/create-quote","args":["numberOfHosts"]},"saveBillingInfoAndSubscribe":{"verb":"POST","url":"/api/v1/customers/save-billing-info-and-subscribe","args":["quoteId","organization","firstName","lastName","paymentSource"]},"updatePasswordAndLogin":{"verb":"POST","url":"/api/v1/entrance/update-password-and-login","args":["password","token"]},"deliverDemoSignup":{"verb":"POST","url":"/api/v1/deliver-demo-signup","args":["emailAddress"]},"createOrUpdateOneNewsletterSubscription":{"verb":"POST","url":"/api/v1/create-or-update-one-newsletter-subscription","args":["emailAddress","subscribeTo"]},"unsubscribeFromAllNewsletters":{"verb":"GET","url":"/api/v1/unsubscribe-from-all-newsletters","args":["emailAddress"]},"buildLicenseKey":{"verb":"POST","url":"/api/v1/admin/build-license-key","args":["numberOfHosts","organization","expiresAt","partnerName"]},"createVantaAuthorizationRequest":{"verb":"POST","url":"/api/v1/create-vanta-authorization-request","args":["emailAddress","fleetInstanceUrl","fleetApiKey","redirectToExternalPageAfterAuthorization","sharedSecret"]},"redirectVantaAuthorizationRequest":{"verb":"GET","url":"/redirect-vanta-authorization-request","args":["vantaSourceId","state","vantaAuthorizationRequestURL","redirectAfterSetup"]},"deliverMdmBetaSignup":{"verb":"POST","url":"/api/v1/deliver-mdm-beta-signup","args":["emailAddress","fullName","jobTitle","numberOfHosts"]},"getHumanInterpretationFromOsquerySql":{"verb":"POST","url":"/api/v1/get-human-interpretation-from-osquery-sql","args":["sql"]},"deliverAppleCsr":{"verb":"POST","url":"/api/v1/deliver-apple-csr","args":["unsignedCsrData","deliveryMethod"]},"deliverMdmDemoEmail":{"verb":"POST","url":"/api/v1/deliver-mdm-demo-email","args":["emailAddress"]},"provisionSandboxInstanceAndDeliverEmail":{"verb":"POST","url":"/api/v1/admin/provision-sandbox-instance-and-deliver-email","args":["userId"]},"deliverTalkToUsFormSubmission":{"verb":"POST","url":"/api/v1/deliver-talk-to-us-form-submission","args":["emailAddress","firstName","lastName","organization","numberOfHosts","primaryBuyingSituation"]},"saveQuestionnaireProgress":{"verb":"POST","url":"/api/v1/save-questionnaire-progress","args":["currentStep","formData"]},"updateStartCtaVisibility":{"verb":"POST","url":"/api/v1/account/update-start-cta-visibility","args":[]},"deliverDealRegistrationSubmission":{"verb":"POST","url":"/api/v1/deliver-deal-registration-submission","args":["submittersFirstName","submittersLastName","submittersEmailAddress","submittersOrganization","customersFirstName","customersLastName","customersEmailAddress","linkedinUrl","customersOrganization","customersCurrentMdm","otherMdmEvaluated","preferredHosting","expectedDealSize","expectedCloseDate","notes"]}}
+ methods: {"redirectToStripeBillingPortal":{"verb":"GET","url":"/customers/update-subscription","args":[]},"downloadSitemap":{"verb":"GET","url":"/sitemap.xml","args":[]},"downloadRssFeed":{"verb":"GET","url":"/rss/:categoryName","args":["categoryName"]},"receiveUsageAnalytics":{"verb":"POST","url":"/api/v1/webhooks/receive-usage-analytics","args":["anonymousIdentifier","fleetVersion","licenseTier","numHostsEnrolled","numUsers","numTeams","numPolicies","numLabels","softwareInventoryEnabled","vulnDetectionEnabled","systemUsersEnabled","hostsStatusWebHookEnabled","numWeeklyActiveUsers","numWeeklyPolicyViolationDaysActual","numWeeklyPolicyViolationDaysPossible","hostsEnrolledByOperatingSystem","hostsEnrolledByOrbitVersion","hostsEnrolledByOsqueryVersion","storedErrors","numHostsNotResponding","organization","mdmMacOsEnabled","mdmWindowsEnabled","liveQueryDisabled","hostExpiryEnabled","numSoftwareVersions","numHostSoftwares","numSoftwareTitles","numHostSoftwareInstalledPaths","numSoftwareCPEs","numSoftwareCVEs","aiFeaturesDisabled","maintenanceWindowsEnabled","maintenanceWindowsConfigured","numHostsFleetDesktopEnabled"]},"receiveFromGithub":{"verb":"GET","url":"/api/v1/webhooks/github","args":["botSignature","action","sender","repository","changes","issue","comment","pull_request","label","release"]},"receiveFromStripe":{"verb":"POST","url":"/api/v1/webhooks/receive-from-stripe","args":["id","type","data","webhookSecret"]},"deliverContactFormMessage":{"verb":"POST","url":"/api/v1/deliver-contact-form-message","args":["emailAddress","firstName","lastName","message"]},"sendPasswordRecoveryEmail":{"verb":"POST","url":"/api/v1/entrance/send-password-recovery-email","args":["emailAddress"]},"signup":{"verb":"POST","url":"/api/v1/customers/signup","args":["emailAddress","password","organization","firstName","lastName","signupReason"]},"updateProfile":{"verb":"POST","url":"/api/v1/account/update-profile","args":["firstName","lastName","organization","emailAddress"]},"updatePassword":{"verb":"POST","url":"/api/v1/account/update-password","args":["oldPassword","newPassword"]},"updateBillingCard":{"verb":"POST","url":"/api/v1/account/update-billing-card","args":["stripeToken","billingCardLast4","billingCardBrand","billingCardExpMonth","billingCardExpYear"]},"login":{"verb":"POST","url":"/api/v1/customers/login","args":["emailAddress","password","rememberMe"]},"logout":{"verb":"GET","url":"/api/v1/account/logout","args":[]},"createQuote":{"verb":"POST","url":"/api/v1/customers/create-quote","args":["numberOfHosts"]},"saveBillingInfoAndSubscribe":{"verb":"POST","url":"/api/v1/customers/save-billing-info-and-subscribe","args":["quoteId","organization","firstName","lastName","paymentSource"]},"updatePasswordAndLogin":{"verb":"POST","url":"/api/v1/entrance/update-password-and-login","args":["password","token"]},"deliverDemoSignup":{"verb":"POST","url":"/api/v1/deliver-demo-signup","args":["emailAddress"]},"createOrUpdateOneNewsletterSubscription":{"verb":"POST","url":"/api/v1/create-or-update-one-newsletter-subscription","args":["emailAddress"]},"unsubscribeFromAllNewsletters":{"verb":"GET","url":"/api/v1/unsubscribe-from-all-newsletters","args":["emailAddress"]},"buildLicenseKey":{"verb":"POST","url":"/api/v1/admin/build-license-key","args":["numberOfHosts","organization","expiresAt","partnerName"]},"createVantaAuthorizationRequest":{"verb":"POST","url":"/api/v1/create-vanta-authorization-request","args":["emailAddress","fleetInstanceUrl","fleetApiKey","redirectToExternalPageAfterAuthorization","sharedSecret"]},"redirectVantaAuthorizationRequest":{"verb":"GET","url":"/redirect-vanta-authorization-request","args":["vantaSourceId","state","vantaAuthorizationRequestURL","redirectAfterSetup"]},"deliverMdmBetaSignup":{"verb":"POST","url":"/api/v1/deliver-mdm-beta-signup","args":["emailAddress","fullName","jobTitle","numberOfHosts"]},"getHumanInterpretationFromOsquerySql":{"verb":"POST","url":"/api/v1/get-human-interpretation-from-osquery-sql","args":["sql"]},"deliverAppleCsr":{"verb":"POST","url":"/api/v1/deliver-apple-csr","args":["unsignedCsrData","deliveryMethod"]},"deliverMdmDemoEmail":{"verb":"POST","url":"/api/v1/deliver-mdm-demo-email","args":["emailAddress"]},"provisionSandboxInstanceAndDeliverEmail":{"verb":"POST","url":"/api/v1/admin/provision-sandbox-instance-and-deliver-email","args":["userId"]},"deliverTalkToUsFormSubmission":{"verb":"POST","url":"/api/v1/deliver-talk-to-us-form-submission","args":["emailAddress","firstName","lastName","organization","numberOfHosts","primaryBuyingSituation"]},"saveQuestionnaireProgress":{"verb":"POST","url":"/api/v1/save-questionnaire-progress","args":["currentStep","formData"]},"updateStartCtaVisibility":{"verb":"POST","url":"/api/v1/account/update-start-cta-visibility","args":[]},"deliverDealRegistrationSubmission":{"verb":"POST","url":"/api/v1/deliver-deal-registration-submission","args":["submittersFirstName","submittersLastName","submittersEmailAddress","submittersOrganization","customersFirstName","customersLastName","customersEmailAddress","linkedinUrl","customersOrganization","customersCurrentMdm","otherMdmEvaluated","preferredHosting","expectedDealSize","expectedCloseDate","notes"]},"unsubscribeFromMarketingEmails":{"verb":"GET","url":"/api/v1/unsubscribe-from-marketing-emails","args":["emailAddress"]},"getStripeCheckoutSessionUrl":{"verb":"POST","url":"/api/v1/customers/get-stripe-checkout-session-url","args":["quoteId"]}}
/* eslint-enable */
});
diff --git a/website/assets/js/pages/app-details.page.js b/website/assets/js/pages/app-details.page.js
new file mode 100644
index 0000000000..bba7bb6ac1
--- /dev/null
+++ b/website/assets/js/pages/app-details.page.js
@@ -0,0 +1,47 @@
+parasails.registerPage('app-details', {
+ // ╦╔╗╔╦╔╦╗╦╔═╗╦ ╔═╗╔╦╗╔═╗╔╦╗╔═╗
+ // ║║║║║ ║ ║╠═╣║ ╚═╗ ║ ╠═╣ ║ ║╣
+ // ╩╝╚╝╩ ╩ ╩╩ ╩╩═╝ ╚═╝ ╩ ╩ ╩ ╩ ╚═╝
+ data: {
+ //…
+ },
+
+ // ╦ ╦╔═╗╔═╗╔═╗╦ ╦╔═╗╦ ╔═╗
+ // ║ ║╠╣ ║╣ ║ ╚╦╝║ ║ ║╣
+ // ╩═╝╩╚ ╚═╝╚═╝ ╩ ╚═╝╩═╝╚═╝
+ beforeMount: function() {
+ //…
+ },
+ mounted: async function() {
+
+ if(this.algoliaPublicKey) { // Note: Docsearch will only be enabled if sails.config.custom.algoliaPublicKey is set. If the value is undefined, the documentation search will be disabled.
+ docsearch({
+ appId: 'NZXAYZXDGH',
+ apiKey: this.algoliaPublicKey,
+ indexName: 'fleetdm',
+ container: '#docsearch-query',
+ placeholder: 'Search',
+ debug: false,
+ searchParameters: {
+ 'facetFilters': ['section:queries']
+ },
+ });
+ }
+
+ $('[purpose="copy-button"]').on('click', async function() {
+ let code = $(this).siblings('pre').find('code').text();
+ $(this).addClass('copied');
+ await setTimeout(()=>{
+ $(this).removeClass('copied');
+ }, 2000);
+ navigator.clipboard.writeText(code);
+ });
+ },
+
+ // ╦╔╗╔╔╦╗╔═╗╦═╗╔═╗╔═╗╔╦╗╦╔═╗╔╗╔╔═╗
+ // ║║║║ ║ ║╣ ╠╦╝╠═╣║ ║ ║║ ║║║║╚═╗
+ // ╩╝╚╝ ╩ ╚═╝╩╚═╩ ╩╚═╝ ╩ ╩╚═╝╝╚╝╚═╝
+ methods: {
+ //…
+ }
+});
diff --git a/website/assets/js/pages/app-library.page.js b/website/assets/js/pages/app-library.page.js
new file mode 100644
index 0000000000..595a8ad10e
--- /dev/null
+++ b/website/assets/js/pages/app-library.page.js
@@ -0,0 +1,25 @@
+parasails.registerPage('app-library', {
+ // ╦╔╗╔╦╔╦╗╦╔═╗╦ ╔═╗╔╦╗╔═╗╔╦╗╔═╗
+ // ║║║║║ ║ ║╠═╣║ ╚═╗ ║ ╠═╣ ║ ║╣
+ // ╩╝╚╝╩ ╩ ╩╩ ╩╩═╝ ╚═╝ ╩ ╩ ╩ ╩ ╚═╝
+ data: {
+ //…
+ },
+
+ // ╦ ╦╔═╗╔═╗╔═╗╦ ╦╔═╗╦ ╔═╗
+ // ║ ║╠╣ ║╣ ║ ╚╦╝║ ║ ║╣
+ // ╩═╝╩╚ ╚═╝╚═╝ ╩ ╚═╝╩═╝╚═╝
+ beforeMount: function() {
+ //…
+ },
+ mounted: async function() {
+ //…
+ },
+
+ // ╦╔╗╔╔╦╗╔═╗╦═╗╔═╗╔═╗╔╦╗╦╔═╗╔╗╔╔═╗
+ // ║║║║ ║ ║╣ ╠╦╝╠═╣║ ║ ║║ ║║║║╚═╗
+ // ╩╝╚╝ ╩ ╚═╝╩╚═╩ ╩╚═╝ ╩ ╩╚═╝╝╚╝╚═╝
+ methods: {
+ //…
+ }
+});
diff --git a/website/assets/js/pages/customers/new-license.page.js b/website/assets/js/pages/customers/new-license.page.js
index e0e7e61654..e72ea5b395 100644
--- a/website/assets/js/pages/customers/new-license.page.js
+++ b/website/assets/js/pages/customers/new-license.page.js
@@ -19,6 +19,10 @@ parasails.registerPage('new-license', {
selfHostedAcknowledgment: {required: true, is: true},
},
+ checkoutFormRules: {
+ selfHostedAcknowledgment: {required: true, is: true},
+ },
+
// Syncing / loading state
syncing: false,
@@ -93,7 +97,12 @@ parasails.registerPage('new-license', {
this.syncing = true;
this.goto('/customers/dashboard?order-complete');
},
-
+ handleSubmittingCheckoutForm: async function() {
+ let redirectUrl = await Cloud.getStripeCheckoutSessionUrl.with({
+ quoteId: this.formData.quoteId
+ });
+ this.goto(redirectUrl);
+ },
submittedQuoteForm: async function(quote) {
this.showQuotedPrice = true;
this.quotedPrice = quote.quotedPrice;
diff --git a/website/assets/js/pages/endpoint-ops.page.js b/website/assets/js/pages/observability.page.js
similarity index 95%
rename from website/assets/js/pages/endpoint-ops.page.js
rename to website/assets/js/pages/observability.page.js
index f79d51d830..0386d1f3f3 100644
--- a/website/assets/js/pages/endpoint-ops.page.js
+++ b/website/assets/js/pages/observability.page.js
@@ -1,4 +1,4 @@
-parasails.registerPage('endpoint-ops-page', {
+parasails.registerPage('observability-page', {
// ╦╔╗╔╦╔╦╗╦╔═╗╦ ╔═╗╔╦╗╔═╗╔╦╗╔═╗
// ║║║║║ ║ ║╠═╣║ ╚═╗ ║ ╠═╣ ║ ║╣
// ╩╝╚╝╩ ╩ ╩╩ ╩╩═╝ ╚═╝ ╩ ╩ ╩ ╩ ╚═╝
diff --git a/website/assets/styles/importer.less b/website/assets/styles/importer.less
index ef6d10bbcb..8fc197e4c2 100644
--- a/website/assets/styles/importer.less
+++ b/website/assets/styles/importer.less
@@ -67,7 +67,7 @@
@import 'pages/vanta-authorization.less';
@import 'pages/admin/generate-license.less';
@import 'pages/device-management.less';
-@import 'pages/endpoint-ops.less';
+@import 'pages/observability.less';
@import 'pages/transparency.less';
@import 'pages/press-kit.less';
@import 'pages/software-management.less';
@@ -78,4 +78,6 @@
@import 'pages/start.less';
@import 'pages/deals.less';
@import 'pages/testimonials.less';
+@import 'pages/app-library.less';
+@import 'pages/app-details.less';
diff --git a/website/assets/styles/pages/app-details.less b/website/assets/styles/pages/app-details.less
new file mode 100644
index 0000000000..b4e52a0343
--- /dev/null
+++ b/website/assets/styles/pages/app-details.less
@@ -0,0 +1,418 @@
+#app-details {
+
+ h3 {
+ padding-top: 32px;
+ color: #192147;
+ font-size: 24px;
+ font-weight: 800;
+ line-height: 120%;
+ margin-bottom: 0px;
+ }
+
+ p {
+ color: #515774;
+ font-size: 16px;
+ font-weight: 400;
+ line-height: 150%;
+ }
+
+ [purpose='page-container'] {
+ padding: 64px 64px 32px 64px;
+ }
+ [purpose='page-content'] {
+ margin-left: auto;
+ margin-right: auto;
+ max-width: 1072px;
+ }
+
+ [purpose='breadcrumbs-and-search'] {
+ margin-bottom: 64px;
+ max-width: 1072px;
+ font-size: 14px;
+ [purpose='breadcrumbs'] {
+ margin-right: 24px;
+ }
+ [purpose='search'] {
+ // Note: We're using classes here to override the default Docsearch styles;
+ button {
+ width: 100%;
+ cursor: text;
+ margin: 0;
+ }
+ .DocSearch-Button {
+ border-top-left-radius: 6px;
+ border-bottom-left-radius: 6px;
+ border-top-right-radius: 6px;
+ border-bottom-right-radius: 6px;
+ border: 1px solid @core-fleet-black-25;
+ background-color: #FFF;
+ padding: 6px;
+ height: 36px;
+ margin: 0;
+ width: 256px;
+ }
+ .DocSearch-Button:hover {
+ box-shadow: none;
+ border: 1px solid @core-fleet-black-25;
+ color: @core-fleet-black-50;
+ }
+ .DocSearch-Search-Icon {
+ margin-left: 10px;
+ height: 16px;
+ width: 16px;
+ color: @core-fleet-black-50;
+ stroke-width: 3px;
+ }
+ .DocSearch-Button-Keys {
+ display: none;
+ }
+ .input-group:focus-within {
+ border: 1px solid @core-vibrant-blue;
+ }
+ .DocSearch-Button-Placeholder {
+ font-size: 16px;
+ font-weight: 400;
+ padding-left: 12px;
+ }
+ [purpose='disabled-search'] {
+ input {
+ padding-top: 6px;
+ padding-bottom: 6px;
+ border: none;
+ } &::placeholder {
+ font-size: 16px;
+ line-height: 24px;
+ color: #8B8FA2;
+ }
+ .input-group {
+ border-top-left-radius: 6px;
+ border-bottom-left-radius: 6px;
+ border-top-right-radius: 6px;
+ border-bottom-right-radius: 6px;
+ border: 1px solid @core-fleet-black-25;
+ background: #FFF;
+ }
+ .input-group:focus-within {
+ border: 1px solid @core-vibrant-blue;
+ }
+ .form-control {
+ border-radius: 6px;
+ padding: 6px;
+ height: 36px;
+ margin: 0;
+ width: 212px;
+ }
+ .docsearch-input:focus-visible {
+ outline: none;
+ }
+ .ds-input:focus {
+ outline: rgba(0, 0, 0, 0);
+ }
+ .input-group-text {
+ color: @core-fleet-black-50;
+ }
+ .form-control {
+ height: 36px;
+ padding: 0px;
+ font-size: 16px;
+ } &:focus {
+ border: none;
+ }
+ }
+ }
+
+ [purpose='breadcrumbs-category'] {
+ color: #8B8FA2;
+ margin-right: 8px;
+ font-size: 14px;
+ font-weight: 400;
+ line-height: 150%; /* */
+ &:hover {
+ color: #192147;
+ text-decoration: none;
+ }
+ }
+ [purpose='breadcrumbs-title'] {
+ margin-left: 8px;
+ }
+ }
+ [purpose='icon-and-name'] {
+ flex-direction: row;
+ align-items: center;
+
+ }
+ [purpose='app-icon'] {
+ img {
+ height: 80px;
+ }
+ margin-right: 24px;
+ }
+ [purpose='app-name'] {
+ color: #192147;
+ font-size: 32px;
+ font-style: normal;
+ font-weight: 800;
+ line-height: 150%;
+ margin-bottom: 0px;
+ }
+
+ [purpose='app-description'] {
+ color: #515774;
+ font-size: 16px;
+ font-style: normal;
+ font-weight: 400;
+ line-height: 150%;
+ margin-bottom: 0px;
+ padding: 16px 0px 32px 0px;
+ }
+ [purpose='app-details'] {
+ padding-right: 64px;
+ max-width: 800px;
+ width: 100%;
+ p {
+ margin-bottom: 24px;
+ margin-top: 16px;
+ color: #515774;
+ font-size: 16px;
+ font-weight: 400;
+ line-height: 150%;
+ }
+ a {
+ color: #515774;
+ text-decoration: underline;
+ text-underline-offset: 1px;
+ &:hover {
+ color: #515774;
+ }
+ }
+ [purpose='platform-and-version'] {
+ p {
+ color: #8B8FA2;
+ font-size: 16px;
+ font-weight: 400;
+ line-height: 150%;
+ margin-bottom: 0px;
+ margin-top: 0px;
+ }
+ }
+
+ }
+ [purpose='app-uninstall'] {
+ pre {
+ height: 141px;
+ }
+ }
+ [purpose='app-install'] {
+ ol {
+ counter-reset: custom-counter;
+ list-style-type: none;
+ padding-inline-start: 0px;
+ padding: 0;
+ margin-top: 16px;
+ margin-bottom: 32px;
+ ul > li {
+ text-indent: 0px;
+ margin-left: 0px;
+ }
+ > li {
+ counter-increment: custom-counter;
+ margin-left: 36px;
+ text-indent: -36px;
+ padding-left: 0px;
+ margin-bottom: 16px;
+ code:not(.nohighlight):not(.mermaid) {
+ display: inline;
+ }
+ p {
+ display: inline;
+ margin-bottom: 0px;
+ }
+ blockquote {
+ text-indent: 0px;
+ }
+ }
+ > li::before {
+ content: counter(custom-counter);
+ background-color: #E2E4EA;
+ width: 24px;
+ font-size: 13px;
+ display: inline-block;
+ border-radius: 50%;
+ margin-right: 10px;
+ padding: 2px 4px;
+ text-align: center;
+ line-height: 20px;
+ text-indent: 0px;
+ }
+ }
+ }
+ [purpose='app-check'] {
+ padding-bottom: 24px;
+ }
+
+ [purpose='right-sidebar'] {
+ width: 256px;
+ margin-left: 16px;
+ font-size: 14px;
+ transition-property: transform;
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
+ transition-duration: 500ms;
+ a:not([purpose='edit-button']) {
+ margin-bottom: 8px;
+ display: block;
+ color: #515774;
+ &:hover {
+ text-decoration: none;
+ color: @core-fleet-black;
+ }
+ }
+ }
+ [purpose='docs-links'] {
+ a {
+ display: block;
+ }
+ }
+ [purpose='social-share-buttons'] {
+ padding-bottom: 24px;
+ margin-bottom: 24px;
+ border-bottom: 1px solid #E2E4EA;
+ a {
+ margin-right: 16px;
+ }
+ img {
+ height: 20px;
+ width: 20px;
+ }
+ }
+ [purpose='edit-button'] {
+ margin-top: 24px;
+ img {
+ width: 16px;
+ height: 16px;
+ display: inline;
+ margin-right: 8px;
+ }
+ padding: 6px 8px;
+ display: block;
+ color: @core-fleet-black-75;
+ text-decoration: none;
+ font-size: 14px;
+ line-height: 21px;
+ border-radius: 6px;
+ width: 102px;
+ background: rgba(25, 33, 71, 0.05);
+ &:hover {
+ background-color: rgba(25, 33, 71, 0.1);
+ }
+ &:active {
+ background-color: rgba(25, 33, 71, 0.1);
+ }
+ }
+
+ [purpose='codeblock'] {
+ padding: 0;
+ position: relative;
+ [purpose='copy-button'] {
+ position: absolute;
+ top: 11px;
+ right: 10px;
+ border-radius: 8px;
+ height: 32px;
+ width: 32px;
+ background: url('/images/icon-copy-16x16@2x.png');
+ background-color: #F9FAFC;
+ background-size: 14px 14px;
+ background-position: center;
+ background-repeat: no-repeat;
+ cursor: pointer;
+ &:hover {
+ background-color: #F2F2F5;
+ }
+ &.copied {
+ background: url('/images/icon-copy-clicked-checkmark-32x32@2x.png');
+ background-size: 32px 32px;
+ background-repeat: no-repeat;
+ background-position: center;
+ }
+ }
+ }
+
+ pre {
+ width: 100%;
+ max-width: 100%;
+ padding: 16px 44px 16px 24px;
+ border: 1px solid #E2E4EA;
+ background: #F9FAFC;
+ border-radius: 4px;
+ margin-top: 32px;
+ margin-bottom: 24px;
+ white-space: pre-wrap;
+ word-wrap: break-word;
+ overflow: auto;
+ code {
+ color: #515774;
+ font-family: 'Source Code Pro';
+ font-size: 14px;
+ font-weight: 400;
+ line-height: 150%;
+ background-color: @ui-off-white;
+ border: none;
+ padding: 0;
+ dispaly: block;
+ }
+ }
+
+ @media (max-width: 1200px) {
+
+
+ }
+ @media (max-width: 991px) {
+ [purpose='page-container'] {
+ padding: 32px;
+ }
+ [purpose='app-details'] {
+ padding-right: 0px;
+ max-width: 100%;
+ }
+ [purpose='right-sidebar'] {
+ width: 100%;
+ margin-left: 0px;
+ }
+ [purpose='breadcrumbs-and-search'] {
+ margin-bottom: 32px;
+ }
+ }
+
+ @media (max-width: 768px) {
+ [purpose='breadcrumbs-and-search'] {
+ max-width: 1072px;
+ font-size: 14px;
+ [purpose='breadcrumbs'] {
+ margin-bottom: 24px;
+ }
+ [purpose='search'] {
+ width: 100%;
+ .DocSearch-Button {
+ width: 100%;
+ }
+ }
+ }
+ }
+
+ @media (max-width: 575px) {
+ [purpose='page-container'] {
+ padding: 32px 24px;
+ }
+
+ }
+ @media (max-width: 375px) {
+ [purpose='icon-and-name'] {
+ flex-direction: column;
+ align-items: flex-start;
+
+ }
+
+ }
+
+
+ }
diff --git a/website/assets/styles/pages/app-library.less b/website/assets/styles/pages/app-library.less
new file mode 100644
index 0000000000..0f5ba623ce
--- /dev/null
+++ b/website/assets/styles/pages/app-library.less
@@ -0,0 +1,244 @@
+#app-library {
+
+ [purpose='page-container'] {
+ padding: 64px;
+ }
+ [purpose='page-content'] {
+ max-width: 1072px;
+ margin-left: auto;
+ margin-right: auto;
+ }
+ [purpose='search-and-headline'] {
+ margin-bottom: 64px;
+ }
+ [purpose='page-title'] {
+ max-width: 662px;
+ margin-right: 16px;
+ h1 {
+ margin-bottom: 16px;
+ font-size: 32px;
+ font-weight: 800;
+ line-height: 38.4px; /* 120% */
+ }
+ p {
+ margin-bottom: 0px;
+ }
+ }
+
+ [purpose='request-button'] {
+ display: flex;
+ padding: 8px 16px;
+ justify-content: center;
+ align-items: center;
+ border-radius: 16px;
+ background: #F9FAFC;
+ color: #515774;
+ text-align: center;
+ height: 49px;
+ font-size: 14px;
+ font-weight: 700;
+ line-height: 150%;
+ &:hover {
+ text-decoration: none;
+ }
+ }
+
+ [purpose='app-search'] {
+
+ // Note: We're using classes here to override the default Docsearch styles;
+ button {
+ width: 100%;
+ cursor: text;
+ margin: 0;
+ }
+ .DocSearch-Button {
+ border-top-left-radius: 6px;
+ border-bottom-left-radius: 6px;
+ border-top-right-radius: 6px;
+ border-bottom-right-radius: 6px;
+ border: 1px solid @core-fleet-black-25;
+ background-color: #FFF;
+ padding: 8px 15px;
+ height: 36px;
+ margin: 0;
+ width: 221px;
+ }
+ .DocSearch-Button:hover {
+ box-shadow: none;
+ border: 1px solid @core-fleet-black-25;
+ color: @core-fleet-black-50;
+ }
+ .DocSearch-Search-Icon {
+ margin-left: 0px;
+ margin-right: 8px;
+ height: 16px;
+ width: 16px;
+ color: @core-fleet-black-50;
+ stroke-width: 3px;
+ }
+ .DocSearch-Button-Keys {
+ display: none;
+ }
+ .input-group:focus-within {
+ border: 1px solid @core-vibrant-blue;
+ }
+ .DocSearch-Button-Placeholder {
+ font-size: 16px;
+ line-height: 16px;
+ font-weight: 400;
+ padding-left: 0px;
+ }
+ [purpose='disabled-search'] {
+ input {
+ padding-top: 6px;
+ padding-bottom: 6px;
+ border: none;
+ } &::placeholder {
+ font-size: 16px;
+ line-height: 24px;
+ color: #8B8FA2;
+ }
+ .input-group {
+ border-top-left-radius: 6px;
+ border-bottom-left-radius: 6px;
+ border-top-right-radius: 6px;
+ border-bottom-right-radius: 6px;
+ border: 1px solid @core-fleet-black-25;
+ background: #FFF;
+ }
+ .input-group:focus-within {
+ border: 1px solid @core-vibrant-blue;
+ }
+ .form-control {
+ border-radius: 6px;
+ padding: 6px;
+ height: 36px;
+ margin: 0;
+ width: 212px;
+ }
+ .docsearch-input:focus-visible {
+ outline: none;
+ }
+ .ds-input:focus {
+ outline: rgba(0, 0, 0, 0);
+ }
+ .input-group-text {
+ color: @core-fleet-black-50;
+ }
+ .form-control {
+ height: 36px;
+ padding: 0px;
+ font-size: 16px;
+ } &:focus {
+ border: none;
+ }
+ }
+ img {
+ height: 16px;
+ margin-right: 8px;
+ }
+ background: #FFF;
+ &::placeholder {
+ font-size: 16px;
+ color: @core-fleet-black-50;
+ }
+ }
+ [purpose='app-cards'] {
+ column-count: 3;
+ margin-right: -8px;
+ margin-left: -8px;
+ margin-bottom: -8px;
+ margin-top: -8px;
+ }
+
+ [purpose='app-card'] {
+ margin-right: 8px;
+ margin-left: 8px;
+ margin-bottom: 8px;
+ margin-top: 8px;
+ display: flex;
+ height: 92px;
+ min-width: 30%;
+ padding: 16px;
+ align-items: flex-start;
+ gap: 16px;
+ // flex: 1 0 0;
+ border-radius: 8px;
+ border: 1px solid #E2E4EA;
+ background: #FFF;
+ box-shadow: none;
+ &:hover {
+ text-decoration: none;
+ color: unset;
+ box-shadow: 0px 0px 0px 2px rgba(0, 0, 0, 0.03);
+ }
+ &.invisible {
+ height: 0px;
+ border: none;
+ }
+ h4 {
+ color: var(--text-text-brand, #192147);
+
+ /* Title XS */
+ font-family: Inter;
+ font-size: 16px;
+ font-style: normal;
+ font-weight: 800;
+ line-height: 19.2px; /* 120% */
+ margin-bottom: 0px;
+ }
+ p {
+ color: var(--text-text-primary, #515774);
+
+ /* Body SM (FKA Card text) */
+ font-family: Inter;
+ font-size: 14px;
+ font-style: normal;
+ font-weight: 400;
+ line-height: 21px; /* 150% */
+ }
+ }
+ [purpose='app-icon'] {
+ margin-right: 16px;
+ img {
+ height: 60px;
+ }
+ }
+
+ @media (max-width: 991px) {
+ [purpose='page-container'] {
+ padding: 64px 32px;
+ }
+ [purpose='app-card'] {
+ min-width: 40%;
+ &.invisible {
+ display: none;
+ border: none;
+ height: 0px;
+ padding: 0;
+ margin: 0;
+ }
+ }
+ }
+
+ @media (max-width: 768px) {
+ [purpose='page-container'] {
+ padding: 48px 24px;
+ }
+ [purpose='app-search'] {
+ margin-top: 32px;
+ width: 100%;
+ .input-group {
+ width: 100%;
+ }
+ }
+ }
+
+ @media (max-width: 575px) {
+ [purpose='page-container'] {
+ padding: 32px 24px;
+ }
+
+ }
+
+}
diff --git a/website/assets/styles/pages/handbook/basic-handbook.less b/website/assets/styles/pages/handbook/basic-handbook.less
index 431cb9ef60..ca7c09f970 100644
--- a/website/assets/styles/pages/handbook/basic-handbook.less
+++ b/website/assets/styles/pages/handbook/basic-handbook.less
@@ -580,6 +580,7 @@
position: sticky;
bottom: 107px;
overflow-x: hidden;
+ pointer-events: none;
}
[purpose='back-to-top-button'] {
display: inline-block;
@@ -593,6 +594,7 @@
cursor: pointer;
border: 1px solid #E2E4EA;
border-radius: 16px 0px 0px 16px;
+ pointer-events: auto;
p {
color: #515774;
font-size: 11px;
diff --git a/website/assets/styles/pages/homepage.less b/website/assets/styles/pages/homepage.less
index 38c1fa16ca..e00c3c2565 100644
--- a/website/assets/styles/pages/homepage.less
+++ b/website/assets/styles/pages/homepage.less
@@ -85,11 +85,12 @@
flex-direction: row;
justify-content: center;
margin-top: 64px;
+ margin-bottom: 64px;
h4 {
color: #515774;
text-align: center;
- /* Body LG (bold) */
+ text-transform: unset;
font-family: Inter;
font-size: 18px;
font-style: normal;
@@ -115,26 +116,36 @@
// flex-direction: column;
// align-items: center;
// }
+ [purpose='statistics-column'] {
+ display: flex;
+ flex-direction: row;
+ }
[purpose='customers'] {
border-right: 1px solid #E2E4EA;
display: flex;
- padding: 8px 64px;
+ padding: 8px 48px;
flex-direction: column;
align-items: center;
}
[purpose='devices'] {
border-right: 1px solid #E2E4EA;
display: flex;
- padding: 8px 64px;
+ padding: 8px 48px;
flex-direction: column;
align-items: center;
}
[purpose='countries'] {
display: flex;
- padding: 8px 64px;
+ padding: 8px 48px;
+ flex-direction: column;
+ align-items: center;
+ border-right: 1px solid #E2E4EA;
+ }
+ [purpose='response-time'] {
+ display: flex;
+ padding: 8px 48px;
flex-direction: column;
align-items: center;
-
}
}
@@ -1099,6 +1110,31 @@
[purpose='integrations-section'] {
margin-top: 80px;
}
+ [purpose='statistics'] {
+ [purpose='statistics-column'] {
+ display: flex;
+ flex-direction: column;
+ width: 227px;
+ }
+ [purpose='countries'] {
+ border-right: none;
+ padding: 16px 32px;
+
+ }
+ [purpose='customers'] {
+ padding: 16px 32px;
+ }
+ [purpose='devices'] {
+ padding: 16px 32px;
+ }
+ [purpose='response-time'] {
+ padding: 16px 32px;
+ }
+
+ }
+
+
+
[purpose='homepage-text-block'] {
margin-bottom: 80px;
p {
@@ -1399,12 +1435,13 @@
max-width: fit-content;
margin-left: auto;
margin-right: auto;
- margin-top: 32px;
+ margin-top: 48px;
+ margin-bottom: 48px;
h4 {
margin-bottom: 0px;
}
[purpose='customers'] {
- padding: 0px 64px 24px 64px;
+ padding: 0px 24px 24px 24px;
border-right: none;
}
[purpose='devices'] {
@@ -1413,13 +1450,15 @@
padding: 24px;
border-right: none;
}
-
+ [purpose='response-time'] {
+ padding: 24px;
+ border-bottom: 1px solid #E2E4EA;
+ }
[purpose='countries'] {
- padding: 24px 64px 0px 64px;
+ order: 1;
+ padding: 24px 24px 0px 24px;
border-right: none;
}
-
-
}
[purpose='hero-background-image'] {
background-size: auto 320px;
@@ -1606,6 +1645,7 @@
font-size: 12px;
}
+
[purpose='truncated-vulnerability-management-text'] {
display: none;
}
@@ -1624,6 +1664,11 @@
font-size: 16px;
}
}
+ [purpose='statistics'] {
+ margin-top: 32px;
+ margin-bottom: 32px;
+ }
+
[purpose='endpoints-banner'] {
[purpose='endpoint-banner-text'] {
padding-left: 24px;
diff --git a/website/assets/styles/pages/endpoint-ops.less b/website/assets/styles/pages/observability.less
similarity index 99%
rename from website/assets/styles/pages/endpoint-ops.less
rename to website/assets/styles/pages/observability.less
index a2459aa9eb..b1a29e3dac 100644
--- a/website/assets/styles/pages/endpoint-ops.less
+++ b/website/assets/styles/pages/observability.less
@@ -1,4 +1,4 @@
-#endpoint-ops-page {
+#observability-page {
@heading-line-height: 120%;
@text-line-height: 150%;
diff --git a/website/assets/styles/pages/software-management.less b/website/assets/styles/pages/software-management.less
index 32b96544be..c8ae0e0f3f 100644
--- a/website/assets/styles/pages/software-management.less
+++ b/website/assets/styles/pages/software-management.less
@@ -57,6 +57,7 @@
padding-bottom: 32px;
}
[purpose='button-row'] {
+ flex-direction: row;
[purpose='contact-button'] {
display: flex;
height: 36px;
@@ -218,35 +219,43 @@
padding-bottom: 64px;
padding-top: 32px;
text-align: center;
- [purpose='testimonial-image'] {
- height: 48px;
- margin-bottom: 5px;
- }
- [purpose='testimonial-text'] {
+ }
+ [purpose='it-testimonial'] {
+ max-width: 524px;
+ margin-left: auto;
+ margin-right: auto;
+ padding-bottom: 32px;
+ padding-top: 32px;
+ text-align: center;
+ }
+ [purpose='testimonial-image'] {
+ height: 48px;
+ margin-bottom: 5px;
+ }
+ [purpose='testimonial-text'] {
+ color: @core-fleet-black-75;
+ text-align: center;
+ font-size: 18px;
+ font-style: italic;
+ font-weight: 400;
+ line-height: @text-lineheight;
+ margin-bottom: 24px;
+ }
+ [purpose='testimonial-attribution'] {
+ [purpose='name'] {
color: @core-fleet-black-75;
text-align: center;
- font-size: 18px;
- font-style: italic;
+ font-size: 12px;
+ font-weight: 700;
+ line-height: @text-lineheight; /* 150% */
+ margin-bottom: 0px;
+ }
+ [purpose='job-title'] {
+ color: @core-fleet-black-75;
+ margin-bottom: 0px;
+ font-size: 12px;
font-weight: 400;
line-height: @text-lineheight;
- margin-bottom: 24px;
- }
- [purpose='testimonial-attribution'] {
- [purpose='name'] {
- color: @core-fleet-black-75;
- text-align: center;
- font-size: 12px;
- font-weight: 700;
- line-height: @text-lineheight; /* 150% */
- margin-bottom: 0px;
- }
- [purpose='job-title'] {
- color: @core-fleet-black-75;
- margin-bottom: 0px;
- font-size: 12px;
- font-weight: 400;
- line-height: @text-lineheight;
- }
}
}
@@ -471,6 +480,15 @@
padding-bottom: 32px;
padding-top: 0px;
}
+ [purpose='button-row'] {
+ flex-direction: column;
+ align-items: center;
+ [purpose='contact-button'] {
+ margin-bottom: 12px;
+ width: 100%;
+ margin-right: 0px;
+ }
+ }
[purpose='section-heading'] {
padding: 40px 0px;
}
diff --git a/website/config/custom.js b/website/config/custom.js
index 4e0331a1ff..6b04fd379d 100644
--- a/website/config/custom.js
+++ b/website/config/custom.js
@@ -220,18 +220,17 @@ module.exports.custom = {
// Articles and release notes
'CHANGELOG.md': ['mikermcneil', 'noahtalerman', 'lukeheath'],
- 'articles': ['mike-j-thomas', 'mike-j-thomas', 'eashaw', 'mikermcneil', 'rachaelshaw'],
- 'website/assets/images/articles': ['mike-j-thomas', 'mike-j-thomas', 'eashaw', 'mikermcneil'],
+ 'articles': ['mike-j-thomas', 'eashaw', 'mikermcneil', 'rachaelshaw'],
+ 'website/assets/images/articles': ['mike-j-thomas', 'eashaw', 'mikermcneil'],
// Website (fleetdm.com)
'website': ['mikermcneil', 'eashaw'],// (default for website)
- 'website/views': 'eashaw',
+ 'website/views': ['eashaw', 'mike-j-thomas'],
'website/generators': 'eashaw',
'website/assets': 'eashaw',
'website/package.json': 'eashaw',
'website/config/routes.js': ['eashaw', 'mike-j-thomas'],// (for managing website URLs)
'website/config/policies.js': ['eashaw', 'mikermcneil'],// (for adding new pages and managing permissions)
- 'website/api/controllers/imagine': ['eashaw', 'mike-j-thomas'],// landing pages
// 🫧 Vulnerability dashboard
'ee/vulnerability-dashboard': ['eashaw', 'mikermcneil'],// (catch-all)
diff --git a/website/config/policies.js b/website/config/policies.js
index 1681d1d645..00c0dbecbb 100644
--- a/website/config/policies.js
+++ b/website/config/policies.js
@@ -45,7 +45,7 @@ module.exports.policies = {
'deliver-mdm-beta-signup': true,
'deliver-apple-csr': true,
'download-rss-feed': true,
- 'view-endpoint-ops': true,
+ 'view-observability': true,
'view-software-management': true,
'deliver-mdm-demo-email': true,
'view-support': true,
@@ -58,4 +58,6 @@ module.exports.policies = {
'deliver-deal-registration-submission': true,
'get-est-device-certificate': true,
'view-testimonials': true,
+ 'view-app-library': true,
+ 'view-app-details': true,
};
diff --git a/website/config/routes.js b/website/config/routes.js
index 96f7701611..ab38d48a1d 100644
--- a/website/config/routes.js
+++ b/website/config/routes.js
@@ -136,6 +136,7 @@ module.exports.routes = {
pageDescriptionForMeta: 'View and edit information about your Fleet Premium license.',
}
},
+ 'GET /customers/update-subscription': { action: 'customers/redirect-to-stripe-billing-portal' },
'GET /customers/forgot-password': {
action: 'entrance/view-forgot-password',
locals: {
@@ -227,10 +228,10 @@ module.exports.routes = {
}
},
- 'GET /endpoint-ops': {
- action: 'view-endpoint-ops',
+ 'GET /observability': {
+ action: 'view-observability',
locals: {
- pageTitleForMeta: 'Endpoint ops',
+ pageTitleForMeta: 'Observability',
pageDescriptionForMeta: 'Pulse check anything, build reports, and ship data to any platform with Fleet.',
currentSection: 'platform',
}
@@ -292,14 +293,26 @@ module.exports.routes = {
}
},
- 'GET /customer-stories': {
+ 'GET /testimonials': {
action: 'view-testimonials',
locals: {
- pageTitleForMeta: 'Customer stories',
- pageDescriptionForMeta: 'See what people are saying about Fleet'
+ pageTitleForMeta: 'What people are saying',
+ pageDescriptionForMeta: 'See what people are saying about Fleet.'
}
},
+ 'GET /app-library': {
+ action: 'view-app-library',
+ locals: {
+ pageTitleForMeta: 'App library',
+ pageDescriptionForMeta: 'Install Fleet-maintained apps on your hosts without the need for additional configuration. Activate self-service for your end users.',
+ }
+ },
+
+ 'GET /app-library/:appIdentifier': {
+ action: 'view-app-details',// Meta title and description set in view action
+ },
+
// ╦ ╔═╗╔═╗╔═╗╔═╗╦ ╦ ╦═╗╔═╗╔╦╗╦╦═╗╔═╗╔═╗╔╦╗╔═╗
// ║ ║╣ ║ ╦╠═╣║ ╚╦╝ ╠╦╝║╣ ║║║╠╦╝║╣ ║ ║ ╚═╗
// ╩═╝╚═╝╚═╝╩ ╩╚═╝ ╩ ╩╚═╚═╝═╩╝╩╩╚═╚═╝╚═╝ ╩ ╚═╝
@@ -318,6 +331,7 @@ module.exports.routes = {
// ```
// 'GET /docs/using-fleet/learn-how-to-use-fleet': '/docs/using-fleet/fleet-for-beginners',
// ```
+ 'GET /customer-stories': '/testimonials',
'GET /try': '/get-started',
'GET /docs/deploying/fleet-public-load-testing': '/docs/deploying/load-testing',
'GET /handbook/customer-experience': '/handbook/customers',
@@ -508,7 +522,6 @@ module.exports.routes = {
//
// For example, a clever user might try to visit fleetdm.com/documentation, not knowing that Fleet's website
// puts this kind of thing under /docs, NOT /documentation. These "convenience" redirects are to help them out.
- 'GET /testimonials': '/customer-stories',
'GET /admin': '/admin/email-preview',
'GET /renew': 'https://calendly.com/zayhanlon/fleet-renewal-discussion',
'GET /documentation': '/docs',
@@ -539,11 +552,12 @@ module.exports.routes = {
'GET /endpoint-operations': '/endpoint-ops',// « just in case we type it the wrong way
'GET /example-dep-profile': 'https://github.com/fleetdm/fleet/blob/main/it-and-security/lib/automatic-enrollment.dep.json',
'GET /vulnerability-management': (req,res)=> { let originalQueryString = req.url.match(/\?(.+)$/) ? '?'+req.url.match(/\?(.+)$/)[1] : ''; return res.redirect(301, sails.config.custom.baseUrl+'/software-management'+originalQueryString);},
+ 'GET /endpoint-ops': (req,res)=> { let originalQueryString = req.url.match(/\?(.+)$/) ? '?'+req.url.match(/\?(.+)$/)[1] : ''; return res.redirect(301, sails.config.custom.baseUrl+'/observability'+originalQueryString);},
// Shortlinks for texting friends, radio ads, etc
'GET /mdm': '/device-management?utm_content=mdm',// « alias for radio ad
- 'GET /it': '/endpoint-ops?utm_content=eo-it',
- 'GET /seceng': '/endpoint-ops?utm_content=eo-security',
+ 'GET /it': '/observability?utm_content=eo-it',
+ 'GET /seceng': '/observability?utm_content=eo-security',
'GET /vm': '/software-management?utm_content=vm',
// Fleet UI
@@ -596,6 +610,7 @@ module.exports.routes = {
'GET /learn-more-about/policy-automation-run-script': '/guides/policy-automation-run-script',
'GET /learn-more-about/installing-fleetctl': '/guides/fleetctl#installing-fleetctl',
'GET /learn-more-about/mdm-disk-encryption': '/guides/enforce-disk-encryption',
+ 'GET /learn-more-about/encrypt-linux-device': '/guides/linux-disk-encryption-end-user',
'GET /contribute-to/policies': 'https://github.com/fleetdm/fleet/edit/main/docs/01-Using-Fleet/standard-query-library/standard-query-library.yml',
// Sitemap
@@ -675,4 +690,5 @@ module.exports.routes = {
'POST /api/v1/account/update-start-cta-visibility': { action: 'account/update-start-cta-visibility' },
'POST /api/v1/deliver-deal-registration-submission': { action: 'deliver-deal-registration-submission' },
'/api/v1/unsubscribe-from-marketing-emails': { action: 'unsubscribe-from-marketing-emails' },
+ 'POST /api/v1/customers/get-stripe-checkout-session-url': { action: 'customers/get-stripe-checkout-session-url' },
};
diff --git a/website/package.json b/website/package.json
index 23408ba0f6..d6029c1187 100644
--- a/website/package.json
+++ b/website/package.json
@@ -17,7 +17,8 @@
"sails-hook-organics": "^3.0.0",
"sails-hook-orm": "^4.0.3",
"sails-hook-sockets": "^3.0.0",
- "sails-postgresql": "^5.0.1"
+ "sails-postgresql": "^5.0.1",
+ "stripe": "17.3.1"
},
"devDependencies": {
"eslint": "5.16.0",
diff --git a/website/scripts/build-static-content.js b/website/scripts/build-static-content.js
index 75d0d64043..d14d4f8e8b 100644
--- a/website/scripts/build-static-content.js
+++ b/website/scripts/build-static-content.js
@@ -1116,7 +1116,48 @@ module.exports = {
// Add the rituals dictionary to builtStaticContent.rituals
builtStaticContent.rituals = rituals;
},
+ //
+ // █████╗ ██████╗ ██████╗ ██╗ ██╗██████╗ ██████╗ █████╗ ██████╗ ██╗ ██╗
+ // ██╔══██╗██╔══██╗██╔══██╗ ██║ ██║██╔══██╗██╔══██╗██╔══██╗██╔══██╗╚██╗ ██╔╝
+ // ███████║██████╔╝██████╔╝ ██║ ██║██████╔╝██████╔╝███████║██████╔╝ ╚████╔╝
+ // ██╔══██║██╔═══╝ ██╔═══╝ ██║ ██║██╔══██╗██╔══██╗██╔══██║██╔══██╗ ╚██╔╝
+ // ██║ ██║██║ ██║ ███████╗██║██████╔╝██║ ██║██║ ██║██║ ██║ ██║
+ // ╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═╝╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝
+ //
+ async()=>{
+ let appLibrary = [];
+ // Get app library json
+ let appsJsonData = await sails.helpers.fs.readJson(path.join(topLvlRepoPath, '/server/mdm/maintainedapps/apps.json'));
+ // Then for each item in the json, build a configuration object to add to the sails.builtStaticContent.appLibrary array.
+ await sails.helpers.flow.simultaneouslyForEach(appsJsonData, async(app)=>{
+ let appInformation = {
+ identifier: app.identifier,
+ bundleIdentifier: app.bundle_identifier,
+ installerFormat: app.installer_format,
+ };
+ // Note: This method of getting information about the apps will be out of date until the JSON files in the /server/mdm/maintainedapps/testdata/ folder are updated.
+ let detailedInformationAboutThisApp = await sails.helpers.fs.readJson(path.join(topLvlRepoPath, '/server/mdm/maintainedapps/testdata/'+app.identifier+'.json'))
+ .intercept('doesNotExist', ()=>{
+ return new Error(`Could not build app library configuration from testdata folder. When attempting to read a JSON configuration file for ${app.identifier}, no file was found at ${path.join(topLvlRepoPath, '/server/mdm/maintainedapps/testdata/'+app.identifier+'.json. Was it moved?')}.`);
+ });
+ // Grab the latest information about these apps from the Homebrew API.
+ // let detailedInformationAboutThisApp = await sails.helpers.http.get(`https://formulae.brew.sh/api/cask/${app.identifier}.json`)
+ // .intercept((error)=>{
+ // return new Error(`Could not build app library configuration. When attempting to send a request to the homebrew API to get the latest information about ${app.identifier}, an error occured. Full error: ${util.inspect(error, {depth: null})}`);
+ // });
+ // let scriptToUninstallThisApp = await sails.helpers.fs.read(path.join(topLvlRepoPath, `/server/mdm/maintainedapps/testdata/scripts/${app.identifier}_uninstall.golden.sh`))
+ // .intercept('doesNotExist', ()=>{
+ // return new Error(`Could not build app library configuration from testdata folder. When attempting to read an uninstall script for ${app.identifier}, no file was found at ${path.join(topLvlRepoPath, '/server/mdm/maintainedapps/testdata/scripts/'+app.identifier+'_uninstall.golden.sh. Was it moved?')}.`);
+ // });
+ // appInformation.uninstallScript = scriptToUninstallThisApp;
+ appInformation.version = detailedInformationAboutThisApp.version.split(',')[0];
+ appInformation.description = detailedInformationAboutThisApp.desc;
+ appInformation.name = detailedInformationAboutThisApp.name[0];
+ appLibrary.push(appInformation);
+ });
+ builtStaticContent.appLibrary = appLibrary;
+ },
]);
// ██████╗ ███████╗██████╗ ██╗ █████╗ ██████╗███████╗ ███████╗ █████╗ ██╗██╗ ███████╗██████╗ ██████╗
// ██╔══██╗██╔════╝██╔══██╗██║ ██╔══██╗██╔════╝██╔════╝ ██╔════╝██╔══██╗██║██║ ██╔════╝██╔══██╗██╔════╝██╗
diff --git a/website/views/layouts/layout.ejs b/website/views/layouts/layout.ejs
index e33ef86293..1ec367716a 100644
--- a/website/views/layouts/layout.ejs
+++ b/website/views/layouts/layout.ejs
@@ -159,7 +159,7 @@
Multi platform
@@ -169,6 +169,7 @@
Get started
Built-in checks
Raw data
+ App library
Tutorials & guides
API
SUPPORT
@@ -219,7 +220,7 @@
Multi platform
@@ -230,6 +231,7 @@
Get started
Built-in checks
Raw data
+ App library
Tutorials & guides
API
@@ -308,7 +310,7 @@
Multi platform
Device management
-
Observability
+
Observability
Software management
Integrations
Pricing
@@ -467,6 +469,8 @@
+
+
@@ -477,7 +481,6 @@
-
@@ -490,6 +493,7 @@
+
diff --git a/website/views/pages/app-details.ejs b/website/views/pages/app-details.ejs
new file mode 100644
index 0000000000..3e0d3cd1f4
--- /dev/null
+++ b/website/views/pages/app-details.ejs
@@ -0,0 +1,88 @@
+
+
+
+
+
+
+
+ <%- thisApp.name %>
+
+
+
+
+
+
+
+
+
+
<%- thisApp.name %>
+
+
macOS | <%- thisApp.version %>
+
+
+
+
<%- thisApp.description %>
+
+
Self-service install
+
To install <%- thisApp.name %> on your work computer:
+
+ Navigate to the Fleet Desktop icon in the OS menu bar and select My device .
+ From the Self-service tab, navigate to <%- thisApp.name %> and click Install .
+
+
Don’t see <%- thisApp.name %> or the Fleet Desktop icon? Send a link to this page to your IT team.
+
+
+
+
Is <%- thisApp.name %> up to date?
+
Run this query in Fleet to find old versions of 1Password across all your computers:
+
+
+
SELECT 1 FROM apps WHERE bundle_identifier = '<%= thisApp.bundleIdentifier %>' AND bundle_short_version <= '<%- thisApp.version %>';
+
+
+
+
+
+
+
+
+<%- /* Expose server-rendered data as window.SAILS_LOCALS :: */ exposeLocalsToBrowser() %>
diff --git a/website/views/pages/app-library.ejs b/website/views/pages/app-library.ejs
new file mode 100644
index 0000000000..55b705546b
--- /dev/null
+++ b/website/views/pages/app-library.ejs
@@ -0,0 +1,68 @@
+
+
+
+
+
+
App library
+
Install Fleet-maintained apps on your hosts without the need for additional configuration. Activate self-service for your end users.
+
+
+
+
+
{{allApps.length}} and counting....
+
+
+
+
+
+
+<%- /* Expose server-rendered data as window.SAILS_LOCALS :: */ exposeLocalsToBrowser() %>
diff --git a/website/views/pages/articles/basic-article.ejs b/website/views/pages/articles/basic-article.ejs
index 43af2b45c1..20048a7f4e 100644
--- a/website/views/pages/articles/basic-article.ejs
+++ b/website/views/pages/articles/basic-article.ejs
@@ -61,7 +61,7 @@
Docs
REST API
Guides
-
Talk to us
+
Talk to an engineer
diff --git a/website/views/pages/contact.ejs b/website/views/pages/contact.ejs
index 628bb4a354..8c4ac9994e 100644
--- a/website/views/pages/contact.ejs
+++ b/website/views/pages/contact.ejs
@@ -7,7 +7,7 @@
Schedule a personalized demo for your team and get support or training.
Schedule a personalized demo, or ask us anything. We’d love to chat.
-
Talk to us
+
Talk to an engineer
Send a message
diff --git a/website/views/pages/customers/dashboard.ejs b/website/views/pages/customers/dashboard.ejs
index aac4365721..a7f8830082 100644
--- a/website/views/pages/customers/dashboard.ejs
+++ b/website/views/pages/customers/dashboard.ejs
@@ -52,7 +52,7 @@
Your details
-
+
Organization:
@@ -85,19 +85,14 @@
Billing and payment
-
-
-
-
-
{{me.billingCardBrand}} ending in {{me.billingCardLast4}}
-
-
+
{{thisSubscription.numberOfHosts}} devices @ ${{thisSubscription.subscriptionPrice / thisSubscription.numberOfHosts / 12}}.00/device/month
Billed annually at ${{thisSubscription.subscriptionPrice}}.00/yr
-
Next payment on
+
Next payment on
+
Your subscription will expire on
@@ -106,7 +101,7 @@
-
Contact us to change your number of devices, or to cancel your subscription.
+
Click here to change your number of devices, or to cancel your subscription.
@@ -117,7 +112,7 @@
-
Your subscription will expire on
+
Your subscription ended on
diff --git a/website/views/pages/customers/new-license.ejs b/website/views/pages/customers/new-license.ejs
index 55ee148347..5d5dcb3cdb 100644
--- a/website/views/pages/customers/new-license.ejs
+++ b/website/views/pages/customers/new-license.ejs
@@ -43,35 +43,7 @@
Billing information
-
-
- Billing Card
-
-
-
+
diff --git a/website/views/pages/device-management.ejs b/website/views/pages/device-management.ejs
index 62aa8ddc2a..a5cfd2aaf4 100644
--- a/website/views/pages/device-management.ejs
+++ b/website/views/pages/device-management.ejs
@@ -29,7 +29,7 @@
@@ -510,8 +510,7 @@
<%/* End of page gradient */%>
-
Who else uses Fleet?
- Empowering <%= ['vm', 'eo-security'].includes(primaryBuyingSituation) ? 'security and IT' : 'IT' %> teams
+ What people are saying
@@ -524,7 +523,7 @@
Device management (MDM)
Your easiest MDM migration
diff --git a/website/views/pages/docs/basic-documentation.ejs b/website/views/pages/docs/basic-documentation.ejs
index ae81fb56d2..10b4595701 100644
--- a/website/views/pages/docs/basic-documentation.ejs
+++ b/website/views/pages/docs/basic-documentation.ejs
@@ -112,6 +112,7 @@
Built-in checks
Raw data
+ App library
Release notes
Contributing
Support
diff --git a/website/views/pages/homepage.ejs b/website/views/pages/homepage.ejs
index 6e89d9095d..68ce46c347 100644
--- a/website/views/pages/homepage.ejs
+++ b/website/views/pages/homepage.ejs
@@ -9,7 +9,7 @@
<%- partial('../partials/primary-tagline.partial.ejs') %>
Replace the sprawl with <%= primaryBuyingSituation === 'vm'? 'secure, open-source reporting that works the way you want' : primaryBuyingSituation === 'eo-security'? 'open-source endpoint observability for every platform' : 'a modern device management platform that works the way you want' %>.
-
Learn how
+
Learn how
What people are saying