Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for deployment with kustomize #118

Merged
merged 4 commits into from
Jun 17, 2024
Merged

Add support for deployment with kustomize #118

merged 4 commits into from
Jun 17, 2024

Conversation

drmorr0
Copy link
Contributor

@drmorr0 drmorr0 commented Jun 17, 2024

  • I certify that this PR does not contain any code that has been generated with GitHub Copilot or any other AI-based code generation tool, in accordance with this project's policies.

Description

Add kustomize-able files in k8s/kustomize

Testing done

  • Manual testing

Additional info

Resolves #104

@drmorr0
Copy link
Contributor Author

drmorr0 commented Jun 17, 2024

Kubernetes Object DAG

%%{init: {'themeVariables': {'mainBkg': '#ddd'}}}%%
graph LR

classDef default color:#000
subgraph global
  direction LR
  global/simkube[<b>Namespace</b><br>simkube]
%% DELETED OBJECTS START
%% DELETED OBJECTS END
end

subgraph sk-tracer
  direction LR
  simkube/sk-tracer-svc[<b>Service</b><br>sk-tracer-svc]
  simkube/sk-tracer-depl[<b>Deployment</b><br>sk-tracer-depl]
  simkube/sk-tracer-sa[<b>ServiceAccount</b><br>sk-tracer-sa]
  sk-tracer/sk-tracer-crb[<b>ClusterRoleBinding</b><br>sk-tracer-crb]
  simkube/sk-tracer-tracer-config[<b>ConfigMap</b><br>sk-tracer-tracer-config]
  simkube/sk-tracer-sa--->simkube/sk-tracer-depl
  sk-tracer/sk-tracer-crb--->simkube/sk-tracer-depl
  simkube/sk-tracer-tracer-config--->simkube/sk-tracer-depl
%% DELETED OBJECTS START
%% DELETED OBJECTS END
end

subgraph sk-ctrl
  direction LR
  simkube/sk-ctrl-depl[<b>Deployment</b><br>sk-ctrl-depl]
  simkube/sk-ctrl-sa[<b>ServiceAccount</b><br>sk-ctrl-sa]
  sk-ctrl/sk-ctrl-crb[<b>ClusterRoleBinding</b><br>sk-ctrl-crb]
  simkube/sk-ctrl-sa--->simkube/sk-ctrl-depl
  sk-ctrl/sk-ctrl-crb--->simkube/sk-ctrl-depl
%% DELETED OBJECTS START
%% DELETED OBJECTS END
end

global--->sk-tracer
global--->sk-ctrl

%% STYLE DEFINITIONS START
  style simkube/test-depl fill:#e67
  style simkube/sk-tracer-depl fill:#cb4
%% STYLE DEFINITIONS END
Loading

New object
Deleted object
Updated object
Updated object (causes pod recreation)

Detailed Diff

simkube/sk-tracer-depl: ChangedWithPodRecreate

root['spec']['template']['spec']['containers'][0]['securityContext']:
not present --> {
  "capabilities": {
    "add": [
      "SYS_PTRACE"
    ]
  }
}

simkube/test-depl: Removed

root:
{
  "apiVersion": "apps/v1",
  "kind": "Deployment",
  "metadata": {
    "labels": {
      "app.kubernetes.io/name": "test"
    },
    "name": "test-depl",
    "namespace": "simkube"
  },
  "spec": {
    "replicas": 1,
    "selector": {
      "matchLabels": {
        "app.kubernetes.io/name": "test"
      }
    },
    "template": {
      "metadata": {
        "labels": {
          "app.kubernetes.io/name": "test"
        }
      },
      "spec": {
        "containers": [
          {
            "env": [
              {
                "name": "POD_OWNER",
                "value": "test-depl"
              }
            ],
            "image": "nginx:latest",
            "name": "nginx",
            "resources": {
              "requests": {
                "cpu": "1"
              }
            }
          }
        ],
        "nodeSelector": {
          "type": "virtual"
        },
        "tolerations": [
          {
            "effect": "NoSchedule",
            "key": "kwok-provider",
            "value": "true"
          }
        ]
      }
    }
  }
} --> not present

Copy link

codecov bot commented Jun 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.23%. Comparing base (73f7e7b) to head (0ca4676).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #118   +/-   ##
=======================================
  Coverage   73.23%   73.23%           
=======================================
  Files          39       39           
  Lines        2156     2156           
=======================================
  Hits         1579     1579           
  Misses        577      577           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@drmorr0 drmorr0 force-pushed the drmorr/kustomize branch from f9ac034 to f69711c Compare June 17, 2024 20:14
@drmorr0 drmorr0 force-pushed the drmorr/kustomize branch from f69711c to 0ca4676 Compare June 17, 2024 20:18
@drmorr0 drmorr0 merged commit dee068d into master Jun 17, 2024
10 checks passed
@drmorr0 drmorr0 deleted the drmorr/kustomize branch June 17, 2024 20:25
@drmorr0 drmorr0 mentioned this pull request Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing manifests in .build
1 participant