From 4120f6b2c362c5c667a55f92e22afd58d5ef8729 Mon Sep 17 00:00:00 2001 From: csviri Date: Thu, 7 Apr 2022 15:35:30 +0200 Subject: [PATCH 1/2] fix: remove tweet --- .github/workflows/release.yml | 14 -------- a.yaml | 19 ++++++++++ docs/other/resource-handling-patterns.md | 45 ++++++++++++++++++++++++ 3 files changed, 64 insertions(+), 14 deletions(-) create mode 100644 a.yaml create mode 100644 docs/other/resource-handling-patterns.md diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a13bb4ed87..78dc6f9d44 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,20 +37,6 @@ jobs: gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }} nexus_username: ${{ secrets.OSSRH_USERNAME }} nexus_password: ${{ secrets.OSSRH_TOKEN }} - - uses: Eomm/why-don-t-you-tweet@v1 - # We don't want to tweet if the repository is not a public one - if: ${{ !github.event.repository.private }} - with: - # GitHub event payload - # https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#release - tweet-message: "New ${{ github.event.repository.name }} release ${{ github.event.release.tag_name }}! Try it will it is HOT! ${{ github.event.release.html_url }} #release" - env: - # Get your tokens from https://developer.twitter.com/apps - TWITTER_CONSUMER_API_KEY: ${{ secrets.TWITTER_CONSUMER_API_KEY }} - TWITTER_CONSUMER_API_SECRET: ${{ secrets.TWITTER_CONSUMER_API_SECRET }} - TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }} - TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }} - # This is separate job because there were issues with git after release step, was not able to commit changes. See history. diff --git a/a.yaml b/a.yaml new file mode 100644 index 0000000000..643bb2f116 --- /dev/null +++ b/a.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Pod +metadata: + name: dapi-test-pod +spec: + containers: + - name: test-container + image: k8s.gcr.io/busybox + command: [ "/bin/sh", "-c", "env" ] + env: + # Define the environment variable + - name: SPECIAL_LEVEL_KEY + valueFrom: + configMapKeyRef: + # The ConfigMap containing the value you want to assign to SPECIAL_LEVEL_KEY + name: special-config + # Specify the key associated with the value + key: special.how + restartPolicy: Never \ No newline at end of file diff --git a/docs/other/resource-handling-patterns.md b/docs/other/resource-handling-patterns.md new file mode 100644 index 0000000000..721918e0b8 --- /dev/null +++ b/docs/other/resource-handling-patterns.md @@ -0,0 +1,45 @@ +# Resource Management Atomic Resource Relations + +The goal of this document is to enumerate and explore of resource management patters in a reconciler. This should +server as an input to argumentation in issues, architectural and design decisions. +Pattern will be a type of (usually two) resources a resource and a relation between the resources. + +## Notes + +- `Kubernetes Resource` in this context means that any well known Kubernetes resource (pod, deployment, config map,...) + or any custom resource. +- `External Resource` is any **non Kubernetes resource**, in other words any resource that is managed by an API call + outside of Kubernetes (samples: GitHub repository, S3 bucket, Jenkins Pipeline, Database Schema) by a controller. +- `A depends on B` means that the resource needs to be created or updated first it's output values used as an input for + other resource. This is typically values from a status of a resource, like any status from + custom resource or ip from a service: + + ```yaml + apiVersion: v1 + kind: Service + metadata: + name: my-service + spec: + selector: + app: MyApp + ports: + - protocol: TCP + port: 80 + targetPort: 9376 + clusterIP: 10.0.171.239 + type: LoadBalancer + status: + loadBalancer: + ingress: + - ip: 192.0.2.127 + ``` + + +## Patterns + +1. Independent Resources (both External and Kubernetes) + +3. Non Independent Kubernetes Resources +4. External Resource depending on a Kubernetes Resource +5. Kubernetes Resource depends on External Resource +6. External Resource depends on other External Resource From 23c2021901af3777df21a64677dfe31b1c6be980 Mon Sep 17 00:00:00 2001 From: csviri Date: Thu, 7 Apr 2022 15:36:27 +0200 Subject: [PATCH 2/2] fix: remove docs --- a.yaml | 19 ---------- docs/other/resource-handling-patterns.md | 45 ------------------------ 2 files changed, 64 deletions(-) delete mode 100644 a.yaml delete mode 100644 docs/other/resource-handling-patterns.md diff --git a/a.yaml b/a.yaml deleted file mode 100644 index 643bb2f116..0000000000 --- a/a.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: dapi-test-pod -spec: - containers: - - name: test-container - image: k8s.gcr.io/busybox - command: [ "/bin/sh", "-c", "env" ] - env: - # Define the environment variable - - name: SPECIAL_LEVEL_KEY - valueFrom: - configMapKeyRef: - # The ConfigMap containing the value you want to assign to SPECIAL_LEVEL_KEY - name: special-config - # Specify the key associated with the value - key: special.how - restartPolicy: Never \ No newline at end of file diff --git a/docs/other/resource-handling-patterns.md b/docs/other/resource-handling-patterns.md deleted file mode 100644 index 721918e0b8..0000000000 --- a/docs/other/resource-handling-patterns.md +++ /dev/null @@ -1,45 +0,0 @@ -# Resource Management Atomic Resource Relations - -The goal of this document is to enumerate and explore of resource management patters in a reconciler. This should -server as an input to argumentation in issues, architectural and design decisions. -Pattern will be a type of (usually two) resources a resource and a relation between the resources. - -## Notes - -- `Kubernetes Resource` in this context means that any well known Kubernetes resource (pod, deployment, config map,...) - or any custom resource. -- `External Resource` is any **non Kubernetes resource**, in other words any resource that is managed by an API call - outside of Kubernetes (samples: GitHub repository, S3 bucket, Jenkins Pipeline, Database Schema) by a controller. -- `A depends on B` means that the resource needs to be created or updated first it's output values used as an input for - other resource. This is typically values from a status of a resource, like any status from - custom resource or ip from a service: - - ```yaml - apiVersion: v1 - kind: Service - metadata: - name: my-service - spec: - selector: - app: MyApp - ports: - - protocol: TCP - port: 80 - targetPort: 9376 - clusterIP: 10.0.171.239 - type: LoadBalancer - status: - loadBalancer: - ingress: - - ip: 192.0.2.127 - ``` - - -## Patterns - -1. Independent Resources (both External and Kubernetes) - -3. Non Independent Kubernetes Resources -4. External Resource depending on a Kubernetes Resource -5. Kubernetes Resource depends on External Resource -6. External Resource depends on other External Resource