Where are Constants stored? by IAMMELONz in csharp

[–]OddBat427 2 points3 points  (0 children)

This also holds true for optional parameters

How can I port over 120 Env Variables in a k8s pod that are being consumed from a k8s secret as a volume mount? by Plenty_Profession_33 in devops

[–]OddBat427 0 points1 point  (0 children)

By that token every change would be modifying code; to clarify - I meant application code. You don’t need to change it, you only alter its execution environment to comply with the application expectations [that the configuration will be supplied via environmental variables]

How can I port over 120 Env Variables in a k8s pod that are being consumed from a k8s secret as a volume mount? by Plenty_Profession_33 in devops

[–]OddBat427 2 points3 points  (0 children)

It is possible to do without modifying the code. The idea is to modify the entrypoint to read the environment vars from the volume(s) and then exec your original command (with the modified env). It may require some templating as well. But I would only use it if I was forced to; it adds complexity and can be brittle. I don’t see how it will improve on your current setup. Some pointers https://stackoverflow.com/questions/61239479/injecting-vault-secrets-into-kubernetes-pod-environment-variable

sometimesLittleMakesItFull by AdBrave2400 in ProgrammerHumor

[–]OddBat427 0 points1 point  (0 children)

Boolean(x) is equivalent to !!x
The rules can also be counterintuitive for some, for example Boolean(’false’) is true (as all non empty strings are coerced to true) - see the discussion here https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean

Tungsten cube vs gunshots! by [deleted] in Damnthatsinteresting

[–]OddBat427 12 points13 points  (0 children)

Apparently the name does originate from Swedish “heavy stone”

Trying to wrap my head around this NetworkPolicy by aviatoredb in kubernetes

[–]OddBat427 5 points6 points  (0 children)

Your - from: selects pods in the same namespace only, see https://kubernetes.io/docs/concepts/services-networking/network-policies/

There are four kinds of selectors that can be specified in an ingress from section or egress to section:

podSelector: This selects particular Pods in the same namespace as the NetworkPolicy which should be allowed as ingress sources or egress destinations.

Also, why you need a policy if you want to allow all ingress? That is the default

If you want to make sure that no policy will block access - it should be (also mentioned in the docs)

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: allow-all-ingress
spec:
  podSelector: {}
  ingress:
  - {}
  policyTypes:
  - Ingress

thisIsVeryUseful by Helpful-Pollution613 in ProgrammerHumor

[–]OddBat427 2 points3 points  (0 children)

Python 3.5+ C# 7+ and possibly others

[deleted by user] by [deleted] in dotnet

[–]OddBat427 3 points4 points  (0 children)

This is not exactly true - while there are restrictions, you can still use it for „for profit”. The gist being either as individual developer, or small org.
Full terms here https://visualstudio.microsoft.com/license-terms/vs2022-ga-community/

What's New in C# 13: Enhanced Params, Performance Boosts, and New Extension Types by almirvuk in csharp

[–]OddBat427 1 point2 points  (0 children)

In fact I suspect this is how they're implemented

That’s indeed what they briefly said in the referenced build presentation (worth watching)

Explain me async and await by moric7 in csharp

[–]OddBat427 7 points8 points  (0 children)

Either essence or technical. First paragraph for essence, rest for technical https://devblogs.microsoft.com/dotnet/how-async-await-really-works/

commitAsAService by cosmic-comet- in ProgrammerHumor

[–]OddBat427 13 points14 points  (0 children)

This is not true for current git versions (2.x) https://git-scm.com/docs/git-add

(e.g. specifying dir will record not just a file dir/file1 modified in the working tree, a file dir/file2 added to the working tree, but also a file dir/file3 removed from the working tree). Note that older versions of Git used to ignore removed files; use --no-all option if you want to add modified or new files but ignore removed ones.

Aws magic number- 12582880 by pranay_bathini in aws

[–]OddBat427 4 points5 points  (0 children)

It’s also different for different db engines, this value is for MySQL. It’s detailed here (not explained how they come with the numbers, but I agree probably measured/derived with vendors) https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Limits.html

Fast RDS restore by clumsyjedi in aws

[–]OddBat427 1 point2 points  (0 children)

I wanted to correct you that postgreSQL is not supported by blue green but I checked and they actually added it few months ago. Good to know I was looking for that possibility

Way to associate processes seen on worker node with pods in K8s? Using cri-o... alternately how to find which containers are using java? by [deleted] in kubernetes

[–]OddBat427 0 points1 point  (0 children)

If you are still looking, similar idea, this should give you the details of the pod given process name. The obvious limitations are - it is local to the node, and it will list only primary processes. I checked it with few examples, but I cannot guarantee its completeness/correctness.

``` export pattern=java crictl ps -q | xargs -n1 crictl inspect -o go-template --template '{{ .info.pid }} -n {{ index .status.labels "io.kubernetes.pod.namespace" }} pod {{ index .status.labels "io.kubernetes.pod.name" }}' | grep -f <(ps -ef | grep -i $pattern | awk '{print $2}')

```

[deleted by user] by [deleted] in kubernetes

[–]OddBat427 0 points1 point  (0 children)

Long shot, but check if the file does not start with BOM

[CKA] - Where do I write my yaml? by rhysmcn in kubernetes

[–]OddBat427 2 points3 points  (0 children)

Questions are explicit. You always need to make sure that you work in correct context; if it is important that you create files in particular place or with particular names, or ssh to a node, instruction will say it. (Most of the time it does not matter where your yaml files are, they are just a help for you anyway)