-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add node-problem-detector Signed-off-by: Furkan <[email protected]> Co-authored-by: Batuhan <[email protected]> * refactor tests Signed-off-by: Batuhan Apaydin <[email protected]> --------- Signed-off-by: Furkan <[email protected]> Signed-off-by: Batuhan Apaydin <[email protected]> Co-authored-by: Batuhan <[email protected]>
- Loading branch information
1 parent
05954b7
commit 3bcc00a
Showing
7 changed files
with
181 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<!--monopod:start--> | ||
# node-problem-detector | ||
| | | | ||
| - | - | | ||
| **Status** | stable | | ||
| **OCI Reference** | `cgr.dev/chainguard/node-problem-detector` | | ||
|
||
|
||
* [View Image in Chainguard Academy](https://edu.chainguard.dev/chainguard/chainguard-images/reference/node-problem-detector/overview/) | ||
* [View Image Catalog](https://console.enforce.dev/images/catalog) for a full list of available tags. | ||
*[Contact Chainguard](https://www.chainguard.dev/chainguard-images) for enterprise support, SLAs, and access to older tags.* | ||
|
||
--- | ||
<!--monopod:end--> | ||
|
||
[node-problem-detector](https://github.com/kubernetes/node-problem-detector) aims to make various node problems visible to the upstream layers in the cluster management stack. | ||
|
||
## Get It! | ||
|
||
The image is available on `cgr.dev`: | ||
|
||
``` | ||
docker pull cgr.dev/chainguard/node-problem-detector | ||
``` | ||
|
||
## Usage | ||
|
||
Install via `helm` using the upstream source shown below: | ||
|
||
```bash | ||
helm repo add deliveryhero https://charts.deliveryhero.io/ | ||
helm upgrade --install npd deliveryhero/node-problem-detector \ | ||
--namespace node-problem-detector \ | ||
--create-namespace \ | ||
--set image.repository=cgr.dev/chainguard/node-problem-detector \ | ||
--set image.tag=latest | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
contents: | ||
packages: | ||
- node-problem-detector | ||
- node-problem-detector-compat | ||
- health-checker | ||
- log-counter | ||
|
||
accounts: | ||
groups: | ||
- groupname: nonroot | ||
gid: 65532 | ||
users: | ||
- username: nonroot | ||
uid: 65532 | ||
gid: 65532 | ||
run-as: 0 | ||
|
||
paths: | ||
- path: /config | ||
type: directory | ||
uid: 65532 | ||
gid: 65532 | ||
permissions: 0o777 | ||
recursive: true | ||
- path: /custom-config | ||
type: directory | ||
uid: 65532 | ||
gid: 65532 | ||
permissions: 0o777 | ||
recursive: true | ||
- path: /var/log | ||
type: directory | ||
uid: 65532 | ||
gid: 65532 | ||
permissions: 0o777 | ||
recursive: true | ||
- path: /dev | ||
type: directory | ||
uid: 65532 | ||
gid: 65532 | ||
permissions: 0o777 | ||
recursive: true | ||
|
||
entrypoint: | ||
command: /usr/bin/node-problem-detector | ||
cmd: --config.system-log-monitor=/config/kernel-monitor.json | ||
|
||
annotations: | ||
"org.opencontainers.image.authors": "Chainguard Team https://www.chainguard.dev/" | ||
"org.opencontainers.image.url": https://edu.chainguard.dev/chainguard/chainguard-images/reference/node-problem-detector/ | ||
"org.opencontainers.image.source": https://github.com/chainguard-images/images/tree/main/images/node-problem-detector |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
versions: | ||
- apko: | ||
config: configs/latest.apko.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
terraform { | ||
required_providers { | ||
apko = { source = "chainguard-dev/apko" } | ||
oci = { source = "chainguard-dev/oci" } | ||
} | ||
} | ||
|
||
variable "target_repository" { | ||
description = "The docker repo into which the image and attestations should be published." | ||
} | ||
|
||
module "latest" { | ||
source = "../../tflib/publisher" | ||
target_repository = var.target_repository | ||
config = file("${path.module}/configs/latest.apko.yaml") | ||
} | ||
|
||
module "dev" { source = "../../tflib/dev-subvariant" } | ||
|
||
module "latest-dev" { | ||
source = "../../tflib/publisher" | ||
|
||
target_repository = var.target_repository | ||
config = jsonencode(module.latest.config) | ||
} | ||
|
||
module "version-tags" { | ||
source = "../../tflib/version-tags" | ||
package = "node-problem-detector" | ||
config = module.latest.config | ||
} | ||
|
||
module "test-latest" { | ||
source = "./tests" | ||
digest = module.latest.image_ref | ||
} | ||
|
||
module "test-latest-dev" { | ||
source = "./tests" | ||
digest = module.latest-dev.image_ref | ||
} | ||
|
||
module "tagger" { | ||
source = "../../tflib/tagger" | ||
|
||
depends_on = [ | ||
module.test-latest, | ||
module.test-latest-dev, | ||
] | ||
|
||
tags = merge( | ||
{ for t in toset(concat(["latest"], module.version-tags.tag_list)) : t => module.latest.image_ref }, | ||
{ for t in toset(concat(["latest"], module.version-tags.tag_list)) : "${t}-dev" => module.latest-dev.image_ref }, | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
terraform { | ||
required_providers { | ||
oci = { source = "chainguard-dev/oci" } | ||
} | ||
} | ||
|
||
variable "digest" { | ||
description = "The image digest to run tests over." | ||
} | ||
|
||
data "oci_string" "ref" { input = var.digest } | ||
|
||
resource "random_pet" "suffix" {} | ||
|
||
resource "helm_release" "node-problem-detector" { | ||
name = "npd-${random_pet.suffix.id}" | ||
repository = "https://charts.deliveryhero.io/" | ||
chart = "node-problem-detector" | ||
namespace = "npd-${random_pet.suffix.id}" | ||
create_namespace = true | ||
|
||
values = [jsonencode({ | ||
image = { | ||
repository = data.oci_string.ref.registry_repo | ||
tag = data.oci_string.ref.pseudo_tag | ||
} | ||
})] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters