Copy K8s Secrets Between Namespaces With Updating

K8S doesn’t allow to share secrets between namespaces for security reasons. It might be acceptable from a security point of view to share secrets nevertheless - then a common workaround is to copy secrets between namespaces. One pattern is to keep a template of the secret in the default namespace and copy it from there to other namespaces. Here’s a version of copying secrets between namespaces that also works if the destination secret already exists - in this case it’s just updated with the data from the source:...

August 9, 2022 · 1 min · Marcus Schiesser

Using Axis2 services from Javascript (by removing the XML namespaces)

If you want to call an Axis2 service from Javascript you will face the problem that the XML response of an Axis2 service call contains XML namespaces - something Javascript doesn’t like in cross-browser-friendly way. The idea to fix this issue is to make an XSLT transformation directly from Axis2 that removes the unnecessary namespaces. First we need an XSLT transformation that will do the job: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output indent="no" method="xml"></xsl:output> <xsl:template match="/|comment()|processing-instruction()"> <xsl:copy> <xsl:apply-templates></xsl:apply-templates> </xsl:copy> </xsl:template> <xsl:template match="*"> <xsl:element name="{local-name()}"> <xsl:apply-templates select="@*|node()"></xsl:apply-templates> </xsl:element> </xsl:template> <xsl:template match="@*"> <xsl:attribute name="{local-name()}"> <xsl:value-of select="....

January 27, 2009 · 2 min · admin